Cleaner way of rendering an ImGui popup.
More...
#include <Popup.hpp>
|
| | Popup (std::string_view id) noexcept |
| | Constructor.
|
| | ~Popup () noexcept |
| | Destructor.
|
| void | draw_button (const char *text) noexcept |
| | Draw the button to show the popup.
|
| void | draw_menuitem (const char *text) noexcept |
| | Draw a menu button to show the popup.
|
| void | draw (std::move_only_function< void(void)> &&func) |
| | Show popup.
|
|
| | Popup ()=delete |
| | Default constructor (deleted).
|
|
| std::string | m_id |
| | Unique id (name) of the popup.
|
| bool | m_show |
| | Controls state of popup.
|
Cleaner way of rendering an ImGui popup.
Definition at line 20 of file Popup.hpp.
◆ Popup() [1/2]
| galaxy::Popup::Popup |
( |
std::string_view | id | ) |
|
|
noexcept |
Constructor.
- Parameters
-
| id | Unique ID for this popup. |
Definition at line 14 of file Popup.cpp.
◆ ~Popup()
| galaxy::Popup::~Popup |
( |
| ) |
|
|
noexcept |
◆ Popup() [2/2]
Default constructor (deleted).
◆ draw_button()
| void galaxy::Popup::draw_button |
( |
const char * | text | ) |
|
|
noexcept |
Draw the button to show the popup.
- Parameters
-
| text | Text to show on the button. |
Definition at line 24 of file Popup.cpp.
◆ draw_menuitem()
| void galaxy::Popup::draw_menuitem |
( |
const char * | text | ) |
|
|
noexcept |
Draw a menu button to show the popup.
- Parameters
-
| text | Text to show on the menubar. |
Definition at line 29 of file Popup.cpp.
◆ draw()
| void galaxy::Popup::draw |
( |
std::move_only_function< void(void)> && | func | ) |
|
Show popup.
- Parameters
-
| func | ImGui controls to show on popup. |
Definition at line 34 of file Popup.cpp.
◆ m_id
| std::string galaxy::Popup::m_id |
|
private |
Unique id (name) of the popup.
Definition at line 66 of file Popup.hpp.
◆ m_show
| bool galaxy::Popup::m_show |
|
private |
Controls state of popup.
Definition at line 71 of file Popup.hpp.
The documentation for this class was generated from the following files: