summaryrefslogtreecommitdiff
path: root/scenes/menu.gd
diff options
context:
space:
mode:
Diffstat (limited to 'scenes/menu.gd')
-rw-r--r--scenes/menu.gd23
1 files changed, 21 insertions, 2 deletions
diff --git a/scenes/menu.gd b/scenes/menu.gd
index e4f254e..f0be2dd 100644
--- a/scenes/menu.gd
+++ b/scenes/menu.gd
@@ -2,7 +2,7 @@ extends Node2D
func _ready():
- pass
+ _difficulty_text()
func _on_Exit_on_click():
@@ -15,4 +15,23 @@ func _on_Strart_on_click():
func _on_Outgoing_animation_finished(anim_name):
- get_tree().change_scene("res://scenes/introduction/come home.tscn")
+ if anim_name == "tointro":
+ get_tree().change_scene("res://scenes/introduction/come home.tscn")
+
+
+func _on_Back_on_click():
+ $Outgoing.play_backwards("tosettings")
+
+func _difficulty_text():
+ if Settings.difficulty == Settings.Difficulty.HARD:
+ $Content/CustomLabel.text = "Hard"
+ else:
+ $Content/CustomLabel.text = "Easy"
+
+func _on_HardMode_on_click():
+ Settings.difficulty = 1 - Settings.difficulty
+ _difficulty_text()
+ Settings.save()
+
+func _on_SettingsButton_on_click():
+ $Outgoing.play("tosettings")