mirror of
https://github.com/godotengine/godot.git
synced 2025-12-07 22:00:10 +00:00
Add support for the custom initial screen for the main window, fix primary screen detection.
This commit is contained in:
parent
163f6f5fe8
commit
2718a7b7d3
27 changed files with 506 additions and 205 deletions
|
|
@ -1240,6 +1240,14 @@ ProjectSettings::ProjectSettings() {
|
|||
GLOBAL_DEF_BASIC("display/window/size/mode", 0);
|
||||
custom_prop_info["display/window/size/mode"] = PropertyInfo(Variant::INT, "display/window/size/mode", PROPERTY_HINT_ENUM, "Windowed,Minimized,Maximized,Fullscreen,Exclusive Fullscreen");
|
||||
|
||||
// Keep the enum values in sync with the `DisplayServer::SCREEN_` enum.
|
||||
GLOBAL_DEF_BASIC("display/window/size/initial_screen", -2);
|
||||
String screen_hints = "Primary Monitor:-2"; // Note: Main Window Monitor:-1 is not used for the main window, skip it.
|
||||
for (int i = 0; i < 64; i++) {
|
||||
screen_hints += ",Monitor " + itos(i + 1) + ":" + itos(i);
|
||||
}
|
||||
custom_prop_info["display/window/size/initial_screen"] = PropertyInfo(Variant::INT, "display/window/size/initial_screen", PROPERTY_HINT_ENUM, screen_hints);
|
||||
|
||||
GLOBAL_DEF_BASIC("display/window/size/resizable", true);
|
||||
GLOBAL_DEF_BASIC("display/window/size/borderless", false);
|
||||
GLOBAL_DEF("display/window/size/always_on_top", false);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue