summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDanil Alexeev <danil@alexeev.xyz>2023-01-09 12:14:51 +0300
committerDanil Alexeev <danil@alexeev.xyz>2023-01-09 12:17:48 +0300
commit9b3da766401e2cadc8059f17c65b0023b8085bda (patch)
tree8199ae3fe2924cff2490d63d7c90406b4f68b4d7
parentb6be2ac62153929ff7be0800cab5b0a7b95946a8 (diff)
Fix unpressable buttons
-rw-r--r--doc/classes/BaseButton.xml2
-rw-r--r--scene/gui/base_button.h2
2 files changed, 2 insertions, 2 deletions
diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml
index 4810abbaf1..aedb8f4420 100644
--- a/doc/classes/BaseButton.xml
+++ b/doc/classes/BaseButton.xml
@@ -50,7 +50,7 @@
<member name="button_group" type="ButtonGroup" setter="set_button_group" getter="get_button_group">
The [ButtonGroup] associated with the button. Not to be confused with node groups.
</member>
- <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" enum="MouseButtonMask" default="0">
+ <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" enum="MouseButtonMask" default="1">
Binary mask to choose which mouse buttons this button will respond to.
To allow both left-click and right-click, use [code]MOUSE_BUTTON_MASK_LEFT | MOUSE_BUTTON_MASK_RIGHT[/code].
</member>
diff --git a/scene/gui/base_button.h b/scene/gui/base_button.h
index f5a7ce5c82..f7c864c5fb 100644
--- a/scene/gui/base_button.h
+++ b/scene/gui/base_button.h
@@ -46,7 +46,7 @@ public:
};
private:
- BitField<MouseButtonMask> button_mask;
+ BitField<MouseButtonMask> button_mask = MouseButtonMask::LEFT;
bool toggle_mode = false;
bool shortcut_in_tooltip = true;
bool was_mouse_pressed = false;