Skip to content

Commit

Permalink
Set window to maximized on startup so that it scales down on <1080p s…
Browse files Browse the repository at this point in the history
…creens.
  • Loading branch information
NiclasEriksen committed Sep 6, 2022
1 parent 345d412 commit bab2832
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
1 change: 1 addition & 0 deletions LeifProject/simulation/WorldContainer.gd
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ var running := false

# Called when the node enters the scene tree for the first time.
func _ready():
OS.set_window_maximized(true)
world = WORLD_SCENE.instance()
add_child(world)
world.WORLD_SIZE = WORLD_SIZE
Expand Down
2 changes: 2 additions & 0 deletions LeifProject/simulation/WorldContainer.tscn
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ light_mode = 1

[node name="WorldContainer" type="Node2D"]
script = ExtResource( 1 )
WORLD_SIZE = Vector2( 1920, 1080 )
WORLD_OFFSET = Vector2( 0, 0 )

[node name="WorldEnvironment" type="WorldEnvironment" parent="."]
environment = SubResource( 1 )
Expand Down

0 comments on commit bab2832

Please sign in to comment.