Struct comfy_wgpu::egui::widgets::ImageButton
source · pub struct ImageButton { /* private fields */ }Expand description
A clickable image within a frame.
Implementations§
source§impl ImageButton
impl ImageButton
pub fn new( texture_id: impl Into<TextureId>, size: impl Into<Vec2> ) -> ImageButton
sourcepub fn uv(self, uv: impl Into<Rect>) -> ImageButton
pub fn uv(self, uv: impl Into<Rect>) -> ImageButton
Select UV range. Default is (0,0) in top-left, (1,1) bottom right.
sourcepub fn tint(self, tint: impl Into<Color32>) -> ImageButton
pub fn tint(self, tint: impl Into<Color32>) -> ImageButton
Multiply image color with this. Default is WHITE (no tint).
sourcepub fn selected(self, selected: bool) -> ImageButton
pub fn selected(self, selected: bool) -> ImageButton
If true, mark this button as “selected”.
sourcepub fn frame(self, frame: bool) -> ImageButton
pub fn frame(self, frame: bool) -> ImageButton
Turn off the frame
sourcepub fn sense(self, sense: Sense) -> ImageButton
pub fn sense(self, sense: Sense) -> ImageButton
By default, buttons senses clicks.
Change this to a drag-button with Sense::drag().
Trait Implementations§
source§impl Clone for ImageButton
impl Clone for ImageButton
source§fn clone(&self) -> ImageButton
fn clone(&self) -> ImageButton
Returns a copy 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 ImageButton
impl Debug for ImageButton
Auto Trait Implementations§
impl RefUnwindSafe for ImageButton
impl Send for ImageButton
impl Sync for ImageButton
impl Unpin for ImageButton
impl UnwindSafe for ImageButton
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