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
Popup.hpp
Go to the documentation of this file.
1
7
8
#ifndef GALAXY_UI_WIDGETS_POPUP_HPP_
9
#define GALAXY_UI_WIDGETS_POPUP_HPP_
10
11
#include <functional>
12
#include <string_view>
13
#include <string>
14
15
namespace
galaxy
16
{
20
class
Popup
final
21
{
22
public
:
28
Popup
(std::string_view
id
)
noexcept
;
29
33
~Popup
()
noexcept
;
34
40
void
draw_button
(
const
char
* text)
noexcept
;
41
47
void
draw_menuitem
(
const
char
* text)
noexcept
;
48
54
void
draw
(std::move_only_function<
void
(
void
)>&& func);
55
56
private
:
60
Popup
() =
delete
;
61
62
private
:
66
std::string
m_id
;
67
71
bool
m_show
;
72
};
73
}
// namespace galaxy
74
75
#endif
galaxy::Popup::m_id
std::string m_id
Unique id (name) of the popup.
Definition
Popup.hpp:66
galaxy::Popup::m_show
bool m_show
Controls state of popup.
Definition
Popup.hpp:71
galaxy::Popup::draw_menuitem
void draw_menuitem(const char *text) noexcept
Draw a menu button to show the popup.
Definition
Popup.cpp:29
galaxy::Popup::draw_button
void draw_button(const char *text) noexcept
Draw the button to show the popup.
Definition
Popup.cpp:24
galaxy::Popup::Popup
Popup()=delete
Default constructor (deleted).
galaxy::Popup::Popup
Popup(std::string_view id) noexcept
Constructor.
Definition
Popup.cpp:14
galaxy::Popup::draw
void draw(std::move_only_function< void(void)> &&func)
Show popup.
Definition
Popup.cpp:34
galaxy
Application.hpp galaxy.
Definition
Application.cpp:48
galaxy
src
galaxy
ui
widgets
Popup.hpp
Generated on
for galaxy by
1.18.0