pub struct UiState { /* private fields */ }Expand description
Tracks per-widget interaction state across frames.
Implementations§
Source§impl UiState
impl UiState
Sourcepub fn id_from_label(label: &str) -> u64
pub fn id_from_label(label: &str) -> u64
Generate a stable ID from a label string.
Sourcepub fn is_hovered(&self, id: u64) -> bool
pub fn is_hovered(&self, id: u64) -> bool
Check if a widget is hovered.
Sourcepub fn is_focused(&self, id: u64) -> bool
pub fn is_focused(&self, id: u64) -> bool
Check if a widget is focused (for text input).
Sourcepub fn update_animations(&mut self, dt: f32, speed: f32)
pub fn update_animations(&mut self, dt: f32, speed: f32)
Update hover animations.
Sourcepub fn begin_frame(&mut self)
pub fn begin_frame(&mut self)
Begin a new frame — reset per-frame state.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for UiState
impl RefUnwindSafe for UiState
impl Send for UiState
impl Sync for UiState
impl Unpin for UiState
impl UnsafeUnpin for UiState
impl UnwindSafe for UiState
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more