[−][src]Struct egui::widgets::ImageButton
A clickable image within a frame.
Implementations
impl ImageButton
[src]
pub fn new(texture_id: TextureId, desired_size: impl Into<Vec2>) -> Self
[src]
pub fn uv(self, uv: impl Into<Rect>) -> Self
[src]
Select UV range. Default is (0,0) in top-left, (1,1) bottom right.
pub fn tint(self, tint: impl Into<Color32>) -> Self
[src]
Multiply image color with this. Default is WHITE (no tint).
pub fn selected(self, selected: bool) -> Self
[src]
If true
, mark this button as "selected".
pub fn frame(self, frame: bool) -> Self
[src]
Turn off the frame
pub fn sense(self, sense: Sense) -> Self
[src]
By default, buttons senses clicks.
Change this to a drag-button with Sense::drag()
.
Trait Implementations
impl Clone for ImageButton
[src]
pub fn clone(&self) -> ImageButton
[src]
pub fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Debug for ImageButton
[src]
impl Widget for ImageButton
[src]
Auto Trait Implementations
impl RefUnwindSafe for ImageButton
[src]
impl Send for ImageButton
[src]
impl Sync for ImageButton
[src]
impl Unpin for ImageButton
[src]
impl UnwindSafe for ImageButton
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,