From a9c7106c3b776ce98c10a93590bb7c543e97b336 Mon Sep 17 00:00:00 2001 From: Haze Weathers Date: Sat, 25 Nov 2023 19:22:14 -0500 Subject: [PATCH] fix teleporter graphics in name entry --- menus/file_create.gd | 6 ++++++ menus/file_create.tscn | 31 +++++++++++++++++-------------- 2 files changed, 23 insertions(+), 14 deletions(-) diff --git a/menus/file_create.gd b/menus/file_create.gd index ecef80d..d658441 100644 --- a/menus/file_create.gd +++ b/menus/file_create.gd @@ -93,6 +93,12 @@ func _on_backspace(): print(file.name.length()) func _on_Exit_area_entered(area: Area2D) -> void: + if area.is_in_group("player_hitbox"): + var player = area.get_parent() + player.state_chart.send_event("start_teleport") + player.connect("teleport_finished", self, "_on_player_teleport_finished") + +func _on_player_teleport_finished() -> void: if file.name.length() > 0: get_tree().paused = true file.save_to_file() diff --git a/menus/file_create.tscn b/menus/file_create.tscn index 6170e60..10f6459 100644 --- a/menus/file_create.tscn +++ b/menus/file_create.tscn @@ -55,14 +55,14 @@ shader_param/uv_transform = Transform2D( 1, 0, 2, 1, 0, 0 ) [sub_resource type="ShaderMaterial" id=9] shader = ExtResource( 18 ) -shader_param/speed = 5.0 +shader_param/speed = 1.0 shader_param/cycle_offset = 0.0 shader_param/wave_length = 8.0 shader_param/thickness = 0.1 [sub_resource type="ShaderMaterial" id=10] shader = ExtResource( 18 ) -shader_param/speed = -6.0 +shader_param/speed = -2.0 shader_param/cycle_offset = 3.0 shader_param/wave_length = 5.0 shader_param/thickness = 0.1 @@ -88,7 +88,10 @@ __meta__ = { "_edit_horizontal_guides_": [ ] } -[node name="Background" type="ColorRect" parent="."] +[node name="BackgroundLayer" type="CanvasLayer" parent="."] +layer = -10 + +[node name="Background" type="ColorRect" parent="BackgroundLayer"] material = SubResource( 1 ) anchor_right = 1.0 anchor_bottom = 1.0 @@ -131,17 +134,6 @@ margin_right = 88.0 margin_bottom = 112.0 theme = ExtResource( 2 ) -[node name="Body" type="Label" parent="DifficultySelect/ButtonsPanel"] -material = SubResource( 2 ) -margin_left = 16.0 -margin_top = 8.0 -margin_right = 65.0 -margin_bottom = 57.0 -text = "sweet -salty -spicy -pungent" - [node name="Sweet" type="TextureButton" parent="DifficultySelect/ButtonsPanel"] material = SubResource( 3 ) margin_left = 8.0 @@ -183,6 +175,17 @@ focus_neighbour_top = NodePath("../Spicy") focus_neighbour_bottom = NodePath("../Sweet") texture_focused = ExtResource( 6 ) +[node name="Body" type="Label" parent="DifficultySelect/ButtonsPanel"] +material = SubResource( 2 ) +margin_left = 16.0 +margin_top = 8.0 +margin_right = 65.0 +margin_bottom = 57.0 +text = "sweet +salty +spicy +pungent" + [node name="DescriptionPanel" type="Panel" parent="DifficultySelect"] material = SubResource( 2 ) margin_left = 16.0