diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index 85178146d71..404940a35e5 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -52,7 +52,7 @@ If [code]true[/code], the button is in disabled state and can't be clicked or toggled. - Focus access mode to use when switching between enabled/disabled (see [member Control.focus_mode] and [member disabled]). + [i]Deprecated.[/i] This property has been deprecated due to redundancy and no longer has any effect when set. Please use [member Control.focus_mode] instead. diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp index b2020d44e8b..ee91b45e770 100644 --- a/scene/gui/base_button.cpp +++ b/scene/gui/base_button.cpp @@ -326,6 +326,7 @@ void BaseButton::set_enabled_focus_mode(FocusMode p_mode) { if (!status.disabled) { set_focus_mode(p_mode); } + WARN_DEPRECATED_MSG("BaseButton's Enabled Focus Mode property has been deprecated due to redundancy and will be removed in Godot 4.0. Please use Control.set_focus_mode instead."); } Control::FocusMode BaseButton::get_enabled_focus_mode() const { diff --git a/scene/gui/link_button.cpp b/scene/gui/link_button.cpp index 4b8054bac64..75ccc77df28 100644 --- a/scene/gui/link_button.cpp +++ b/scene/gui/link_button.cpp @@ -140,6 +140,5 @@ void LinkButton::_bind_methods() { LinkButton::LinkButton() { underline_mode = UNDERLINE_MODE_ALWAYS; - set_enabled_focus_mode(FOCUS_NONE); set_default_cursor_shape(CURSOR_POINTING_HAND); } diff --git a/scene/gui/menu_button.cpp b/scene/gui/menu_button.cpp index 6e348054e29..a7acdf1ae33 100644 --- a/scene/gui/menu_button.cpp +++ b/scene/gui/menu_button.cpp @@ -129,7 +129,6 @@ MenuButton::MenuButton() { set_flat(true); set_toggle_mode(true); set_disable_shortcuts(false); - set_enabled_focus_mode(FOCUS_NONE); set_process_unhandled_key_input(true); set_action_mode(ACTION_MODE_BUTTON_PRESS);