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
galaxy::Popup Class Referencefinal

Cleaner way of rendering an ImGui popup. More...

#include <Popup.hpp>

Collaboration diagram for galaxy::Popup:

Public Member Functions

 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.

Private Member Functions

 Popup ()=delete
 Default constructor (deleted).

Private Attributes

std::string m_id
 Unique id (name) of the popup.
bool m_show
 Controls state of popup.

Detailed Description

Cleaner way of rendering an ImGui popup.

Definition at line 20 of file Popup.hpp.

Constructor & Destructor Documentation

◆ Popup() [1/2]

galaxy::Popup::Popup ( std::string_view id)
noexcept

Constructor.

Parameters
idUnique ID for this popup.

Definition at line 14 of file Popup.cpp.

◆ ~Popup()

galaxy::Popup::~Popup ( )
noexcept

Destructor.

Definition at line 20 of file Popup.cpp.

◆ Popup() [2/2]

galaxy::Popup::Popup ( )
privatedelete

Default constructor (deleted).

Member Function Documentation

◆ draw_button()

void galaxy::Popup::draw_button ( const char * text)
noexcept

Draw the button to show the popup.

Parameters
textText to show on the button.

Definition at line 24 of file Popup.cpp.

Here is the caller graph for this function:

◆ draw_menuitem()

void galaxy::Popup::draw_menuitem ( const char * text)
noexcept

Draw a menu button to show the popup.

Parameters
textText to show on the menubar.

Definition at line 29 of file Popup.cpp.

Here is the caller graph for this function:

◆ draw()

void galaxy::Popup::draw ( std::move_only_function< void(void)> && func)

Show popup.

Parameters
funcImGui controls to show on popup.

Definition at line 34 of file Popup.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

Member Data Documentation

◆ 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: