galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
Loading...
Searching...
No Matches
Panel.hpp
Go to the documentation of this file.
1
7
8#ifndef GALAXY_UI_PANELS_PANEL_HPP_
9#define GALAXY_UI_PANELS_PANEL_HPP_
10
11namespace galaxy
12{
16 class Panel
17 {
18 public:
22 Panel() noexcept;
23
27 Panel(Panel&&) noexcept;
28
32 Panel(const Panel&) noexcept;
33
37 virtual ~Panel() noexcept;
38
42 virtual void draw() = 0;
43
47 void toggle() noexcept;
48
54 [[nodiscard]]
55 bool shown() const noexcept;
56
60 Panel& operator=(Panel&&) noexcept;
61
65 Panel& operator=(const Panel&) noexcept;
66
67 protected:
71 bool m_show;
72 };
73} // namespace galaxy
74
75#endif
virtual void draw()=0
Draw the ImGui widgets.
bool shown() const noexcept
Check if panel is visible.
Definition Panel.cpp:36
void toggle() noexcept
Toggle visibility of panel.
Definition Panel.cpp:31
Panel() noexcept
Constructor.
Definition Panel.cpp:12
bool m_show
Should the panel be shown.
Definition Panel.hpp:71
Application.hpp galaxy.