Added user experience improvements:
- Keyboard shortcuts: ESC to cancel, ENTER to confirm
- Enhanced error messages with detailed descriptions
- Hohmann tab input validation
- Error message display in Hohmann tab
- Edge case handling for all input scenarios
- Clear error messages when tab switches
Keyboard shortcuts work for all dialog tabs and delete confirmation.
Added complete Hohmann transfer calculation and UI:
- Spacecraft, Transfer Parent, Current Body, Target Body selectors
- Calculate Transfer button with real-time calculation
- Results panel showing dv1, dv2, transfer time, semi-major axis
- Create Both Burns / Create Burn 1 Only buttons
- Auto-generated maneuver names with format 'Hohmann Burn N (Source→Target)'
- Proper field initialization and validation
Fixed body selector logic with separate current_body_index field.
Wrapped GuiDropdownBox calls in render_maneuver_create_tab() with validity checks:
- Direction dropdown: Only renders when craft_index is valid
- Trigger dropdown: Only renders when craft_index is valid
- Prevents accessing invalid array indices
- Makes UI more robust
Dropdowns now only appear when spacecraft is properly selected.
Added automatic name generation for new maneuvers:
- generate_maneuver_name() creates sensible names (e.g., 'Prograde #1', 'Retrograde @ ν=3.14 #2')
- Names based on burn direction, trigger type, and burn number
- User can still manually edit names if desired
- Validation now allows empty names (for auto-generation)
- Integrates with existing create_maneuver_from_dialog() workflow
Users can create maneuvers faster with auto-generated names, or override with custom names.
Fixed segfault at ui_renderer.cpp:503 by adding proper initialization:
- All ManeuverDialogState fields initialized in main()
- Dialog opening resets fields to safe defaults
- trigger_type_active, direction_active, delta_v now initialized to valid values
- name, error_message initialized to empty strings
- Preview and error flags initialized to false
Dialog now opens and runs without crashing.
Implemented complete Create tab workflow for maneuver management dialog:
- render_maneuver_create_tab() with all input widgets
- update_orbital_preview() using preview_burn_result()
- render_orbital_preview() for displaying burn results
- validate_maneuver_inputs() for input validation
- create_maneuver_from_dialog() using add_maneuver_to_simulation()
- update_maneuver_from_dialog() for editing existing maneuvers
- Dialog opens/closes from maneuver list button
- Real-time orbital preview with color-coded validation
All tests pass. Phase 1 (Foundation) and Phase 2 (Create Tab) complete.
- Remove unconditional reset of ui_state.selected_craft_index in render_body_list_ui()
- Only reset ui_state.selected_craft_index to -1 when body is selected
- This prevents panel from disappearing in subsequent frames when spacecraft remains selected
- Remove selected_craft_index from RenderState, move to UIState
- Camera now always targets bodies (directly selected or parent of selected spacecraft)
- UI handles all spacecraft selection logic
- Remove ~30 lines of duplicate/special-case code from renderer
- Update all renderer functions to single body-focused path
- Update UI rendering functions to use ui_state->selected_craft_index
- Rename CelestialBody/Spacecraft position/velocity to global_*
- Add OrbitalElements struct to both bodies and spacecraft
- Rename old OrbitalElements to OrbitalMetrics (for output/analysis)
- Update all references throughout codebase
- Preserve parent_index in outer structs (not in OrbitalElements)
- Build succeeds with only unused variable warning
- Create ui_renderer.cpp/h with all raygui UI panel rendering functions
- Remove UI rendering code from renderer.cpp (421 lines moved)
- Remove UI state fields from RenderState, create separate UIState struct
- Remove raygui dependency from renderer module
- Update main.cpp to initialize UIState and call UI render functions
- Update documentation to reflect new module structure
- Improve separation of concerns between 3D rendering and UI overlays