Add a binary mask to allow configuration of which mouse buttons the BaseButton will respond to.
This commit is contained in:
parent
eceba5aa6a
commit
ed69345a19
3 changed files with 26 additions and 4 deletions
|
|
@ -15,7 +15,7 @@
|
|||
<return type="void">
|
||||
</return>
|
||||
<description>
|
||||
Called when button is pressed.
|
||||
Called when the button is pressed.
|
||||
</description>
|
||||
</method>
|
||||
<method name="_toggled" qualifiers="virtual">
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
<argument index="0" name="button_pressed" type="bool">
|
||||
</argument>
|
||||
<description>
|
||||
Called when button is toggled (only if toggle_mode is active).
|
||||
Called when the button is toggled (only if toggle_mode is active).
|
||||
</description>
|
||||
</method>
|
||||
<method name="get_draw_mode" qualifiers="const">
|
||||
|
|
@ -38,7 +38,7 @@
|
|||
<return type="bool">
|
||||
</return>
|
||||
<description>
|
||||
Return true if mouse entered the button before it exit.
|
||||
Return true if the mouse has entered the button and has not left it yet.
|
||||
</description>
|
||||
</method>
|
||||
</methods>
|
||||
|
|
@ -46,6 +46,10 @@
|
|||
<member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="BaseButton.ActionMode">
|
||||
Determines when the button is considered clicked, one of the ACTION_MODE_* constants.
|
||||
</member>
|
||||
<member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask">
|
||||
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.
|
||||
</member>
|
||||
<member name="disabled" type="bool" setter="set_disabled" getter="is_disabled">
|
||||
If [code]true[/code] the button is in disabled state and can't be clicked or toggled.
|
||||
</member>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue