Browse Source

Fix documentation: UIState fields moved from RenderState

main
cinnaboot 5 months ago
parent
commit
a3f2731af3
  1. 2
      docs/planning/rendering-cleanup-plan.md
  2. 16
      docs/rendering.md
  3. 5
      docs/technical_reference.md

2
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

16
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)
};
```

5
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

Loading…
Cancel
Save