[][src]Enum widgetry::widgets::button::BtnBuilder

pub enum BtnBuilder {
    SVG {
        path: String,
        rewrite_hover: RewriteColor,
        maybe_tooltip: Option<Text>,
    },
    TextFG(StringTextOption<Text>),
    PlainText {
        label: String,
        txt: Text,
        maybe_tooltip: Option<Text>,
    },
    TextBG {
        label: String,
        maybe_tooltip: Option<Text>,
        text: Text,
        unselected_bg_color: Color,
        selected_bg_color: Color,
    },
    Custom {
        normal: GeomBatch,
        hovered: GeomBatch,
        hitbox: Polygon,
        maybe_tooltip: Option<Text>,
        maybe_outline: Option<(f64, Color)>,
    },
}

Variants

SVG

Fields of SVG

path: Stringrewrite_hover: RewriteColormaybe_tooltip: Option<Text>
TextFG(StringTextOption<Text>)
PlainText

Fields of PlainText

label: Stringtxt: Textmaybe_tooltip: Option<Text>
TextBG

Fields of TextBG

label: Stringmaybe_tooltip: Option<Text>text: Textunselected_bg_color: Colorselected_bg_color: Color
Custom

Fields of Custom

normal: GeomBatchhovered: GeomBatchhitbox: Polygonmaybe_tooltip: Option<Text>maybe_outline: Option<(f64, Color)>

Implementations

impl BtnBuilder[src]

pub fn tooltip(self, tooltip: Text) -> BtnBuilder[src]

pub fn build<I: Into<String>, MK: Into<Option<MultiKey>>>(
    self,
    ctx: &EventCtx<'_>,
    action_tooltip: I,
    key: MK
) -> Widget
[src]

pub fn build_def<MK: Into<Option<MultiKey>>>(
    self,
    ctx: &EventCtx<'_>,
    key: MK
) -> Widget
[src]

pub fn inactive(self, ctx: &EventCtx<'_>) -> Widget[src]

Auto Trait Implementations

impl RefUnwindSafe for BtnBuilder

impl Send for BtnBuilder

impl Sync for BtnBuilder

impl Unpin for BtnBuilder

impl UnwindSafe for BtnBuilder

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> Downcast for T where
    T: Any

impl<T> DowncastSync for T where
    T: Send + Sync + Any

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<V, T> VZip<V> for T where
    V: MultiLane<T>,