summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJonas Bernard <public.jbernard@web.de>2021-04-26 19:50:10 +0200
committerJonas Bernard <public.jbernard@web.de>2021-04-26 19:50:10 +0200
commitaa00afa6384ecdb2dd727f1cc35884f8d4657a7b (patch)
treee5ab16dca16a6b5426f2e6b4c8f81d9ef931507c
parentc5d39343d47e9c967a596dbcdaff58ebf56ff022 (diff)
downloadldjam48-aa00afa6384ecdb2dd727f1cc35884f8d4657a7b.tar.gz
ldjam48-aa00afa6384ecdb2dd727f1cc35884f8d4657a7b.tar.bz2
ldjam48-aa00afa6384ecdb2dd727f1cc35884f8d4657a7b.zip
Fullscreen setting
-rw-r--r--scenes/menu.gd12
-rw-r--r--scenes/menu.tscn29
2 files changed, 40 insertions, 1 deletions
diff --git a/scenes/menu.gd b/scenes/menu.gd
index 646bc1a..3053744 100644
--- a/scenes/menu.gd
+++ b/scenes/menu.gd
@@ -3,6 +3,7 @@ extends Node2D
func _ready():
_difficulty_text()
+ _fullscreen_text()
func _on_Exit_on_click():
@@ -37,3 +38,14 @@ func _on_HardMode_on_click():
func _on_SettingsButton_on_click():
$success_sound.play()
$Outgoing.play("tosettings")
+
+
+func _on_Fullscreen_on_click():
+ OS.set_window_fullscreen(!OS.window_fullscreen)
+ _fullscreen_text()
+
+func _fullscreen_text():
+ if OS.window_fullscreen:
+ $Content/FullscreenLabel.text = "ON"
+ else:
+ $Content/FullscreenLabel.text = "OFF"
diff --git a/scenes/menu.tscn b/scenes/menu.tscn
index 27a76e1..08a1f3f 100644
--- a/scenes/menu.tscn
+++ b/scenes/menu.tscn
@@ -124,7 +124,7 @@ texture = ExtResource( 3 )
[node name="Content" type="Node2D" parent="."]
[node name="Back" parent="Content" instance=ExtResource( 2 )]
-position = Vector2( 400.655, 1310.32 )
+position = Vector2( 640, 1310.9 )
text = "Back"
fixed_width = 150
@@ -143,6 +143,32 @@ position = Vector2( 400.655, 839.866 )
text = ""
fixed_width = 150
+[node name="Fullscreen" parent="Content" instance=ExtResource( 2 )]
+position = Vector2( 399.632, 962.107 )
+text = ""
+fixed_width = 150
+
+[node name="FullscreenLabel" type="Label" parent="Content"]
+margin_left = 305.624
+margin_top = 944.811
+margin_right = 494.624
+margin_bottom = 988.811
+text = "ON"
+align = 1
+__meta__ = {
+"_edit_use_anchors_": false
+}
+
+[node name="Fullscreen2" type="Label" parent="Content"]
+margin_left = 89.0
+margin_top = 946.0
+margin_right = 282.0
+margin_bottom = 978.0
+text = "Fullscreen"
+__meta__ = {
+"_edit_use_anchors_": false
+}
+
[node name="CustomLabel" type="Label" parent="Content"]
margin_left = 328.655
margin_top = 823.866
@@ -200,6 +226,7 @@ anims/tosettings = SubResource( 4 )
stream = ExtResource( 9 )
[connection signal="on_click" from="Content/Back" to="." method="_on_Back_on_click"]
[connection signal="on_click" from="Content/HardMode" to="." method="_on_HardMode_on_click"]
+[connection signal="on_click" from="Content/Fullscreen" to="." method="_on_Fullscreen_on_click"]
[connection signal="on_click" from="Content/Exit" to="." method="_on_Exit_on_click"]
[connection signal="on_click" from="Content/Strart" to="." method="_on_Strart_on_click"]
[connection signal="on_click" from="Content/SettingsButton" to="." method="_on_SettingsButton_on_click"]