pub struct ImageButton<'ui, StrId> { /* private fields */ }
Expand description
Builder for an image button widget
Implementations§
Source§impl ImageButton<'static, ()>
impl ImageButton<'static, ()>
Source§impl<'ui, StrId> ImageButton<'ui, StrId>
impl<'ui, StrId> ImageButton<'ui, StrId>
Sourcepub fn new_with_id(
ui: &'ui Ui,
str_id: StrId,
texture_id: TextureId,
size: impl Into<Vector2<f32>>,
) -> ImageButton<'ui, StrId>
👎Deprecated since 0.10.0: Use ui.image_button_config(...)
instead
pub fn new_with_id( ui: &'ui Ui, str_id: StrId, texture_id: TextureId, size: impl Into<Vector2<f32>>, ) -> ImageButton<'ui, StrId>
ui.image_button_config(...)
insteadCreates a new image button builder with the given texture and size
Sourcepub fn size(self, size: impl Into<Vector2<f32>>) -> ImageButton<'ui, StrId>
👎Deprecated: just set the size in the new
constructor.
pub fn size(self, size: impl Into<Vector2<f32>>) -> ImageButton<'ui, StrId>
new
constructor.Sets the image button size
Sourcepub fn uv0(self, uv0: impl Into<Vector2<f32>>) -> ImageButton<'ui, StrId>
pub fn uv0(self, uv0: impl Into<Vector2<f32>>) -> ImageButton<'ui, StrId>
Sets uv0 (default [0.0, 0.0]
)
Sourcepub fn uv1(self, uv1: impl Into<Vector2<f32>>) -> ImageButton<'ui, StrId>
pub fn uv1(self, uv1: impl Into<Vector2<f32>>) -> ImageButton<'ui, StrId>
Sets uv1 (default [1.0, 1.0]
)
Sourcepub fn background_col(
self,
bg_col: impl Into<Vector4<f32>>,
) -> ImageButton<'ui, StrId>
pub fn background_col( self, bg_col: impl Into<Vector4<f32>>, ) -> ImageButton<'ui, StrId>
Sets the background color (default: no background color)
Trait Implementations§
Source§impl<'ui, StrId> Clone for ImageButton<'ui, StrId>where
StrId: Clone,
impl<'ui, StrId> Clone for ImageButton<'ui, StrId>where
StrId: Clone,
Source§fn clone(&self) -> ImageButton<'ui, StrId>
fn clone(&self) -> ImageButton<'ui, StrId>
Returns a duplicate 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<'ui, StrId> Debug for ImageButton<'ui, StrId>where
StrId: Debug,
impl<'ui, StrId> Debug for ImageButton<'ui, StrId>where
StrId: Debug,
impl<'ui, StrId> Copy for ImageButton<'ui, StrId>where
StrId: Copy,
Auto Trait Implementations§
impl<'ui, StrId> Freeze for ImageButton<'ui, StrId>where
StrId: Freeze,
impl<'ui, StrId> !RefUnwindSafe for ImageButton<'ui, StrId>
impl<'ui, StrId> !Send for ImageButton<'ui, StrId>
impl<'ui, StrId> !Sync for ImageButton<'ui, StrId>
impl<'ui, StrId> Unpin for ImageButton<'ui, StrId>where
StrId: Unpin,
impl<'ui, StrId> !UnwindSafe for ImageButton<'ui, StrId>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more