summaryrefslogtreecommitdiff
path: root/client/menu
diff options
context:
space:
mode:
Diffstat (limited to 'client/menu')
-rw-r--r--client/menu/character_menu.gd5
-rw-r--r--client/menu/ingame_menu.tscn2
-rw-r--r--client/menu/menu_manager.gd4
3 files changed, 10 insertions, 1 deletions
diff --git a/client/menu/character_menu.gd b/client/menu/character_menu.gd
index 3e535e71..347a0db1 100644
--- a/client/menu/character_menu.gd
+++ b/client/menu/character_menu.gd
@@ -17,12 +17,17 @@ extends Control
@onready var character: Character = $Character
@onready var num_hairstyles := character.hairstyles.keys().size()
+@onready var back_button := $VBoxContainer/bottom_panel/back
func _ready():
$VBoxContainer/top_panel/a/username.text = Global.profile["username"]
character.select_hairstyle(Global.profile["character"])
Global.focus_first_button(self)
+func _input(event):
+ if Input.is_action_just_pressed("ui_cancel"):
+ _on_back_pressed()
+
func _on_back_pressed():
$SceneTransition.transition_to("res://menu/menu_manager.tscn")
diff --git a/client/menu/ingame_menu.tscn b/client/menu/ingame_menu.tscn
index 79b4efb1..eba314ce 100644
--- a/client/menu/ingame_menu.tscn
+++ b/client/menu/ingame_menu.tscn
@@ -72,7 +72,7 @@ anchors_preset = 9
anchor_bottom = 1.0
offset_left = -400.0
offset_right = -90.0
-offset_bottom = 2592.0
+offset_bottom = 3240.0
grow_vertical = 2
[node name="Margin" type="MarginContainer" parent="Side"]
diff --git a/client/menu/menu_manager.gd b/client/menu/menu_manager.gd
index 69866377..7c958272 100644
--- a/client/menu/menu_manager.gd
+++ b/client/menu/menu_manager.gd
@@ -13,6 +13,10 @@ var menu_stack = ["main"]
func _ready():
Global.focus_first_button(menus[menu_stack.back()])
+func _input(event):
+ if Input.is_action_just_pressed("ui_cancel") && menu_stack.size() > 1:
+ go_back()
+
func goto(menu_name: String):
show_menu(menu_name)
menu_stack.push_back(menu_name)