mirror of
https://github.com/godotengine/godot.git
synced 2026-01-03 18:11:19 +03:00
Add project manager / editor initial screen settings, implement DisplayServer.get_keyboard_focus_screen method.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user