From 69bc0630667f285708ddbb74af8ef83f7a41fc23 Mon Sep 17 00:00:00 2001 From: tpart Date: Wed, 26 Jun 2024 16:08:38 +0200 Subject: Rewrite settings system; Add full controller support to settings; Add menu manager system --- client/menu/ingame_menu.gd | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'client/menu/ingame_menu.gd') diff --git a/client/menu/ingame_menu.gd b/client/menu/ingame_menu.gd index 21bfa8ac..9987f8ca 100644 --- a/client/menu/ingame_menu.gd +++ b/client/menu/ingame_menu.gd @@ -1,6 +1,17 @@ extends Control @onready var anim = $AnimationPlayer +@onready var options = $Side/Margin/Options + +func act(): + show() + anim.play("activate") + Global.focus_first_button(options) + +func deact(): + anim.play_backwards("activate") + await anim.animation_finished + hide() func _on_main_menu_pressed(): get_parent().transition_to("res://menu/main_menu.tscn") -- cgit v1.2.3-70-g09d2 From 5d280643f19196d4eab75d2cd0980258fb7af649 Mon Sep 17 00:00:00 2001 From: tpart Date: Wed, 26 Jun 2024 16:22:54 +0200 Subject: Fix ingame menu redirecting to wrong scene --- client/menu/ingame_menu.gd | 2 +- client/menu/ingame_menu.tscn | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'client/menu/ingame_menu.gd') diff --git a/client/menu/ingame_menu.gd b/client/menu/ingame_menu.gd index 9987f8ca..4752c382 100644 --- a/client/menu/ingame_menu.gd +++ b/client/menu/ingame_menu.gd @@ -14,7 +14,7 @@ func deact(): hide() func _on_main_menu_pressed(): - get_parent().transition_to("res://menu/main_menu.tscn") + get_parent().transition_to("res://menu/menu_manager.tscn") func _on_quit_pressed(): get_parent().quit() diff --git a/client/menu/ingame_menu.tscn b/client/menu/ingame_menu.tscn index cfd6ebba..f29c7115 100644 --- a/client/menu/ingame_menu.tscn +++ b/client/menu/ingame_menu.tscn @@ -1,9 +1,9 @@ [gd_scene load_steps=10 format=3 uid="uid://lxlgtjm8hw7v"] [ext_resource type="Script" path="res://menu/ingame_menu.gd" id="1_gd1i3"] +[ext_resource type="Theme" uid="uid://b0qmvo504e457" path="res://menu/theme/theme.tres" id="1_lb056"] [ext_resource type="Shader" path="res://menu/blur_mix.gdshader" id="1_o42mc"] -[ext_resource type="Theme" uid="uid://b0qmvo504e457" path="res://menu/theme/theme.tres" id="1_tm331"] -[ext_resource type="FontFile" uid="uid://bo4vh5xkpvrh1" path="res://menu/theme/font-sansita-swashed.woff2" id="2_4u0ox"] +[ext_resource type="FontFile" uid="uid://bo4vh5xkpvrh1" path="res://menu/theme/font-sansita-swashed.woff2" id="4_27kbu"] [sub_resource type="Animation" id="Animation_8sedy"] length = 0.001 @@ -46,7 +46,7 @@ shader_parameter/mix_amount = 0.3 shader_parameter/color_over = null [sub_resource type="FontVariation" id="FontVariation_ud3l8"] -base_font = ExtResource("2_4u0ox") +base_font = ExtResource("4_27kbu") variation_embolden = 0.5 [node name="IngameMenu" type="Control"] @@ -56,7 +56,7 @@ anchor_right = 1.0 anchor_bottom = 1.0 grow_horizontal = 2 grow_vertical = 2 -theme = ExtResource("1_tm331") +theme = ExtResource("1_lb056") script = ExtResource("1_gd1i3") [node name="AnimationPlayer" type="AnimationPlayer" parent="."] -- cgit v1.2.3-70-g09d2