Peoplemon  0.1.0
Peoplemon 3 game source documentation
VariousEditors.cpp
Go to the documentation of this file.
2 
3 namespace editor
4 {
5 namespace page
6 {
7 using namespace bl::gui;
8 
9 namespace
10 {
11 void ignore() {}
12 } // namespace
13 
15 : Page(s)
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));
21 
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);
27 
28  open = Button::create("NPC Editor");
29  open->getSignal(Event::LeftClicked)
30  .willAlwaysCall(std::bind(&VariousEditors::openNpcEditor, this));
31  row->pack(open, false, true);
32 
33  open = Button::create("Trainer Editor");
34  open->getSignal(Event::LeftClicked)
35  .willAlwaysCall(std::bind(&VariousEditors::openTrainerEditor, this));
36  row->pack(open, false, true);
37 
38  open = Button::create("Playlist Editor");
39  open->getSignal(Event::LeftClicked)
40  .willAlwaysCall(std::bind(&VariousEditors::openPlaylistEditor, this));
41  row->pack(open, false, true);
42 
43  content->pack(row, true, false);
44 }
45 
46 void VariousEditors::update(float) {}
47 
48 void VariousEditors::openConvEditor() { conversationEditor.open(parent, ""); }
49 
50 void VariousEditors::openNpcEditor() { npcEditor.show(parent, ""); }
51 
52 void VariousEditors::openTrainerEditor() { trainerEditor.show(parent, ""); }
53 
54 void VariousEditors::openPlaylistEditor() { playlistEditor.open(parent, ""); }
55 
56 } // namespace page
57 } // namespace editor
All classes and functionality used for implementing the game editor.
Definition: Tile.hpp:11
Owns all primary systems and a reference to the engine.
Definition: Systems.hpp:47
void open(bl::gui::GUI *parent, const std::string &current)
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.
Definition: Page.hpp:32
bl::gui::Box::Ptr content
Definition: Page.hpp:69
bl::gui::GUI * parent
Definition: Page.hpp:70
virtual void update(float dt) override
Does nothing.
VariousEditors(core::system::Systems &systems)
Construct a new VariousEditors tab.