Struct BaseButton
Base class for different kinds of buttons.
struct BaseButton
;
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.
Properties
Name | Type | Description |
---|---|---|
actionMode [get, set]
|
BaseButton | Determines when the button is considered clicked, one of the actionmode constants.
|
buttonMask [get, set]
|
long | Binary mask to choose which mouse buttons this button will respond to.
To allow both left-click and right-click, use BUTTON_MASK_LEFT | BUTTON_MASK_RIGHT .
|
disabled [get, set]
|
bool | If true , the button is in disabled state and can't be clicked or toggled.
|
enabledFocusMode [get, set]
|
Control | Focus access mode to use when switching between enabled/disabled (see Control and disabled ).
|
group [get, set]
|
ButtonGroup | ButtonGroup associated to the button.
|
keepPressedOutside [get, set]
|
bool | If true , the button stays pressed when moving the cursor outside the button while pressing it.
|
pressed [get, set]
|
bool | If true , the button's state is pressed. Means the button is pressed down or toggled (if toggleMode is active).
|
shortcut [get, set]
|
ShortCut | ShortCut associated to the button.
|
shortcutInTooltip [get, set]
|
bool | If true , the button will add information about its shortcut in the tooltip.
|
toggleMode [get, set]
|
bool | If true , the button is in toggle mode. Makes the button flip state between pressed and unpressed each time its area is clicked.
|
Methods
Name | Description |
---|---|
_guiInput
|
|
_pressed
|
Called when the button is pressed. |
_toggled
|
Called when the button is toggled (only if toggleMode is active).
|
_unhandledInput
|
|
getActionMode
|
|
getButtonGroup
|
|
getButtonMask
|
|
getDrawMode
|
Returns 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 drawmode enum.
|
getEnabledFocusMode
|
|
getShortcut
|
|
isDisabled
|
|
isHovered
|
Returns true if the mouse has entered the button and has not left it yet.
|
isKeepPressedOutside
|
|
isPressed
|
|
isShortcutInTooltipEnabled
|
|
isToggleMode
|
|
setActionMode
|
|
setButtonGroup
|
|
setButtonMask
|
|
setDisabled
|
|
setEnabledFocusMode
|
|
setKeepPressedOutside
|
|
setPressed
|
|
setShortcut
|
|
setShortcutInTooltip
|
|
setToggleMode
|
Enums
Name | Description |
---|---|
ActionMode
|
|
Constants
|
|
DrawMode
|