pub struct Checkbox {
pub text: String,
pub rect: Rect,
pub color: Color,
pub bg_color: Color,
pub font: Option<Font>,
pub queue_free: bool,
pub uuid: &'static str,
pub box_rect: Rect,
pub value: bool,
pub hovering: bool,
pub pressed: bool,
pub is_just_pressed: bool,
}Expand description
Widget > Checkbox (Toggled bool value).
Fields§
§text: String§rect: Rect§color: Color§bg_color: Color§font: Option<Font>§queue_free: bool§uuid: &'static str§box_rect: Rect§value: bool§hovering: bool§pressed: bool§is_just_pressed: boolImplementations§
Source§impl Checkbox
impl Checkbox
pub fn new( text: &str, font: Option<Font>, ticked: Option<bool>, color: Option<Color>, uuid: Option<&'static str>, ) -> Self
pub fn set_uuid(&mut self, uuid: &'static str) -> &mut Self
pub fn set_text(&mut self, text: String) -> &mut Self
pub fn update( &mut self, selected: bool, mouse_position: Vec2, mouse_released: bool, )
pub fn render(&mut self)
Trait Implementations§
Auto Trait Implementations§
impl Freeze for Checkbox
impl RefUnwindSafe for Checkbox
impl Send for Checkbox
impl Sync for Checkbox
impl Unpin for Checkbox
impl UnwindSafe for Checkbox
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