Struct egui::widgets::ImageButton
source · pub struct ImageButton<'a> {
pub(crate) image: Image<'a>,
sense: Sense,
frame: bool,
selected: bool,
}
Expand description
A clickable image within a frame.
Fields§
§image: Image<'a>
§sense: Sense
§frame: bool
§selected: bool
Implementations§
source§impl<'a> ImageButton<'a>
impl<'a> ImageButton<'a>
pub fn new(image: impl Into<Image<'a>>) -> Self
sourcepub fn uv(self, uv: impl Into<Rect>) -> Self
pub fn uv(self, uv: impl Into<Rect>) -> Self
Select UV range. Default is (0,0) in top-left, (1,1) bottom right.
sourcepub fn tint(self, tint: impl Into<Color32>) -> Self
pub fn tint(self, tint: impl Into<Color32>) -> Self
Multiply image color with this. Default is WHITE (no tint).
Trait Implementations§
source§impl<'a> Clone for ImageButton<'a>
impl<'a> Clone for ImageButton<'a>
source§fn clone(&self) -> ImageButton<'a>
fn clone(&self) -> ImageButton<'a>
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<'a> Debug for ImageButton<'a>
impl<'a> Debug for ImageButton<'a>
Auto Trait Implementations§
impl<'a> Freeze for ImageButton<'a>
impl<'a> RefUnwindSafe for ImageButton<'a>
impl<'a> Send for ImageButton<'a>
impl<'a> Sync for ImageButton<'a>
impl<'a> Unpin for ImageButton<'a>
impl<'a> UnwindSafe for ImageButton<'a>
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