BaseButton

Base class for different kinds of buttons.

BaseButton is the abstract base class for buttons, so it shouldn't be used directly (it doesn't display anything). Other types of buttons inherit from it.

@GodotBaseClass
struct BaseButton {}

Members

Aliases

BaseClasses
alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses)
Undocumented in source.

Enums

ActionMode
enum ActionMode
Constants
enum Constants
DrawMode
enum DrawMode

Functions

_guiInput
void _guiInput(InputEvent arg0)
_pressed
void _pressed()

Called when the button is pressed.

_toggled
void _toggled(bool button_pressed)

Called when the button is toggled (only if toggle_mode is active).

_unhandledInput
void _unhandledInput(InputEvent arg0)
getActionMode
BaseButton.ActionMode getActionMode()
getButtonGroup
Ref!ButtonGroup getButtonGroup()
getButtonMask
long getButtonMask()
getDrawMode
BaseButton.DrawMode getDrawMode()

Return the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the DRAW_* enum.

getEnabledFocusMode
Control.FocusMode getEnabledFocusMode()
getShortcut
Ref!ShortCut getShortcut()
isDisabled
bool isDisabled()
isHovered
bool isHovered()

Return true if the mouse has entered the button and has not left it yet.

isPressed
bool isPressed()
isToggleMode
bool isToggleMode()
opAssign
BaseButton opAssign(T n)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(BaseButton other)
Undocumented in source. Be warned that the author may not have intended to support it.
opEquals
bool opEquals(typeof(null) n)
Undocumented in source. Be warned that the author may not have intended to support it.
setActionMode
void setActionMode(long mode)
setButtonGroup
void setButtonGroup(ButtonGroup button_group)
setButtonMask
void setButtonMask(long mask)
setDisabled
void setDisabled(bool disabled)
setEnabledFocusMode
void setEnabledFocusMode(long mode)
setPressed
void setPressed(bool pressed)
setShortcut
void setShortcut(ShortCut shortcut)
setToggleMode
void setToggleMode(bool enabled)

Mixins

__anonymous
mixin baseCasts
Undocumented in source.

Properties

actionMode
BaseButton.ActionMode actionMode [@property getter]
long actionMode [@property setter]

Determines when the button is considered clicked, one of the ACTION_MODE_* constants.

buttonMask
long buttonMask [@property getter]
long buttonMask [@property setter]

Binary mask to choose which mouse buttons this button will respond to. To allow both left-click and right-click, set this to 3, because it's BUTTON_MASK_LEFT | BUTTON_MASK_RIGHT.

disabled
bool disabled [@property getter]
bool disabled [@property setter]

If true the button is in disabled state and can't be clicked or toggled.

enabledFocusMode
Control.FocusMode enabledFocusMode [@property getter]
long enabledFocusMode [@property setter]

Focus access mode to use when switching between enabled/disabled (see Control.setFocusMode and disabled).

group
ButtonGroup group [@property setter]

ButtonGroup associated to the button.

group
ButtonGroup group [@property getter]

ButtonGroup associated to the button.

pressed
bool pressed [@property getter]
bool pressed [@property setter]

If true the button's state is pressed. Means the button is pressed down or toggled (if toggle_mode is active).

shortcut
ShortCut shortcut [@property getter]
ShortCut shortcut [@property setter]

Shortcut associated to the button.

toggleMode
bool toggleMode [@property getter]
bool toggleMode [@property setter]

If true the button is in toggle mode. Makes the button flip state between pressed and unpressed each time its area is clicked.

Static functions

_new
BaseButton _new()
Undocumented in source. Be warned that the author may not have intended to support it.

Static variables

_classBindingInitialized
bool _classBindingInitialized;
Undocumented in source.

Structs

_classBinding
struct _classBinding
Undocumented in source.

Unions

__anonymous
union __anonymous
Undocumented in source.

Variables

_GODOT_internal_name
enum string _GODOT_internal_name;
Undocumented in source.

Mixed In Members

From mixin baseCasts

as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
To as()
Undocumented in source. Be warned that the author may not have intended to support it.
as
ToRef as()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(To)
Undocumented in source.
opCast
template opCast(ToRef)
Undocumented in source.
opCast
void* opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
godot_object opCast()
Undocumented in source. Be warned that the author may not have intended to support it.
opCast
bool opCast()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta