Topic was automatically imported from the old Question2Answer platform.
Asked By
DimitriyPS
Old Version
Published before Godot 3 was released.
I want in a running project using a script to change the properties of the window “Project Settings”. As from a script to reach out to these properties?
(i hovered on Width, not Height + its in czech language partly)
if not ProjectSettings.has("display/window/size/width"):
ProjectSettings.set("display/window/size/width", 1024)
if not ProjectSettings.has("display/window/size/height"):
ProjectSettings.set("display/window/size/height", 768)
But AFAIK that if is alway false (ProjectSetting alway have value), so, better example is fulscreen Panel:
func _on_visibility_changed():
if self.visible:
$Panel.rect_size = Vector2(
ProjectSettings.get("display/window/size/width"),
ProjectSettings.get("display/window/size/height")
)
In the particular case of making the Panel or any Control node fullscreen, it’s better to use the Layout button from the Toolbar.
Dlean Jeans | 2019-07-25 10:46
yeah, that was just first (not IRL) example that occurred to me.