|
group2 0.1.0
CSE 125 Group 2
|
Classes | |
| struct | ThemeSettings |
| struct | ScopedTheme |
| Temporarily replace the live menu theme and restore it when leaving scope. More... | |
| struct | ScopedTerminalFont |
| RAII helper that pushes terminalFont() for its lifetime. No-op when the font is missing. More... | |
Functions | |
| ThemeSettings & | settings () |
| Mutable live menu theme settings used by applyStyle() and helpers. | |
| const ThemeSettings & | terminalSettings () |
| Front-end white terminal menu defaults. | |
| const ThemeSettings & | gameplaySettings () |
| In-game bluish menu defaults that match the current HUD palette. | |
| void | applyStyle () |
| Apply the cohesive white terminal style (colors + rounding + spacing). | |
| void | setSfxSystem (SfxSystem *system) |
| Attach the shared SFX system used by menu widgets. Passing nullptr disables UI sounds. | |
| void | playUiSound (UiSoundAction action, float gain=1.0f) |
| Play a semantic UI sound when an SFX system is attached and initialized. | |
| void | loadFonts () |
| Load the UI font (terminal font if present, otherwise SpaceGrotesk) and set it as the default. | |
| ImFont * | terminalFont () |
| Pointer to the loaded terminal/CRT font, or nullptr if none was found by loadFonts(). | |
| float | scaleFor (const ImVec2 &display) |
| Responsive UI scale derived from the current display size (1.0 at 1280x720). | |
| bool | beginPanel (const char *idAndTitle, float baseWidth, float baseHeight, bool showTitle, ImGuiWindowFlags extraFlags=0) |
| Begin a centered, responsive, chromeless panel. | |
| void | endPanel () |
| End a panel opened with beginPanel(). | |
| bool | beginScrollBody (const char *id, float footerHeight) |
| Begin a scrollable body region inside a panel that reserves footerHeight pixels at the bottom for sticky action buttons. | |
| void | endScrollBody () |
| End a scroll body opened with beginScrollBody(). | |
| void | heading (const char *text) |
| Accent section header with an underline rule (styled replacement for ImGui::SeparatorText). | |
| void | terminalSection (const char *text) |
| Terminal-style section prompt/header. | |
| bool | terminalActionRow (const char *command, const char *description=nullptr, const ImVec2 &size=ImVec2(0, 0), bool danger=false) |
| Selectable command row for keyboard/gamepad/mouse-driven terminal menus. | |
| void | terminalStatusLine (const char *left, const char *right=nullptr) |
| Draw a dim one-line terminal status strip. | |
| bool | accentButton (const char *label, const ImVec2 &size=ImVec2(0, 0)) |
| Bright accent call-to-action button. | |
| bool | dangerButton (const char *label, const ImVec2 &size=ImVec2(0, 0)) |
| Red destructive-action button. | |
| void | drawBackground (SDL_GPUDevice *device) |
| Draw the gradient + optional bg.webp background behind the current frame. | |
| void | buildTweaker (bool *open) |
| Live ImGui editor for every shared menu-theme parameter. | |
| void | releaseBackground (SDL_GPUDevice *device) |
| Release GPU resources held for the background. Call before the GPU device is destroyed. | |
Variables | |
| constexpr float | k_frontendPanelBaseWidth = 900.0f |
| constexpr float | k_frontendPanelBaseHeight = 660.0f |
| bool menu_theme::accentButton | ( | const char * | label, |
| const ImVec2 & | size ) |
Bright accent call-to-action button.
| void menu_theme::applyStyle | ( | ) |
Apply the cohesive white terminal style (colors + rounding + spacing).
| bool menu_theme::beginPanel | ( | const char * | idAndTitle, |
| float | baseWidth, | ||
| float | baseHeight, | ||
| bool | showTitle, | ||
| ImGuiWindowFlags | extraFlags = 0 ) |
Begin a centered, responsive, chromeless panel.
| idAndTitle | Window id; also drawn as the panel title when showTitle is true. |
| baseWidth | Design width at 1280x720 (scaled up/down with the display). |
| baseHeight | Design height at 1280x720. |
| showTitle | When true, draws a large accent title + underline rule. |
| extraFlags | Additional ImGuiWindowFlags to OR in. |
| bool menu_theme::beginScrollBody | ( | const char * | id, |
| float | footerHeight ) |
Begin a scrollable body region inside a panel that reserves footerHeight pixels at the bottom for sticky action buttons.
Pair with endScrollBody(); content rendered between the calls scrolls vertically while callers can render footer widgets after endScrollBody().
| id | Unique child id. |
| footerHeight | Height in pixels to reserve below the scroll body (button rows + spacing). |
| void menu_theme::buildTweaker | ( | bool * | open | ) |
Live ImGui editor for every shared menu-theme parameter.
| bool menu_theme::dangerButton | ( | const char * | label, |
| const ImVec2 & | size ) |
Red destructive-action button.
| void menu_theme::drawBackground | ( | SDL_GPUDevice * | device | ) |
Draw the gradient + optional bg.webp background behind the current frame.
| device | GPU device used to upload the background image (may be null; gradient still draws). |
| void menu_theme::endPanel | ( | ) |
| void menu_theme::endScrollBody | ( | ) |
| const ThemeSettings & menu_theme::gameplaySettings | ( | ) |
In-game bluish menu defaults that match the current HUD palette.
| void menu_theme::heading | ( | const char * | text | ) |
Accent section header with an underline rule (styled replacement for ImGui::SeparatorText).
| void menu_theme::loadFonts | ( | ) |
Load the UI font (terminal font if present, otherwise SpaceGrotesk) and set it as the default.
Safe (no-op) if no font file is found.
| void menu_theme::playUiSound | ( | UiSoundAction | action, |
| float | gain ) |
Play a semantic UI sound when an SFX system is attached and initialized.
| void menu_theme::releaseBackground | ( | SDL_GPUDevice * | device | ) |
Release GPU resources held for the background. Call before the GPU device is destroyed.
| float menu_theme::scaleFor | ( | const ImVec2 & | display | ) |
Responsive UI scale derived from the current display size (1.0 at 1280x720).
| void menu_theme::setSfxSystem | ( | SfxSystem * | system | ) |
Attach the shared SFX system used by menu widgets. Passing nullptr disables UI sounds.
| ThemeSettings & menu_theme::settings | ( | ) |
Mutable live menu theme settings used by applyStyle() and helpers.
| bool menu_theme::terminalActionRow | ( | const char * | command, |
| const char * | description, | ||
| const ImVec2 & | size, | ||
| bool | danger ) |
Selectable command row for keyboard/gamepad/mouse-driven terminal menus.
| ImFont * menu_theme::terminalFont | ( | ) |
Pointer to the loaded terminal/CRT font, or nullptr if none was found by loadFonts().
| void menu_theme::terminalSection | ( | const char * | text | ) |
Terminal-style section prompt/header.
| const ThemeSettings & menu_theme::terminalSettings | ( | ) |
Front-end white terminal menu defaults.
| void menu_theme::terminalStatusLine | ( | const char * | left, |
| const char * | right ) |
Draw a dim one-line terminal status strip.
|
inlineconstexpr |
|
inlineconstexpr |