1 #ifndef EDITOR_COMPONENTS_TRAINEREDITORWINDOW_HPP
2 #define EDITOR_COMPONENTS_TRAINEREDITORWINDOW_HPP
4 #include <BLIB/Interfaces/GUI.hpp>
26 using SelectCb = std::function<void(
const std::string& file)>;
45 void show(bl::gui::GUI* parent,
const std::string& file);
58 bl::gui::Window::Ptr window;
59 bl::gui::Button::Ptr saveBut;
60 bl::gui::Label::Ptr fileLabel;
61 bl::gui::TextEntry::Ptr nameEntry;
62 bl::gui::Label::Ptr animLabel;
63 bl::gui::Label::Ptr bbLabel;
64 bl::gui::Label::Ptr abLabel;
65 bl::gui::TextEntry::Ptr loseLineEntry;
66 bl::gui::ComboBox::Ptr visionRangeEntry;
67 bl::gui::TextEntry::Ptr payoutEntry;
70 bl::gui::SelectBox::Ptr itemSelectBox;
72 std::vector<core::item::Id> items;
74 bl::gui::SelectBox::Ptr pplBox;
75 std::vector<core::pplmn::OwnedPeoplemon> peoplemon;
77 std::optional<unsigned int> editPplIndex;
79 bl::gui::FilePicker filePicker;
81 void onChooseFile(
const std::string& file);
84 void onChooseAnimation(
const std::string& anim);
90 void onChooseConversation(
const std::string& conv);
92 void forceWindowOnTop();
97 void load(
const std::string& file);
98 bool validate(
bool saving)
const;
99 bool confirmDiscard()
const;
Id
Represents an item in its simplist form.
All classes and functionality used for implementing the game editor.
A basic window to choose and view animations.
Inline GUI elements with openable window for editing behaviors.
A window for choosing and editing conversations.
std::shared_ptr< ItemSelector > Ptr
Pointer to this component.
Window for editing owned Peoplemon.
void show(bl::gui::GUI *parent, const std::string &file)
Opens the trainer editor.
TrainerEditorWindow(const SelectCb &cb, const CloseCb &closeCb)
Construct a new Trainer Editor Window.
std::function< void(const std::string &file)> SelectCb
Callback for when a trainer file is selected.
void hide()
Hides the window and all created child windows.
std::function< void()> CloseCb
Called when the window is closed.