From 9b3da766401e2cadc8059f17c65b0023b8085bda Mon Sep 17 00:00:00 2001 From: Danil Alexeev Date: Mon, 9 Jan 2023 12:14:51 +0300 Subject: [PATCH] Fix unpressable buttons --- doc/classes/BaseButton.xml | 2 +- scene/gui/base_button.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index 4810abbaf127..aedb8f4420da 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -50,7 +50,7 @@ The [ButtonGroup] associated with the button. Not to be confused with node groups. - + 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]. diff --git a/scene/gui/base_button.h b/scene/gui/base_button.h index f5a7ce5c82a3..f7c864c5fba9 100644 --- a/scene/gui/base_button.h +++ b/scene/gui/base_button.h @@ -46,7 +46,7 @@ public: }; private: - BitField button_mask; + BitField button_mask = MouseButtonMask::LEFT; bool toggle_mode = false; bool shortcut_in_tooltip = true; bool was_mouse_pressed = false;