Standard themed Button.
    public class Button : BaseButton

Button is the standard themed button. It can contain text and an icon, and will display them according to the current Theme.

Inheritance Chain

Derived Classes

Constructors

    public Button()

Properties

    public TextAlign Align { get; set; }

Text alignment policy for the button’s text, use one of the ALIGN_* constants.

    public bool ClipText { get; set; }

When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text.

    public bool ExpandIcon { get; set; }

When enabled, the button’s icon will expand/shrink to fit the button’s size while keeping its aspect.

    public bool Flat { get; set; }

Flat buttons don’t display decoration.

    public Texture Icon { get; set; }

Button’s icon, if text is present the icon will be placed before the text.

    public string Text { get; set; }

The button’s text that will be displayed inside the button’s area.

Methods

    [Obsolete("GetButtonIcon is deprecated. Use the Icon property instead.")]
    public Texture GetButtonIcon()

Getter for Icon

    [Obsolete("GetClipText is deprecated. Use the ClipText property instead.")]
    public bool GetClipText()

Getter for ClipText

    [Obsolete("GetText is deprecated. Use the Text property instead.")]
    public string GetText()

Getter for Text

    [Obsolete("GetTextAlign is deprecated. Use the Align property instead.")]
    public TextAlign GetTextAlign()

Getter for Align

    [Obsolete("IsExpandIcon is deprecated. Use the ExpandIcon property instead.")]
    public bool IsExpandIcon()

Getter for ExpandIcon

    [Obsolete("IsFlat is deprecated. Use the Flat property instead.")]
    public bool IsFlat()

Getter for Flat

    [Obsolete("SetButtonIcon is deprecated. Use the Icon property instead.")]
    public void SetButtonIcon(Texture texture)

Setter for Icon

    [Obsolete("SetClipText is deprecated. Use the ClipText property instead.")]
    public void SetClipText(bool enabled)

Setter for ClipText

    [Obsolete("SetExpandIcon is deprecated. Use the ExpandIcon property instead.")]
    public void SetExpandIcon(bool arg0)

Setter for ExpandIcon

    [Obsolete("SetFlat is deprecated. Use the Flat property instead.")]
    public void SetFlat(bool enabled)

Setter for Flat

    [Obsolete("SetText is deprecated. Use the Text property instead.")]
    public void SetText(string text)

Setter for Text

    [Obsolete("SetTextAlign is deprecated. Use the Align property instead.")]
    public void SetTextAlign(TextAlign align)

Setter for Align

Inner Types

TextAlign

Name Value Description
Left 0 Align the text to the left.
Center 1 Align the text to the center.
Right 2 Align the text to the right.
Tags: