1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-22 15:06:45 +00:00

Drop mouse focus and over when gui input is globally disabled

Since some porjects may be relying on the former behavior, this is opt-in via a new project setting, disabled by default, but enabled for new projects, since it's the new standard behavior (and the only one in 4.0).
This commit is contained in:
Pedro J. Estébanez
2022-03-13 12:43:27 +01:00
parent 3eee2f45a3
commit 3d7821bf1f
5 changed files with 26 additions and 6 deletions

View File

@@ -470,6 +470,7 @@ private:
initial_settings["application/config/icon"] = "res://icon.png";
initial_settings["rendering/environment/default_environment"] = "res://default_env.tres";
initial_settings["physics/common/enable_pause_aware_picking"] = true;
initial_settings["gui/common/drop_mouse_on_gui_input_disabled"] = true;
if (ProjectSettings::get_singleton()->save_custom(dir.plus_file("project.godot"), initial_settings, Vector<String>(), false) != OK) {
set_message(TTR("Couldn't create project.godot in project path."), MESSAGE_ERROR);