Peoplemon  0.1.0
Peoplemon 3 game source documentation
MoveEditorWindow.hpp
Go to the documentation of this file.
1 #ifndef EDITOR_COMPONENTS_MOVEEDITORWINDOW_HPP
2 #define EDITOR_COMPONENTS_MOVEEDITORWINDOW_HPP
3 
4 #include <BLIB/Interfaces/GUI.hpp>
7 #include <functional>
8 #include <Core/Files/MoveDB.hpp>
9 
10 namespace editor
11 {
12 namespace component
13 {
21 public:
23  using OnChange = std::function<void()>;
24 
31  MoveEditorWindow(core::file::MoveDB& moveDb, const OnChange& onChange);
32 
39  void open(bl::gui::GUI* parent, core::pplmn::MoveId move);
40 
41 private:
42  core::file::MoveDB& moveDb;
43  const OnChange onChange;
44  bool doingNewMove;
45 
46  bl::gui::Window::Ptr window;
47  bl::gui::TextEntry::Ptr idEntry;
48  bl::gui::TextEntry::Ptr nameEntry;
49  bl::gui::TextEntry::Ptr descEntry;
50  TypeSelector::Ptr typeSelect;
51  bl::gui::TextEntry::Ptr dmgEntry;
52  bl::gui::TextEntry::Ptr accEntry;
53  bl::gui::TextEntry::Ptr priorityEntry;
54  bl::gui::TextEntry::Ptr ppEntry;
55  bl::gui::CheckButton::Ptr specialCheck;
56  bl::gui::CheckButton::Ptr contactCheck;
57  bl::gui::ComboBox::Ptr effectSelect;
58  bl::gui::TextEntry::Ptr effectChanceEntry;
59  bl::gui::TextEntry::Ptr effectIntenseEntry;
60  bl::gui::CheckButton::Ptr effectSelfCheck;
61 
62  core::pplmn::MoveId openId;
63  bool dirty;
64  bl::gui::Button::Ptr applyBut;
65 
66  void makeDirty();
67  void onSave();
68  void onCancel();
69  void close();
70 };
71 
72 } // namespace component
73 } // namespace editor
74 
75 #endif
MoveId
The id of a move.
Definition: MoveId.hpp:16
All classes and functionality used for implementing the game editor.
Definition: Tile.hpp:11
Stores the metadata of all peoplemon moves.
Definition: MoveDB.hpp:22
Editor window to edit moves in the move database.
MoveEditorWindow(core::file::MoveDB &moveDb, const OnChange &onChange)
Construct a new Move Editor Window.
void open(bl::gui::GUI *parent, core::pplmn::MoveId move)
Opens the window and populates for the given move. Pass MoveId::Unknown for a new move.
std::function< void()> OnChange
Callback signature on move change.
std::shared_ptr< TypeSelector > Ptr
Pointer to a TypeSelector component.