7 using namespace bl::gui;
16 , conversationEditor(std::bind(&ignore), std::bind(&ignore))
17 , npcEditor(std::bind(&ignore), std::bind(&ignore))
18 , trainerEditor(std::bind(&ignore), std::bind(&ignore))
19 , playlistEditor(std::bind(&ignore), std::bind(&ignore)) {
20 content = Box::create(LinePacker::create(LinePacker::Horizontal, 8.f));
22 Box::Ptr row = Box::create(LinePacker::create(LinePacker::Horizontal, 6.f));
23 Button::Ptr open = Button::create(
"Conversation Editor");
24 open->getSignal(Event::LeftClicked)
25 .willAlwaysCall(std::bind(&VariousEditors::openConvEditor,
this));
26 row->pack(open,
false,
true);
28 open = Button::create(
"NPC Editor");
29 open->getSignal(Event::LeftClicked)
30 .willAlwaysCall(std::bind(&VariousEditors::openNpcEditor,
this));
31 row->pack(open,
false,
true);
33 open = Button::create(
"Trainer Editor");
34 open->getSignal(Event::LeftClicked)
35 .willAlwaysCall(std::bind(&VariousEditors::openTrainerEditor,
this));
36 row->pack(open,
false,
true);
38 open = Button::create(
"Playlist Editor");
39 open->getSignal(Event::LeftClicked)
40 .willAlwaysCall(std::bind(&VariousEditors::openPlaylistEditor,
this));
41 row->pack(open,
false,
true);
43 content->pack(row,
true,
false);
48 void VariousEditors::openConvEditor() { conversationEditor.
open(
parent,
""); }
50 void VariousEditors::openNpcEditor() { npcEditor.
show(
parent,
""); }
52 void VariousEditors::openTrainerEditor() { trainerEditor.
show(
parent,
""); }
54 void VariousEditors::openPlaylistEditor() { playlistEditor.
open(
parent,
""); }
All classes and functionality used for implementing the game editor.
Owns all primary systems and a reference to the engine.
void open(bl::gui::GUI *parent, const std::string ¤t)
Actually opens the window and initializes with a conversation.
void show(bl::gui::GUI *parent, const std::string &file)
Opens the NPC editor.
void open(bl::gui::GUI *gui, const std::string &plist)
Opens the window with an optional file to load.
void show(bl::gui::GUI *parent, const std::string &file)
Opens the trainer editor.
Base class for all editor pages.
bl::gui::Box::Ptr content
virtual void update(float dt) override
Does nothing.
VariousEditors(core::system::Systems &systems)
Construct a new VariousEditors tab.