Browse Source

set a different default UI style

main
cinnaboot 6 months ago
parent
commit
3a6d6755b5
  1. 7
      Makefile
  2. 5
      src/main.cpp
  3. 5
      src/ui_renderer.cpp
  4. 2
      src/ui_renderer.h

7
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

5
src/main.cpp

@ -9,8 +9,8 @@
#include <cmath>
// 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;

5
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) {

2
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);

Loading…
Cancel
Save