pub struct InspectorState {
pub mode: InspectorMode,
pub hover_pos: Option<(u16, u16)>,
pub selected: Option<HitId>,
pub widgets: Vec<WidgetInfo>,
pub show_detail_panel: bool,
pub style: InspectorStyle,
pub show_hits: bool,
pub show_bounds: bool,
pub show_names: bool,
pub show_times: bool,
/* private fields */
}Expand description
Inspector overlay state (shared across frames).
Fields§
§mode: InspectorModeCurrent display mode.
hover_pos: Option<(u16, u16)>Mouse position for hover detection.
selected: Option<HitId>Selected widget (clicked).
widgets: Vec<WidgetInfo>Collected widget info for current frame.
show_detail_panel: boolShow detailed panel.
style: InspectorStyleVisual style configuration.
show_hits: boolToggle for hit regions visibility (within mode).
show_bounds: boolToggle for widget bounds visibility (within mode).
show_names: boolToggle for widget name labels.
show_times: boolToggle for render time display.
Implementations§
Source§impl InspectorState
impl InspectorState
Sourcepub fn with_diagnostics(self) -> Self
pub fn with_diagnostics(self) -> Self
Create with diagnostic log enabled (for testing).
Sourcepub fn with_telemetry_hooks(self, hooks: TelemetryHooks) -> Self
pub fn with_telemetry_hooks(self, hooks: TelemetryHooks) -> Self
Create with telemetry hooks.
Sourcepub fn diagnostic_log(&self) -> Option<&DiagnosticLog>
pub fn diagnostic_log(&self) -> Option<&DiagnosticLog>
Get the diagnostic log (for testing).
Sourcepub fn diagnostic_log_mut(&mut self) -> Option<&mut DiagnosticLog>
pub fn diagnostic_log_mut(&mut self) -> Option<&mut DiagnosticLog>
Get mutable diagnostic log (for testing).
Sourcepub fn cycle_mode(&mut self)
pub fn cycle_mode(&mut self)
Cycle through display modes.
Sourcepub fn set_mode(&mut self, mode_num: u8)
pub fn set_mode(&mut self, mode_num: u8)
Set mode directly (0=Off, 1=HitRegions, 2=WidgetBounds, 3=Full).
Sourcepub fn clear_selection(&mut self)
pub fn clear_selection(&mut self)
Clear selection.
Sourcepub fn toggle_detail_panel(&mut self)
pub fn toggle_detail_panel(&mut self)
Toggle the detail panel.
Sourcepub fn toggle_hits(&mut self)
pub fn toggle_hits(&mut self)
Toggle hit regions visibility.
Sourcepub fn toggle_bounds(&mut self)
pub fn toggle_bounds(&mut self)
Toggle widget bounds visibility.
Sourcepub fn toggle_names(&mut self)
pub fn toggle_names(&mut self)
Toggle name labels visibility.
Sourcepub fn toggle_times(&mut self)
pub fn toggle_times(&mut self)
Toggle render time visibility.
Sourcepub fn clear_widgets(&mut self)
pub fn clear_widgets(&mut self)
Clear widget info for new frame.
Sourcepub fn register_widget(&mut self, info: WidgetInfo)
pub fn register_widget(&mut self, info: WidgetInfo)
Register a widget for inspection.
Sourcepub fn should_show_hits(&self) -> bool
pub fn should_show_hits(&self) -> bool
Check if we should render hit regions.
Sourcepub fn should_show_bounds(&self) -> bool
pub fn should_show_bounds(&self) -> bool
Check if we should render widget bounds.