![]() |
Shkyera Engine
Easy to use, game engine for Python
|
A class responsible for managing the user interface (UI) of the application. More...
#include <UI.hpp>
Public Member Functions | |
UI () | |
Constructor to create a UI manager for the specified game. | |
void | initialize (std::shared_ptr< Registry > registry) |
Initialize the systems and widgets. | |
void | draw () |
Render the UI. | |
void | close () |
Close and clean up the UI. | |
bool | shouldClose () const |
Check if the UI should be closed. | |
Private Member Functions | |
void | initializeImgui () |
Initialize ImGui and other UI elements. | |
void | initializeWidgets () |
Initialize UI widgets. | |
void | initializeAssets () |
Initialize UI assets. | |
void | styleImgui () |
Apply styling to ImGui elements. | |
void | beginFrame () |
Begin a UI frame. | |
void | renderFrame () |
Render the UI frame. | |
void | endFrame () |
End the UI frame. | |
Private Attributes | |
std::shared_ptr< Registry > | _registry |
A shared pointer to the associated game. | |
std::vector< std::unique_ptr< Widget > > | _widgets |
A collection of UI widgets. | |
bool | _open |
Flag indicating if the UI is open. | |
GLFWwindow * | _window |
The UI window. | |
A class responsible for managing the user interface (UI) of the application.
The UI
class is responsible for initializing and rendering the UI elements, including widgets, using ImGui.
shkyera::UI::UI | ( | ) |
Constructor to create a UI manager for the specified game.
Initialize the systems and widgets.
registry | A shared pointer to the registry that the UI will configure. |
bool shkyera::UI::shouldClose | ( | ) | const |
|
private |
Apply styling to ImGui elements.
|
private |
A shared pointer to the associated game.
|
private |
The UI window.