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.cpp
Go to the documentation of this file.
1
7
8#include "Panel.hpp"
9
10namespace galaxy
11{
12 Panel::Panel() noexcept
13 : m_show {false}
14 {
15 }
16
17 Panel::Panel(Panel&& p) noexcept
18 {
19 this->m_show = p.m_show;
20 }
21
22 Panel::Panel(const Panel& p) noexcept
23 {
24 this->m_show = p.m_show;
25 }
26
27 Panel::~Panel() noexcept
28 {
29 }
30
31 void Panel::toggle() noexcept
32 {
33 m_show = !m_show;
34 }
35
36 bool Panel::shown() const noexcept
37 {
38 return m_show;
39 }
40
42 {
43 if (this != &p)
44 {
45 this->m_show = p.m_show;
46 }
47
48 return *this;
49 }
50
51 Panel& Panel::operator=(const Panel& p) noexcept
52 {
53 if (this != &p)
54 {
55 this->m_show = p.m_show;
56 }
57
58 return *this;
59 }
60} // namespace galaxy
bool shown() const noexcept
Check if panel is visible.
Definition Panel.cpp:36
Panel & operator=(Panel &&) noexcept
Move assignment operator.
Definition Panel.cpp:41
void toggle() noexcept
Toggle visibility of panel.
Definition Panel.cpp:31
Panel() noexcept
Constructor.
Definition Panel.cpp:12
virtual ~Panel() noexcept
Destructor.
Definition Panel.cpp:27
bool m_show
Should the panel be shown.
Definition Panel.hpp:71
Application.hpp galaxy.