Peoplemon  0.1.0
Peoplemon 3 game source documentation
NewMapDialog.hpp
Go to the documentation of this file.
1 #ifndef EDITOR_COMPONENTS_NEWMAPDIALOG_HPP
2 #define EDITOR_COMPONENTS_NEWMAPDIALOG_HPP
3 
4 #include <BLIB/Interfaces/GUI.hpp>
5 
6 namespace editor
7 {
8 namespace component
9 {
16 class NewMapDialog {
17 public:
19  using CreateCb =
20  std::function<void(const std::string& file, const std::string& name,
21  const std::string& tileset, unsigned int w, unsigned int h)>;
22 
28  NewMapDialog(const CreateCb& createCb);
29 
36  void show(bl::gui::GUI* parent, const std::string& file);
37 
38 private:
39  const CreateCb createCb;
40 
41  bl::gui::Window::Ptr window;
42  bl::gui::Label::Ptr mapFileLabel;
43  bl::gui::TextEntry::Ptr nameEntry;
44  bl::gui::TextEntry::Ptr widthEntry;
45  bl::gui::TextEntry::Ptr heightEntry;
46  bl::gui::Label::Ptr tilesetLabel;
47  bl::gui::FilePicker tilesetPicker;
48  bl::gui::Button::Ptr pickBut;
49  bool pickInit;
50 };
51 
52 } // namespace component
53 } // namespace editor
54 
55 #endif
All classes and functionality used for implementing the game editor.
Definition: Tile.hpp:11
Dialog for creating new maps.
void show(bl::gui::GUI *parent, const std::string &file)
Opens the new map dialog.
NewMapDialog(const CreateCb &createCb)
Creates a new new-map dialoig.
std::function< void(const std::string &file, const std::string &name, const std::string &tileset, unsigned int w, unsigned int h)> CreateCb
Callback for when maps are created.