-
Notifications
You must be signed in to change notification settings - Fork 0
Button
Home | API by Category | Complete API Index | API Compatibility
| Field | Value |
|---|---|
| Full name | Electron2D.Button |
| Namespace | Electron2D |
| Kind | class |
| Category | UI and Text |
Provides a text button control.
public class Electron2D.Button : Electron2D.BaseButtonProfile: Electron2D 0.1.0 2D
Status: Supported / Parity verified
Out of profile: no
Godot reference: Button
Text button control backed by BaseButton input, signals, minimum size and basic text drawing.
Button builds on Electron2D.BaseButton and draws a simple text
label using the inherited font and font_size theme overrides.
This type is not synchronized. Create and mutate buttons on the main scene thread.
This type is available since Electron2D 0.1.0 Preview.
Electron2D.BaseButtonElectron2D.CheckBox
| Member | Kind | Summary |
|---|---|---|
Text |
Property | Gets or sets the text displayed by this button. |
Electron2D.Button() |
Constructor | Initializes a new instance of the Electron2D.Button class. |
_Draw() |
Method | Draws the button background and text. |
_GetMinimumSize() |
Method | Gets the minimum size requested by this button. |
Kind: Property
public System.String Text { get; set; }Gets or sets the text displayed by this button.
Assigning text queues a redraw. Empty text is valid and draws only the button background.
The button text. The value is never null.
-
System.ArgumentNullException: Thrown when the assigned value isnull.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Button
Kind: Constructor
public Electron2D.Button()Initializes a new instance of the Electron2D.Button class.
The new button inherits signal and focus defaults from
Electron2D.BaseButton.
This constructor is not synchronized. Call it from the main scene thread.
This constructor is available since Electron2D 0.1.0 Preview.
Electron2D.Button
Kind: Method
public System.Void _Draw()()Draws the button background and text.
The preview drawing path uses neutral colors and theme font overrides. Full theme style boxes are outside this task.
This callback is invoked on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.BaseButton
Kind: Method
public Electron2D.Vector2 _GetMinimumSize()()Gets the minimum size requested by this button.
If no font override is available, the method returns a conservative text-independent fallback.
A size large enough to contain the current text and button padding.
This callback is invoked on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control.GetMinimumSize
Electron2D 0.1.0 Preview API reference. Generated from 175 public runtime types.