pub struct ButtonResponse {
pub clicked: bool,
pub hovered: bool,
pub pressed: bool,
pub state: WidgetState,
pub rect: Rect,
}Expand description
Button interaction response (used by Context::button)
Fields§
§clicked: boolWhether button was clicked this frame
hovered: boolWhether button is currently hovered
pressed: boolWhether button is currently pressed
state: WidgetStateCurrent widget state
rect: RectButton rectangle (for platform rendering)
Trait Implementations§
Source§impl Clone for ButtonResponse
impl Clone for ButtonResponse
Source§fn clone(&self) -> ButtonResponse
fn clone(&self) -> ButtonResponse
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 ButtonResponse
impl Debug for ButtonResponse
Source§impl Default for ButtonResponse
impl Default for ButtonResponse
Source§fn default() -> ButtonResponse
fn default() -> ButtonResponse
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for ButtonResponse
impl<'de> Deserialize<'de> for ButtonResponse
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ButtonResponse
impl RefUnwindSafe for ButtonResponse
impl Send for ButtonResponse
impl Sync for ButtonResponse
impl Unpin for ButtonResponse
impl UnsafeUnpin for ButtonResponse
impl UnwindSafe for ButtonResponse
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