13 #include <GLFW/glfw3.h>
33 UI(std::shared_ptr<Game> game);
65 inline static ImVec4
TEXT_COLOR = ImVec4(0.86f, 0.86f, 0.86f, 1.0f);
67 inline static ImVec4
ACCENT_COLOR = ImVec4(0.4f, 0.05f, 0.7f, 1.0f);
69 inline static ImVec4
GREY = ImVec4(0.3f, 0.3f, 0.3f, 1.0f);
70 inline static ImVec4
LIGHT_GREY = ImVec4(0.8f, 0.8f, 0.8f, 1.0f);
71 inline static ImVec4
DARK_ACCENT = ImVec4(0.1f, 0.1f, 0.1f, 1.0f);
72 inline static ImVec4
BLACK = ImVec4(0.0f, 0.0f, 0.0f, 0.0f);
Contains the declaration of the Game class, representing the game environment.
A class responsible for managing the user interface (UI) of the application.
Definition: UI.hpp:26
std::vector< std::unique_ptr< Widget > > _widgets
A collection of UI widgets.
Definition: UI.hpp:121
static ImFont * BIG_FONT
A larger font used in the UI.
Definition: UI.hpp:59
void draw()
Render the UI.
Definition: UI.cpp:307
static ImVec4 DISABLED_TEXT_COLOR
Disabled text color.
Definition: UI.hpp:66
bool _open
Flag indicating if the UI is open.
Definition: UI.hpp:118
static ImFont * SMALL_FONT
A smaller font used in the UI.
Definition: UI.hpp:61
void initializeImgui()
Initialize ImGui and other UI elements.
Definition: UI.cpp:43
void styleImgui()
Apply styling to ImGui elements.
Definition: UI.cpp:133
static ImFont * NORMAL_FONT
The normal font used in the UI.
Definition: UI.hpp:58
static ImVec4 DARK_ACCENT
Dark accent color.
Definition: UI.hpp:71
static ImFont * HUGE_FONT
An even larger font used in the UI.
Definition: UI.hpp:60
static ImVec4 LIGHT_GREY
Light grey color.
Definition: UI.hpp:70
static ImVec4 STRONG_ACCENT_COLOR
Strong accent color.
Definition: UI.hpp:68
bool shouldClose() const
Check if the UI should be closed.
Definition: UI.cpp:327
static ImVec4 ACCENT_COLOR
Accent color.
Definition: UI.hpp:67
void initializeInterpreter()
Initialize the Python interpreter.
Definition: UI.cpp:131
std::shared_ptr< Renderer > _renderer
A shared pointer to the renderer.
Definition: UI.hpp:116
void beginFrame()
Begin a UI frame.
Definition: UI.cpp:209
static ImVec4 GREY
Grey color.
Definition: UI.hpp:69
GLFWwindow * _window
The UI window.
Definition: UI.hpp:119
void initialize()
Initialize the UI, including ImGui, widgets, and assets.
Definition: UI.cpp:32
void renderFrame()
Render the UI frame.
Definition: UI.cpp:266
void initializeWidgets()
Initialize UI widgets.
Definition: UI.cpp:91
void endFrame()
End the UI frame.
Definition: UI.cpp:293
UI(std::shared_ptr< Game > game)
Constructor to create a UI manager for the specified game.
Definition: UI.cpp:26
void close()
Close and clean up the UI.
Definition: UI.cpp:318
void initializeAssets()
Initialize UI assets.
Definition: UI.cpp:111
static ImVec4 BLACK
Black color.
Definition: UI.hpp:72
static ImVec4 BACKGROUND_COLOR
Background color.
Definition: UI.hpp:64
static ImVec4 TEXT_COLOR
Text color.
Definition: UI.hpp:65
std::shared_ptr< Game > _game
A shared pointer to the associated game.
Definition: UI.hpp:115