diff options
author | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2023-03-21 13:08:46 +0200 |
---|---|---|
committer | bruvzg <7645683+bruvzg@users.noreply.github.com> | 2023-04-19 08:54:53 +0300 |
commit | 520a8d8ed2f8161c94ff9d32608212faef34df14 (patch) | |
tree | a23b4f08b9c61f89ee54da647b331fcb186077d1 /editor | |
parent | 1b4b8934e080ec5300c78547527517f4a5b733e9 (diff) | |
download | redot-engine-520a8d8ed2f8161c94ff9d32608212faef34df14.tar.gz |
Add project manager / editor initial screen settings, implement DisplayServer.get_keyboard_focus_screen method.
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_settings.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 835eecdeb3..6bc558e72a 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -400,6 +400,13 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { const String display_scale_hint_string = vformat("Auto (%d%%),75%%,100%%,125%%,150%%,175%%,200%%,Custom", Math::round(get_auto_display_scale() * 100)); EDITOR_SETTING_USAGE(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/display_scale", 0, display_scale_hint_string, PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED) + String ed_screen_hints = "Screen With Mouse Pointer:-4,Screen With Keyboard Focus:-3,Primary Screen:-2"; // Note: Main Window Screen:-1 is not used for the main window. + for (int i = 0; i < DisplayServer::get_singleton()->get_screen_count(); i++) { + ed_screen_hints += ",Screen " + itos(i + 1) + ":" + itos(i); + } + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/editor_screen", -2, ed_screen_hints) + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "interface/editor/project_manager_screen", -2, ed_screen_hints) + _initial_set("interface/editor/debug/enable_pseudolocalization", false); set_restart_if_changed("interface/editor/debug/enable_pseudolocalization", true); // Use pseudolocalization in editor. @@ -709,9 +716,9 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { // Window placement EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "run/window_placement/rect", 1, "Top Left,Centered,Custom Position,Force Maximized,Force Fullscreen") // Keep the enum values in sync with the `DisplayServer::SCREEN_` enum. - String screen_hints = "Same as Editor:-5,Previous Monitor:-4,Next Monitor:-3,Primary Monitor:-2"; // Note: Main Window Screen:-1 is not used for the main window. + String screen_hints = "Same as Editor:-5,Previous Screen:-4,Next Screen:-3,Primary Screen:-2"; // Note: Main Window Screen:-1 is not used for the main window. for (int i = 0; i < DisplayServer::get_singleton()->get_screen_count(); i++) { - screen_hints += ",Monitor " + itos(i + 1) + ":" + itos(i); + screen_hints += ",Screen " + itos(i + 1) + ":" + itos(i); } _initial_set("run/window_placement/rect_custom_position", Vector2()); EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "run/window_placement/screen", -5, screen_hints) |