mirror of
https://github.com/godotengine/godot.git
synced 2026-01-06 10:11:57 +03:00
Add support for the custom initial screen for the main window, fix primary screen detection.
This commit is contained in:
@@ -697,12 +697,13 @@ 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")
|
||||
String screen_hints = "Same as Editor,Previous Monitor,Next Monitor";
|
||||
// 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.
|
||||
for (int i = 0; i < DisplayServer::get_singleton()->get_screen_count(); i++) {
|
||||
screen_hints += ",Monitor " + itos(i + 1);
|
||||
screen_hints += ",Monitor " + 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", 0, screen_hints)
|
||||
EDITOR_SETTING(Variant::INT, PROPERTY_HINT_ENUM, "run/window_placement/screen", -5, screen_hints)
|
||||
|
||||
// Auto save
|
||||
_initial_set("run/auto_save/save_before_running", true);
|
||||
|
||||
Reference in New Issue
Block a user