diff --git a/docs/planning/rendering-cleanup-plan.md b/docs/planning/rendering-cleanup-plan.md index 08022ef..32b4813 100644 --- a/docs/planning/rendering-cleanup-plan.md +++ b/docs/planning/rendering-cleanup-plan.md @@ -77,7 +77,7 @@ Remove all spacecraft texture-related code: - Replace magic numbers in `draw_child_indicator()` function - **PAUSE** for user review -### Step 8: Fix Documentation Inconsistency +### Step 8: Fix Documentation Inconsistency [COMPLETED] - Update docs/rendering.md line 16 to reflect that `selected_craft_index` is in UIState, not RenderState - Update any other documentation that references this field location - **PAUSE** for user review diff --git a/docs/rendering.md b/docs/rendering.md index a1d6ed2..8c0b846 100644 --- a/docs/rendering.md +++ b/docs/rendering.md @@ -12,12 +12,20 @@ struct RenderState { double distance_scale; // Scale factor for distances double size_scale; // Scale factor for body sizes int selected_body_index; // -1 = no selection - int selected_craft_index; // -1 = no selection - int last_target_index; // Tracks body or craft index (negative = spacecraft) + bool camera_target_enabled; // Whether camera follows selected body + Vector3 camera_offset; // Offset from target when following body + int last_target_index; // Tracks body index for change detection + Texture2D maneuver_textures[6]; // One per burn direction + bool texture_loaded; +}; +``` + +### UIState (ui_renderer.h) +```cpp +struct UIState { int body_list_scroll; // Scroll position for body list int body_list_active; // Active item index in body list - bool camera_target_enabled; // Whether camera follows selected body/craft - Vector3 camera_offset; // Offset from target when following body + int selected_craft_index; // Selected spacecraft index (-1 = no selection) }; ``` diff --git a/docs/technical_reference.md b/docs/technical_reference.md index d764159..b574f0f 100644 --- a/docs/technical_reference.md +++ b/docs/technical_reference.md @@ -406,9 +406,10 @@ Raygui-based UI system for rendering interactive panels. Handles all 2D overlay - `render_body_info_ui()` - Top-right panel showing selected object details - `render_maneuver_list_ui()` - Maneuver list panel for spacecraft planning -**UI State:** +**UI State (UIState struct):** - `body_list_scroll` - Scroll position for objects list -- `body_list_active` - Currently selected item index +- `body_list_active` - Currently selected item index in body list +- `selected_craft_index` - Selected spacecraft index (-1 = no selection) **Implementation:** - Uses raygui header-only library