From 3a6d6755b5f1a85da7bce32695466c65541dcee9 Mon Sep 17 00:00:00 2001 From: cinnaboot Date: Sat, 24 Jan 2026 10:14:48 -0500 Subject: [PATCH] set a different default UI style --- Makefile | 7 ++++++- src/main.cpp | 5 +++-- src/ui_renderer.cpp | 5 +++++ src/ui_renderer.h | 2 ++ 4 files changed, 16 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 52d7439..3b9d6fa 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,11 @@ # Compiler and flags CXX = g++ -CXXFLAGS = -Wall -Wextra -g -ggdb3 -std=c++14 -I./src -isystem./ext/raylib/src -I./ext/tomlc17/src -isystem./ext/raygui/src +CXXFLAGS = -Wall -Wextra -g -ggdb3 -std=c++14 \ + -I./src \ + -isystem./ext/tomlc17/src \ + -isystem./ext/raylib/src \ + -isystem./ext/raygui/src \ + -isystem./ext/raygui/styles LDFLAGS = -L./ext/raylib/src -lraylib -lm -lpthread -ldl -lrt -lX11 # Directories diff --git a/src/main.cpp b/src/main.cpp index 52422f2..a102e84 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -9,8 +9,8 @@ #include // Configuration defaults - edit to change default run mode -//#define DEFAULT_CONFIG_FILE "configs/test_simple.toml" -#define DEFAULT_CONFIG_FILE "tests/configs/solar_system.toml" +//#define DEFAULT_CONFIG_FILE "tests/configs/solar_system.toml" +#define DEFAULT_CONFIG_FILE "tests/configs/maneuver_sequence.toml" struct ProgramArgs { const char* config_file; @@ -61,6 +61,7 @@ void run_gui_simulation(SimulationState* sim) { // Initialize UI state ui_state.body_list_scroll = 0; // Initial scroll position ui_state.body_list_active = root_body_index >= 0 ? root_body_index : -1; // Sync with selected body + gui_init(); bool paused = false; double speed_multiplier = 1.0; diff --git a/src/ui_renderer.cpp b/src/ui_renderer.cpp index bac8470..3801ea7 100644 --- a/src/ui_renderer.cpp +++ b/src/ui_renderer.cpp @@ -8,6 +8,11 @@ // raygui implementation (header-only library) #define RAYGUI_IMPLEMENTATION #include "raygui.h" +#include "amber/style_amber.h" + +void gui_init() { + GuiLoadStyleAmber(); +} // Render simulation information overlay void render_info(SimulationState* sim) { diff --git a/src/ui_renderer.h b/src/ui_renderer.h index e91e8d0..66f1c69 100644 --- a/src/ui_renderer.h +++ b/src/ui_renderer.h @@ -11,6 +11,8 @@ struct UIState { int body_list_active; // Active item index in body list }; +void gui_init(); + // UI rendering functions void render_info(SimulationState* sim); void render_body_list_ui(SimulationState* sim, RenderState* render_state, UIState* ui_state);