-
Notifications
You must be signed in to change notification settings - Fork 0
BaseButton
Home | API by Category | Complete API Index | API Compatibility
| Field | Value |
|---|---|
| Full name | Electron2D.BaseButton |
| Namespace | Electron2D |
| Kind | class |
| Category | UI and Text |
Provides shared input, focus and signal behavior for button controls.
public class Electron2D.BaseButton : Electron2D.ControlProfile: Electron2D 0.1.0 2D
Status: Supported / Parity verified
Out of profile: no
Godot reference: BaseButton
Shared button input, focus, disabled state, toggle state, action mode and button_down/button_up/pressed/toggled signals.
BaseButton handles pointer, touch, keyboard and gamepad activation.
Derived controls provide visual content such as text, check marks or
textures.
The following signals are available: button_down,
button_up, pressed and toggled.
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.ButtonElectron2D.CheckBoxElectron2D.TextureButton
| Member | Kind | Summary |
|---|---|---|
ActionMode |
Property | Gets or sets when this button activates. |
ButtonPressed |
Property | Gets or sets whether this button is currently pressed as a toggle. |
Disabled |
Property | Gets or sets whether this button is disabled. |
ToggleMode |
Property | Gets or sets whether this button toggles its pressed state. |
Electron2D.BaseButton() |
Constructor | Initializes a new instance of the Electron2D.BaseButton class. |
_GuiInput(Electron2D.InputEvent) |
Method | Handles GUI input routed to this button. |
Kind: Property
public Electron2D.BaseButton.ActionModeEnum ActionMode { get; set; }Gets or sets when this button activates.
Electron2D.BaseButton.ActionModeEnum.ButtonRelease is the default. It lets users
cancel pointer/touch activation by releasing outside the control.
A value that controls whether activation happens on press or release.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.BaseButton.ActionModeEnum
Kind: Property
public System.Boolean ButtonPressed { get; set; }Gets or sets whether this button is currently pressed as a toggle.
User activation changes this property only when Electron2D.BaseButton.ToggleMode
is enabled. Assigning this property directly updates state without
emitting pressed or toggled.
true when the button is in the pressed state; otherwise,
false.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.BaseButton.ToggleMode
Kind: Property
public System.Boolean Disabled { get; set; }Gets or sets whether this button is disabled.
Disabled buttons ignore pointer, touch, keyboard and gamepad input and cannot receive focus.
true when input and focus are disabled; otherwise, false.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.Control.FocusMode
Kind: Property
public System.Boolean ToggleMode { get; set; }Gets or sets whether this button toggles its pressed state.
Toggle buttons emit toggled with the new
Electron2D.BaseButton.ButtonPressed value when activated.
true for toggle behavior; otherwise, false.
This property is not synchronized. Mutate it on the main scene thread.
This property is available since Electron2D 0.1.0 Preview.
Electron2D.BaseButton.ButtonPressed
Kind: Constructor
public Electron2D.BaseButton()Initializes a new instance of the Electron2D.BaseButton class.
The constructor registers the standard button signals and enables keyboard/gamepad focus by default.
This constructor is not synchronized. Call it from the main scene thread.
This constructor is available since Electron2D 0.1.0 Preview.
Electron2D.BaseButton
Kind: Method
public System.Void _GuiInput(Electron2D.InputEvent)(Electron2D.InputEvent inputEvent)Handles GUI input routed to this button.
This method consumes supported activation input through
Electron2D.Control.AcceptEvent after updating button state.
-
inputEvent: The input event delivered by the viewport.
This callback is invoked on the main scene thread.
This method is available since Electron2D 0.1.0 Preview.
Electron2D.Control._GuiInput(Electron2D.InputEvent)
Electron2D 0.1.0 Preview API reference. Generated from 175 public runtime types.