[][src]Struct imgui::ImageButton

#[must_use]pub struct ImageButton { /* fields omitted */ }

Builder for an image button widget

Implementations

impl ImageButton[src]

pub fn new(texture_id: TextureId, size: [f32; 2]) -> ImageButton[src]

Creates a new image button builder with the given texture and size

pub fn size(self, size: [f32; 2]) -> Self[src]

Sets the image button size

pub fn uv0(self, uv0: [f32; 2]) -> Self[src]

Sets uv0 (default [0.0, 0.0])

pub fn uv1(self, uv1: [f32; 2]) -> Self[src]

Sets uv1 (default [1.0, 1.0])

pub fn frame_padding(self, frame_padding: i32) -> Self[src]

Sets the frame padding (default: uses frame padding from style).

  • < 0: uses frame padding from style (default)
  • = 0: no framing
  • > 0: set framing size

pub fn background_col(self, bg_col: [f32; 4]) -> Self[src]

Sets the background color (default: no background color)

pub fn tint_col(self, tint_col: [f32; 4]) -> Self[src]

Sets the tint color (default: no tint color)

pub fn build(self, _: &Ui) -> bool[src]

Builds the image button

Trait Implementations

impl Clone for ImageButton[src]

impl Copy for ImageButton[src]

impl Debug for ImageButton[src]

Auto Trait Implementations

Blanket Implementations

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

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

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

impl<T> From<T> for T[src]

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

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

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.