Deprecate Redundant property enabled_focus_mode
of BaseButton see #41529 for details this closes #41529
This commit is contained in:
parent
6b5102cf90
commit
8311a37ed9
4 changed files with 2 additions and 3 deletions
|
@ -52,7 +52,7 @@
|
||||||
If [code]true[/code], the button is in disabled state and can't be clicked or toggled.
|
If [code]true[/code], the button is in disabled state and can't be clicked or toggled.
|
||||||
</member>
|
</member>
|
||||||
<member name="enabled_focus_mode" type="int" setter="set_enabled_focus_mode" getter="get_enabled_focus_mode" enum="Control.FocusMode" default="2">
|
<member name="enabled_focus_mode" type="int" setter="set_enabled_focus_mode" getter="get_enabled_focus_mode" enum="Control.FocusMode" default="2">
|
||||||
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.
|
||||||
</member>
|
</member>
|
||||||
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
|
<member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" />
|
||||||
<member name="group" type="ButtonGroup" setter="set_button_group" getter="get_button_group">
|
<member name="group" type="ButtonGroup" setter="set_button_group" getter="get_button_group">
|
||||||
|
|
|
@ -326,6 +326,7 @@ void BaseButton::set_enabled_focus_mode(FocusMode p_mode) {
|
||||||
if (!status.disabled) {
|
if (!status.disabled) {
|
||||||
set_focus_mode(p_mode);
|
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 {
|
Control::FocusMode BaseButton::get_enabled_focus_mode() const {
|
||||||
|
|
|
@ -140,6 +140,5 @@ void LinkButton::_bind_methods() {
|
||||||
|
|
||||||
LinkButton::LinkButton() {
|
LinkButton::LinkButton() {
|
||||||
underline_mode = UNDERLINE_MODE_ALWAYS;
|
underline_mode = UNDERLINE_MODE_ALWAYS;
|
||||||
set_enabled_focus_mode(FOCUS_NONE);
|
|
||||||
set_default_cursor_shape(CURSOR_POINTING_HAND);
|
set_default_cursor_shape(CURSOR_POINTING_HAND);
|
||||||
}
|
}
|
||||||
|
|
|
@ -129,7 +129,6 @@ MenuButton::MenuButton() {
|
||||||
set_flat(true);
|
set_flat(true);
|
||||||
set_toggle_mode(true);
|
set_toggle_mode(true);
|
||||||
set_disable_shortcuts(false);
|
set_disable_shortcuts(false);
|
||||||
set_enabled_focus_mode(FOCUS_NONE);
|
|
||||||
set_process_unhandled_key_input(true);
|
set_process_unhandled_key_input(true);
|
||||||
set_action_mode(ACTION_MODE_BUTTON_PRESS);
|
set_action_mode(ACTION_MODE_BUTTON_PRESS);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue