[−][src]Struct imgui::ImageButton
Represent an image button about to be drawn.
See Ui::image_button
.
Create your image button using the builder pattern then ImageButton::build
it.
Methods
impl<'ui> ImageButton<'ui>
[src]
pub fn new(_: &Ui<'ui>, texture_id: TextureId, size: [f32; 2]) -> Self
[src]
pub fn size(self, size: [f32; 2]) -> Self
[src]
Set size (default based on texture)
pub fn uv0(self, uv0: [f32; 2]) -> Self
[src]
Set uv0 (default [0.0, 0.0]
)
pub fn uv1(self, uv1: [f32; 2]) -> Self
[src]
Set uv1 (default [1.0, 1.0]
)
pub fn frame_padding(self, frame_padding: i32) -> Self
[src]
Set frame padding (default: uses frame padding from style). frame_padding < 0: uses frame padding from style (default) frame_padding = 0: no framing frame_padding > 0: set framing size
pub fn tint_col(self, tint_col: [f32; 4]) -> Self
[src]
Set tint color (default: no tint color)
pub fn background_col(self, bg_col: [f32; 4]) -> Self
[src]
Set background color (default: no background color)
pub fn build(self) -> bool
[src]
Draw image button where the cursor currently is
Auto Trait Implementations
impl<'ui> !Send for ImageButton<'ui>
impl<'ui> Unpin for ImageButton<'ui>
impl<'ui> !Sync for ImageButton<'ui>
impl<'ui> !UnwindSafe for ImageButton<'ui>
impl<'ui> !RefUnwindSafe for ImageButton<'ui>
Blanket Implementations
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
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.
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>,
type Error = <U as TryFrom<T>>::Error
The type returned in the event of a conversion error.
fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>
[src]
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,