|
|
|
@ -390,7 +390,7 @@ void render_simulation(SimulationState* sim, RenderState* render_state) { |
|
|
|
EndMode3D(); |
|
|
|
EndMode3D(); |
|
|
|
|
|
|
|
|
|
|
|
// Render UI panels (always shown)
|
|
|
|
// Render UI panels (always shown)
|
|
|
|
render_info(sim, "solar_system.txt"); |
|
|
|
render_info(sim); |
|
|
|
render_body_list_ui(sim, render_state); |
|
|
|
render_body_list_ui(sim, render_state); |
|
|
|
render_body_info_ui(sim, render_state); |
|
|
|
render_body_info_ui(sim, render_state); |
|
|
|
|
|
|
|
|
|
|
|
@ -398,10 +398,10 @@ void render_simulation(SimulationState* sim, RenderState* render_state) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Render simulation information overlay
|
|
|
|
// Render simulation information overlay
|
|
|
|
void render_info(SimulationState* sim, const char* config_name) { |
|
|
|
void render_info(SimulationState* sim) { |
|
|
|
// Panel dimensions
|
|
|
|
// Panel dimensions
|
|
|
|
int panel_width = 200; |
|
|
|
int panel_width = 200; |
|
|
|
int panel_height = 280; |
|
|
|
int panel_height = 300; |
|
|
|
int panel_x = 10; |
|
|
|
int panel_x = 10; |
|
|
|
int panel_y = GetScreenHeight() - panel_height - 10; |
|
|
|
int panel_y = GetScreenHeight() - panel_height - 10; |
|
|
|
|
|
|
|
|
|
|
|
@ -415,10 +415,15 @@ void render_info(SimulationState* sim, const char* config_name) { |
|
|
|
// Prepare info text
|
|
|
|
// Prepare info text
|
|
|
|
char info_text[1024]; |
|
|
|
char info_text[1024]; |
|
|
|
char temp_buffer[256]; |
|
|
|
char temp_buffer[256]; |
|
|
|
int offset = 0; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
snprintf(info_text, sizeof(info_text), "Orbital Mechanics Simulation\n\n"); |
|
|
|
snprintf(info_text, sizeof(info_text), "Orbital Mechanics Simulation\n\n"); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// Config name
|
|
|
|
|
|
|
|
if (sim->config_name[0] != '\0') { |
|
|
|
|
|
|
|
snprintf(temp_buffer, sizeof(temp_buffer), "Config: %s\n\n", sim->config_name); |
|
|
|
|
|
|
|
strcat(info_text, temp_buffer); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// Simulation time (in days)
|
|
|
|
// Simulation time (in days)
|
|
|
|
double days = sim->time / 86400.0; // seconds to days
|
|
|
|
double days = sim->time / 86400.0; // seconds to days
|
|
|
|
snprintf(temp_buffer, sizeof(temp_buffer), "Time: %.2f days\n", days); |
|
|
|
snprintf(temp_buffer, sizeof(temp_buffer), "Time: %.2f days\n", days); |
|
|
|
|