Skip to content

Rename Input::set_disable_input() to Input::set_input_disabled()#105471

Open
Lexyth wants to merge 3 commits intogodotengine:masterfrom
Lexyth:master
Open

Rename Input::set_disable_input() to Input::set_input_disabled()#105471
Lexyth wants to merge 3 commits intogodotengine:masterfrom
Lexyth:master

Conversation

@Lexyth
Copy link

@Lexyth Lexyth commented Apr 17, 2025

Changed disable_input to input_disabled in input.h and input.cpp, as it's state, not an action.
Changed set_disable_input to set_input_disabled in input.h and input.cpp to reflect the change to the identifier.

Lexyth added 2 commits April 17, 2025 04:18
Changed `disable_input` to `input_disabled`, as it's state, not an action.
Changed `set_disable_input` to `set_input_disabled` to reflect the change to the identifier.
Changed `disable_input` to `input_disabled`, as it's state, not an action.
Changed `set_disable_input` to `set_input_disabled` to reflect the change to the identifier.
@Lexyth Lexyth requested a review from a team as a code owner April 17, 2025 02:22
@Sauermann Sauermann added this to the 4.x milestone Apr 17, 2025
Changed `disable_input` to `should_disable_input`, as it's a condition, not an action.
Changed `set_disable_input` to `set_input_disabled` to reflect the change to the Input class.
@Lexyth Lexyth requested a review from a team as a code owner April 17, 2025 21:36
bool should_disable_input = scene_tree->is_suspended() || node_select_type != RuntimeNodeSelect::NODE_TYPE_NONE;
Input::get_singleton()->set_input_disabled(should_disable_input);
Input::get_singleton()->set_mouse_mode_override_enabled(should_disable_input);
scene_tree->get_root()->set_disable_input_override(should_disable_input);
Copy link
Author

@Lexyth Lexyth Apr 17, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fairly certain the name should be changed to set_input_disabled_override, too, but changing anything public about Window seems like a rabbit hole I'd rather avoid.

Copy link
Contributor

@Nintorch Nintorch left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change looks quite simple and the name makes sense, it makes it more consistent with other methods (set_mouse_mode_override_enabled, set_joy_motion_sensors_enabled, see also #111679 (comment) ), and the method doesn't seem to be exposed to the scripts, so it's not a breaking change. LGTM!

@Nintorch Nintorch changed the title Fix identifier Rename Input::set_disable_input() to Input::set_input_disabled() Feb 16, 2026
@Nintorch
Copy link
Contributor

Nintorch commented Feb 17, 2026

@Lexyth Hello, there seems to be a merge conflict with the scene/debugger/scene_debugger.cpp file, may I ask if you can rebase your PR, merge the commits together and give the resulting commit a more descriptive name (for example, Rename Input::set_disable_input() to Input::set_input_disabled()) whenever you can, please? The instructions on how to do those can be found here: https://contributing.godotengine.org/en/latest/pull_requests/creating_pull_requests.html#updating-your-branch :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants