|
|
|
|
@ -76,9 +76,11 @@ gooDraw(SDL_Window* window, GameState* gs, RenderState* rs)
|
|
|
|
|
Begin("Gooey"); |
|
|
|
|
|
|
|
|
|
drawSimulationWindow(gs->running, gs->sim_time_ms, gs->sim_speed); |
|
|
|
|
drawMemoryWindow(gs->arena, rs); |
|
|
|
|
Separator(); |
|
|
|
|
|
|
|
|
|
// FIXME: testing tabs
|
|
|
|
|
if (BeginTabBar("tabbar_01")) { |
|
|
|
|
if (BeginTabItem("orbits")) { |
|
|
|
|
drawOrbitSelectionWindow(gs); |
|
|
|
|
GameOrbit* orbit = getSelectedOrbit(gs); |
|
|
|
|
|
|
|
|
|
@ -91,11 +93,23 @@ gooDraw(SDL_Window* window, GameState* gs, RenderState* rs)
|
|
|
|
|
Separator(); |
|
|
|
|
drawOrbitalElements(sys.elements); |
|
|
|
|
EndChild(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
BeginChild("impulsive maneuver", ImVec2(G_WIDTH - 20, 125), true); |
|
|
|
|
drawManeuverWindow(gs); |
|
|
|
|
EndChild(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
EndTabItem(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (BeginTabItem("resources")) { |
|
|
|
|
drawMemoryWindow(gs->arena, rs); |
|
|
|
|
EndTabItem(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
EndTabBar(); |
|
|
|
|
} |
|
|
|
|
// FIXME: end testing tabs
|
|
|
|
|
|
|
|
|
|
End(); |
|
|
|
|
Render(); |
|
|
|
|
@ -162,19 +176,27 @@ void drawOrbitSelectionWindow(GameState* gs)
|
|
|
|
|
|
|
|
|
|
BeginChild("orbit selection", ImVec2(G_WIDTH - 20, 55), true); |
|
|
|
|
|
|
|
|
|
const u32 label_len = 32; |
|
|
|
|
static char label[label_len]; |
|
|
|
|
static char selected_label[label_len]; |
|
|
|
|
|
|
|
|
|
if (BeginCombo("select orbit", selected_label)) { |
|
|
|
|
for (u32 i = 0; i < gs->num_orbits; i++) { |
|
|
|
|
GameOrbit& orbit = gs->orbits[i]; |
|
|
|
|
|
|
|
|
|
if (orbit.in_use) { |
|
|
|
|
const u32 label_len = 32; |
|
|
|
|
static char label[label_len]; |
|
|
|
|
snprintf(label, label_len, "Orbit %d", i); |
|
|
|
|
|
|
|
|
|
if (Selectable(label, orbit.selected)) |
|
|
|
|
if (Selectable(label, orbit.selected)) { |
|
|
|
|
selectOrbit(gs, &orbit); |
|
|
|
|
snprintf(selected_label, label_len, "Orbit %d", i); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
EndCombo(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
EndChild(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|