diff --git a/src/gooey.cpp b/src/gooey.cpp index 662808a..79ae9fe 100644 --- a/src/gooey.cpp +++ b/src/gooey.cpp @@ -79,7 +79,7 @@ gooDraw(SDL_Window* window, GameState* gs) // FIXME: slit up orbit window into function calls here drawOrbitWindow(gs); - BeginChild("impulsive maneuver", ImVec2(G_WIDTH - 20, 300), true); + BeginChild("impulsive maneuver", ImVec2(G_WIDTH - 20, 150), true); drawManeuverWindow(gs); EndChild(); #if 0 @@ -141,7 +141,7 @@ void drawOrbitWindow(GameState* gs) && gs->orbits[selected].in_use) { TwoBodySystem& sys = gs->orbits[selected].system; - BeginChild("orbit details", ImVec2(G_WIDTH - 20, 400), true); + BeginChild("orbit details", ImVec2(G_WIDTH - 20, 500), true); Text("Selected Orbit#: %d", selected); //Text("Orbital Period: %.2fs", sys.orbital_period); drawSystemWindow(sys); @@ -149,6 +149,8 @@ void drawOrbitWindow(GameState* gs) drawGravitationalBody(sys.body); Separator(); drawSatelliteWindow(sys.sat); + Separator(); + drawOrbitalElements(sys.elements); EndChild(); } @@ -174,14 +176,15 @@ void drawGravitationalBody(GravBody& body) void drawOrbitalElements(OrbitalElements& el) { - if (CollapsingHeader("Orbital Elements", H_FLAGS)) { + Text("Orbital Elements:"); + Indent(); Text("semi_major axis, a: %f km", el.a); Text("eccentricity, e: %f", el.e); Text("iota, inclination: %f", el.iota); Text("ohm, longitude ascending node: %f", el.ohm); Text("omega, argument of periapsis: %f", el.omega); Text("nu, true anomaly at T0: %f", el.nu); - } + Unindent(); } void @@ -189,16 +192,16 @@ drawSatelliteWindow(Satellite& sat) { Text("Satellite Parameters:"); Indent(); - Text("theta, true anomaly: %f", sat.theta); - Text("r, radial distance: %f km", sat.r); - Text("position:"); + Text("theta, true anomaly: %f", sat.theta); + Text("r, radial distance: %f km", sat.r); + Text("position:"); Indent(); - Text("x: %f km", sat.position.x); - Text("y: %f km", sat.position.y); - Text("z: %f km", sat.position.z); + Text("x: %f km", sat.position.x); + Text("y: %f km", sat.position.y); + Text("z: %f km", sat.position.z); Unindent(); - Text("velocity, km/s: %f", sat.v); - Text("flight path angle: %f", sat.gamma); + Text("velocity, km/s: %f", sat.v); + Text("flight path angle: %f", sat.gamma); Unindent(); }