Struct egui::widgets::button::ImageButton
source · pub struct ImageButton {
image: Image,
sense: Sense,
frame: bool,
selected: bool,
}
Expand description
A clickable image within a frame.
Fields§
§image: Image
§sense: Sense
§frame: bool
§selected: bool
Implementations§
source§impl ImageButton
impl ImageButton
pub fn new(texture_id: impl Into<TextureId>, size: impl Into<Vec2>) -> 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.
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 more