Peoplemon  0.1.0
Peoplemon 3 game source documentation
Items.hpp
Go to the documentation of this file.
1 #ifndef EDITOR_PAGES_ITEMS_HPP
2 #define EDITOR_PAGES_ITEMS_HPP
3 
4 #include <Editor/Pages/Page.hpp>
5 
6 #include <Core/Files/ItemDB.hpp>
8 
9 namespace editor
10 {
11 namespace page
12 {
19 class Items : public Page {
20 public:
27 
32  virtual ~Items() = default;
33 
39  virtual void update(float dt) override;
40 
41 private:
42  core::file::ItemDB itemDb;
43  component::ItemEditorWindow itemWindow;
44  bl::gui::Button::Ptr saveBut;
45  bl::gui::ScrollArea::Ptr rowArea;
46 
47  void onChange();
48  void makeDirty();
49  void save();
50  void newItem();
51  void editItem(core::item::Id move);
52  void deleteItem(core::item::Id move);
53  void sync();
54  void reset();
55 };
56 
57 } // namespace page
58 } // namespace editor
59 
60 #endif
Id
Represents an item in its simplist form.
Definition: Id.hpp:24
All classes and functionality used for implementing the game editor.
Definition: Tile.hpp:11
Loads and stores metadata surrounding items in the game.
Definition: ItemDB.hpp:24
Owns all primary systems and a reference to the engine.
Definition: Systems.hpp:47
Window for editing an individual item in the item database.
Page for editing item names, descriptions, and values.
Definition: Items.hpp:19
virtual void update(float dt) override
Does nothing.
Definition: Items.cpp:115
virtual ~Items()=default
Destroy the Page.
Items(core::system::Systems &systems)
Construct a new Items page.
Definition: Items.cpp:20
Base class for all editor pages.
Definition: Page.hpp:32
core::system::Systems & systems
Definition: Page.hpp:68