pub struct ControlState {
pub hovered: bool,
pub focused: bool,
pub clicked: bool,
pub active: bool,
pub scroll_delta: Option<Vec2i>,
}Expand description
Captures the interaction state for a widget during the current frame.
Fields§
§hovered: boolCursor is hovering the widget.
focused: boolWidget currently owns focus.
clicked: boolMouse was pressed on the widget this frame.
active: boolMouse is held down while the widget is focused.
scroll_delta: Option<Vec2i>Scroll delta consumed by this widget, if any.
Trait Implementations§
Source§impl Clone for ControlState
impl Clone for ControlState
Source§fn clone(&self) -> ControlState
fn clone(&self) -> ControlState
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ControlState
impl Debug for ControlState
Source§impl Default for ControlState
impl Default for ControlState
Source§fn default() -> ControlState
fn default() -> ControlState
Returns the “default value” for a type. Read more
impl Copy for ControlState
Auto Trait Implementations§
impl Freeze for ControlState
impl RefUnwindSafe for ControlState
impl Send for ControlState
impl Sync for ControlState
impl Unpin for ControlState
impl UnsafeUnpin for ControlState
impl UnwindSafe for ControlState
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