diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index 4810abbaf12..aedb8f4420d 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 f5a7ce5c82a..f7c864c5fba 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;