Peoplemon  0.1.0
Peoplemon 3 game source documentation
Scripts.hpp
Go to the documentation of this file.
1 #ifndef EDITOR_PAGES_SCRIPTS_HPP
2 #define EDITOR_PAGES_SCRIPTS_HPP
3 
4 #include <Editor/Pages/Page.hpp>
5 
6 namespace editor
7 {
8 namespace page
9 {
16 class Scripts : public Page {
17 public:
24 
29  virtual ~Scripts() = default;
30 
35  virtual void update(float dt) override;
36 
37 private:
38  struct Script {
39  std::string file;
40  std::string source;
41  std::optional<std::string> error;
42 
43  bool operator<(const Script& rhs) const;
44  };
45 
46  bl::gui::Window::Ptr window;
47  bl::gui::Label::Ptr file;
48  bl::gui::Label::Ptr source;
49  bl::gui::Label::Ptr error;
50 
51  bl::gui::ScrollArea::Ptr scriptArea;
52  std::vector<Script> scripts;
53  bool started;
54 
55  void refresh();
56  void openWindow(unsigned int i);
57 };
58 
59 } // namespace page
60 } // namespace editor
61 
62 #endif
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
Base class for all editor pages.
Definition: Page.hpp:32
core::system::Systems & systems
Definition: Page.hpp:68
Scripting validation tab.
Definition: Scripts.hpp:16
virtual ~Scripts()=default
Destroy the Scripts object.
Scripts(core::system::Systems &systems)
Creates a new scripting validation tab.
Definition: Scripts.cpp:11
virtual void update(float dt) override
Refreshes if called for first time.
Definition: Scripts.cpp:48