Stores all popups used in FuncDoodle.
More...
#include <PopupRegistry.h>
|
| | PopupRegistry ()=default |
| | ~PopupRegistry ()=default |
| void | Register (std::string_view id) |
| | Registers a popup identifier in the registry.
|
| void | Open (std::string_view id) |
| | Marks a popup as open.
|
| void | Close (std::string_view id) |
| | Marks a popup as closed.
|
| void | Popup (std::string_view humanReadable, std::string_view id, double dt, std::function< void()> popup) |
| | Renders a popup using a lambda.
|
| void | Modal (std::string_view humanReadable, std::string_view id, double dt, std::function< void()> popup) |
| | Renders a popup MODAL using a lambda.
|
| bool | IsOpen (std::string_view id) const |
| | Returns whether a popup is currently open.
|
| bool * | Get (std::string_view id) |
| | Returns direct access to a popup open-state flag.
|
| void | CloseAll () |
| | Closes every registered popup.
|
| void | CloseAllExcept (std::string_view exception) |
| | Closes every popup except one.
|
Stores all popups used in FuncDoodle.
Handles fetching and setting popup state.
- See also
- KeybindsRegistry
◆ PopupRegistry()
| FuncDoodle::PopupRegistry::PopupRegistry |
( |
| ) |
|
|
default |
◆ ~PopupRegistry()
| FuncDoodle::PopupRegistry::~PopupRegistry |
( |
| ) |
|
|
default |
◆ Close()
| void FuncDoodle::PopupRegistry::Close |
( |
std::string_view | id | ) |
|
Marks a popup as closed.
- Parameters
-
| id | Popup identifier to close. |
◆ CloseAll()
| void FuncDoodle::PopupRegistry::CloseAll |
( |
| ) |
|
Closes every registered popup.
◆ CloseAllExcept()
| void FuncDoodle::PopupRegistry::CloseAllExcept |
( |
std::string_view | exception | ) |
|
Closes every popup except one.
- Parameters
-
| exception | Popup identifier to keep open. |
◆ Get()
| bool * FuncDoodle::PopupRegistry::Get |
( |
std::string_view | id | ) |
|
Returns direct access to a popup open-state flag.
- Parameters
-
| id | Popup identifier to query. |
- Returns
- Pointer to the popup flag, or nullptr if missing.
◆ IsOpen()
| bool FuncDoodle::PopupRegistry::IsOpen |
( |
std::string_view | id | ) |
const |
|
nodiscard |
Returns whether a popup is currently open.
- Parameters
-
| id | Popup identifier to query. |
- Returns
- Whether the popup is open.
◆ Modal()
| void FuncDoodle::PopupRegistry::Modal |
( |
std::string_view | humanReadable, |
|
|
std::string_view | id, |
|
|
double | dt, |
|
|
std::function< void()> | popup ) |
Renders a popup MODAL using a lambda.
- See also
- Popup
- Parameters
-
| humanReadable | The part before #. |
| id | The part after #. |
| dt | The current deltaTime. |
| popup | The lambda to render with. |
◆ Open()
| void FuncDoodle::PopupRegistry::Open |
( |
std::string_view | id | ) |
|
Marks a popup as open.
- Parameters
-
| id | Popup identifier to open. |
◆ Popup()
| void FuncDoodle::PopupRegistry::Popup |
( |
std::string_view | humanReadable, |
|
|
std::string_view | id, |
|
|
double | dt, |
|
|
std::function< void()> | popup ) |
Renders a popup using a lambda.
- Parameters
-
| humanReadable | The part before #. |
| id | The part after #. |
| dt | The current deltaTime. |
| popup | The lambda to render with. |
◆ Register()
| void FuncDoodle::PopupRegistry::Register |
( |
std::string_view | id | ) |
|
Registers a popup identifier in the registry.
- Parameters
-
| id | Popup identifier to track. |
◆ m_Popups
| std::unordered_map<std::string_view, PopupEntry> FuncDoodle::PopupRegistry::m_Popups |
|
private |
The documentation for this class was generated from the following files: