Peoplemon  0.1.0
Peoplemon 3 game source documentation
OwnedPeoplemonWindow.hpp
Go to the documentation of this file.
1 #ifndef EDITOR_COMPONENTS_OWNEDPEOPLEMONWINDOW_HPP
2 #define EDITOR_COMPONENTS_OWNEDPEOPLEMONWINDOW_HPP
3 
4 #include <BLIB/Interfaces/GUI.hpp>
10 
11 namespace editor
12 {
13 namespace component
14 {
22 public:
24  using NotifyCB = std::function<void()>;
25 
32  OwnedPeoplemonWindow(const NotifyCB& onFinish, const NotifyCB& onCancel);
33 
40  void show(bl::gui::GUI* parent, const core::pplmn::OwnedPeoplemon& value = {});
41 
46  void hide();
47 
53 
54 private:
55  const NotifyCB onFinish;
56  const NotifyCB onCancel;
57  bl::gui::GUI* parent;
58  bl::gui::Window::Ptr window;
59 
60  PeoplemonSelector::Ptr idSelect;
61  bl::gui::TextEntry::Ptr nameEntry;
62  bl::gui::TextEntry::Ptr levelEntry;
63  ItemSelector::Ptr itemSelector;
64 
65  MoveSelector::Ptr moveSelector;
66  bl::gui::SelectBox::Ptr moveBox;
67  std::vector<core::pplmn::MoveId> moves;
68  void syncMoves();
69 
70  StatBox evBox;
71  StatBox ivBox;
72 
73  bool validate() const;
74 };
75 
76 } // namespace component
77 } // namespace editor
78 
79 #endif
All classes and functionality used for implementing the game editor.
Definition: Tile.hpp:11
Represents an instance of a peoplemon. Can be a wild peoplemon, trainer, or player peoplemon....
std::shared_ptr< ItemSelector > Ptr
Pointer to this component.
std::shared_ptr< MoveSelector > Ptr
Pointer to this component.
Window for editing owned Peoplemon.
std::function< void()> NotifyCB
Callback for when the window is closed.
OwnedPeoplemonWindow(const NotifyCB &onFinish, const NotifyCB &onCancel)
Construct a new Owned Peoplemon Window.
void show(bl::gui::GUI *parent, const core::pplmn::OwnedPeoplemon &value={})
Shows the window.
core::pplmn::OwnedPeoplemon getValue() const
Returns the value of the Peoplemon entered.
std::shared_ptr< PeoplemonSelector > Ptr
Provides an inline GUI entry for stats in either EV mode or IV mode.
Definition: StatBox.hpp:17