1
0
mirror of https://github.com/godotengine/godot.git synced 2025-11-06 12:20:30 +00:00

Add customizable 3D navigation settings

This commit adds 3 new editor settings for orbit, pan, and zoom mouse buttons, and 6 new shortcuts which act as modifiers for the navigation controls. These new shortcuts replace the old orbit, pan, and zoom modifier settings.

The `navigation_scheme` setting now acts as a preset which changes the new options added above, and the new settings are what drives 3D navigation instead. A new struct is used for ordering the navigation logic so that actions with fewer shortcuts are checked first. When the editor starts, the preset detection will run to automatically update user settings from old Godot versions. When the setting is changed, the hint values for the mouse buttons are dynamically updated to show the user the corresponding shortcut values.

The new doc fields have been generated and the description for the new settings are filled out. The `navigation_scheme` entry now has more consistent styling and added control descriptions that were missing before.
This commit is contained in:
Matt Enad
2023-11-24 15:40:54 -05:00
parent cae2f853dc
commit 9d343ced58
7 changed files with 287 additions and 80 deletions

View File

@@ -7602,6 +7602,9 @@ EditorNode::EditorNode() {
ED_SHORTCUT_AND_COMMAND("editor/editor_next", TTR("Open the next Editor"));
ED_SHORTCUT_AND_COMMAND("editor/editor_prev", TTR("Open the previous Editor"));
// Apply setting presets in case the editor_settings file is missing values.
EditorSettingsDialog::update_navigation_preset();
screenshot_timer = memnew(Timer);
screenshot_timer->set_one_shot(true);
screenshot_timer->set_wait_time(settings_menu->get_submenu_popup_delay() + 0.1f);