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


    public Button()


    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. This property is disabled by default.

    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.


    public Texture GetButtonIcon()

Getter for Icon

    public bool GetClipText()

Getter for ClipText

    public string GetText()

Getter for Text

    public TextAlign GetTextAlign()

Getter for Align

    public bool IsFlat()

Getter for Flat

    public void SetButtonIcon(Texture texture)

Setter for Icon

    public void SetClipText(bool enabled)

Setter for ClipText

    public void SetFlat(bool enabled)

Setter for Flat

    public void SetText(string text)

Setter for Text

    public void SetTextAlign(TextAlign align)

Setter for Align

Inner Types


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.