[][src]Struct imgui::ImageButton

#[must_use]
pub struct ImageButton<'ui> { /* fields omitted */ }

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]

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]