1 #ifndef EDITOR_COMPONENTS_NPCEDITORWINDOW_HPP
2 #define EDITOR_COMPONENTS_NPCEDITORWINDOW_HPP
4 #include <BLIB/Interfaces/GUI.hpp>
23 using SelectCb = std::function<void(
const std::string& file)>;
42 void show(bl::gui::GUI* parent,
const std::string& file);
55 bl::gui::Window::Ptr window;
56 bl::gui::Button::Ptr saveBut;
57 bl::gui::Label::Ptr fileLabel;
58 bl::gui::TextEntry::Ptr nameEntry;
59 bl::gui::Label::Ptr animLabel;
60 bl::gui::Label::Ptr convLabel;
62 bl::gui::FilePicker filePicker;
64 void onChooseFile(
const std::string& file);
67 void onChooseAnimation(
const std::string& anim);
72 void onChooseConversation(
const std::string& conv);
74 void forceWindowOnTop();
79 void load(
const std::string& file);
80 bool validate(
bool saving)
const;
81 bool confirmDiscard()
const;
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::function< void(const std::string &file)> SelectCb
Callback for when an NPC file is selected.
void hide()
Hides the window and all created child windows.
NpcEditorWindow(const SelectCb &cb, const CloseCb &closeCb)
Construct a new Npc Editor Window.
void show(bl::gui::GUI *parent, const std::string &file)
Opens the NPC editor.
std::function< void()> CloseCb
Called when the window is closed.