diff options
author | Daniel Weipert <code@drogueronin.de> | 2023-06-18 16:43:22 +0200 |
---|---|---|
committer | Daniel Weipert <code@drogueronin.de> | 2023-06-18 16:43:22 +0200 |
commit | 395c25b1fbe51f42decf402f97e51eabcc8c0a77 (patch) | |
tree | 72a17c71a39b53d328a76e111ae205d9538d64d0 /UI | |
parent | 2686ec6d4af6b5437a5f5a5cac008f3d38295f78 (diff) |
Godot v3 -> v4
Diffstat (limited to 'UI')
-rw-r--r-- | UI/CharacterSelect.gd | 10 | ||||
-rw-r--r-- | UI/CharacterSelect.tscn | 162 | ||||
-rw-r--r-- | UI/GameOver.gd | 2 | ||||
-rw-r--r-- | UI/GameOver.tscn | 102 | ||||
-rw-r--r-- | UI/HUD/CancelButton.tscn | 32 | ||||
-rw-r--r-- | UI/HUD/LevelMap.gd | 8 | ||||
-rw-r--r-- | UI/HUD/LevelMap.tscn | 23 | ||||
-rw-r--r-- | UI/HUD/LevelMapCell.gd | 15 | ||||
-rw-r--r-- | UI/HUD/LevelMapCell.tscn | 182 | ||||
-rw-r--r-- | UI/HUD/Timer.tscn | 13 | ||||
-rw-r--r-- | UI/LevelSelect.gd | 15 | ||||
-rw-r--r-- | UI/LevelSelect.tscn | 13 | ||||
-rw-r--r-- | UI/LevelSelectCell.gd | 15 | ||||
-rw-r--r-- | UI/LevelSelectCell.tscn | 101 | ||||
-rw-r--r-- | UI/Menu/KeyBindings.gd | 4 | ||||
-rw-r--r-- | UI/Menu/KeyBindings.tscn | 116 | ||||
-rw-r--r-- | UI/Menu/Menu.gd | 2 | ||||
-rw-r--r-- | UI/Menu/Menu.tscn | 47 | ||||
-rw-r--r-- | UI/Menu/MenuButton.tscn | 15 |
19 files changed, 486 insertions, 391 deletions
diff --git a/UI/CharacterSelect.gd b/UI/CharacterSelect.gd index bc6dab1..6ae7de0 100644 --- a/UI/CharacterSelect.gd +++ b/UI/CharacterSelect.gd @@ -20,9 +20,9 @@ func set_Wait_text(): func set_bg_color_selected(character, previous_character = null): if previous_character: - get_node(previous_character + "Panel").set("custom_styles/panel", self.style_deselected) + get_node(previous_character + "Panel").set("theme_override_styles/panel", self.style_deselected) - get_node(character + "Panel").set("custom_styles/panel", self.style_selected) + get_node(character + "Panel").set("theme_override_styles/panel", self.style_selected) func _button_pressed(event, character): @@ -33,12 +33,12 @@ func _button_pressed(event, character): Network.player.character = character -sync func _character_selected(character): - var id = get_tree().get_rpc_sender_id() +@rpc("any_peer", "call_local") func _character_selected(character): + var id = multiplayer.get_remote_sender_id() if Network.players.has(id): Network.players[id].character = character self.players_selected[id] = true self.set_Wait_text() if Network.get_player_count() == self.players_selected.size(): - get_tree().change_scene("res://UI/LevelSelect.tscn") + get_tree().change_scene_to_file("res://UI/LevelSelect.tscn") diff --git a/UI/CharacterSelect.tscn b/UI/CharacterSelect.tscn index 4493549..79d7970 100644 --- a/UI/CharacterSelect.tscn +++ b/UI/CharacterSelect.tscn @@ -1,15 +1,15 @@ [gd_scene load_steps=11 format=2] -[ext_resource path="res://Assets/Characters/Tux/Front.png" type="Texture" id=1] -[ext_resource path="res://Assets/Characters/Duck/Front.png" type="Texture" id=2] -[ext_resource path="res://Assets/Fonts/geometry-soft-pro/Geometry_Soft_Pro-Bold_N.otf" type="DynamicFontData" id=3] +[ext_resource path="res://Assets/Characters/Tux/Front.png" type="Texture2D" id=1] +[ext_resource path="res://Assets/Characters/Duck/Front.png" type="Texture2D" id=2] +[ext_resource path="res://Assets/Fonts/geometry-soft-pro/Geometry_Soft_Pro-Bold_N.otf" type="FontFile" id=3] [ext_resource path="res://UI/CharacterSelect.gd" type="Script" id=4] -[ext_resource path="res://Assets/Characters/Dove/Front.png" type="Texture" id=5] -[ext_resource path="res://Assets/Characters/Monkey/Front.png" type="Texture" id=6] -[ext_resource path="res://Assets/Characters/Pidgin/Front.png" type="Texture" id=7] -[ext_resource path="res://Assets/Characters/Elephant/Front.png" type="Texture" id=8] +[ext_resource path="res://Assets/Characters/Dove/Front.png" type="Texture2D" id=5] +[ext_resource path="res://Assets/Characters/Monkey/Front.png" type="Texture2D" id=6] +[ext_resource path="res://Assets/Characters/Pidgin/Front.png" type="Texture2D" id=7] +[ext_resource path="res://Assets/Characters/Elephant/Front.png" type="Texture2D" id=8] -[sub_resource type="DynamicFont" id=1] +[sub_resource type="FontFile" id=1] size = 52 font_data = ExtResource( 3 ) @@ -19,157 +19,157 @@ bg_color = Color( 1, 0.984314, 0.647059, 0 ) [node name="CharacterSelect" type="Panel"] anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = 32.0 -margin_top = 24.0 -margin_right = -24.0 -margin_bottom = -16.0 +offset_left = 32.0 +offset_top = 24.0 +offset_right = -24.0 +offset_bottom = -16.0 script = ExtResource( 4 ) __meta__ = { "_edit_use_anchors_": false } [node name="Title" type="Label" parent="."] -margin_left = 176.0 -margin_top = 40.0 -margin_right = 724.0 -margin_bottom = 94.0 -custom_fonts/font = SubResource( 1 ) +offset_left = 176.0 +offset_top = 40.0 +offset_right = 724.0 +offset_bottom = 94.0 +theme_override_fonts/font = SubResource( 1 ) text = "Choose your Character!" __meta__ = { "_edit_use_anchors_": false } [node name="Wait" type="Label" parent="."] -margin_left = 544.0 -margin_top = 104.0 -margin_right = 741.0 -margin_bottom = 118.0 +offset_left = 544.0 +offset_top = 104.0 +offset_right = 741.0 +offset_bottom = 118.0 text = "Waiting for x players to choose" __meta__ = { "_edit_use_anchors_": false } [node name="TuxPanel" type="Panel" parent="."] -margin_left = 96.0 -margin_top = 168.0 -margin_right = 176.0 -margin_bottom = 248.0 -custom_styles/panel = SubResource( 2 ) +offset_left = 96.0 +offset_top = 168.0 +offset_right = 176.0 +offset_bottom = 248.0 +theme_override_styles/panel = SubResource( 2 ) __meta__ = { "_edit_use_anchors_": false } [node name="Tux" type="TextureRect" parent="TuxPanel"] -margin_left = 8.0 -margin_top = 8.0 -margin_right = 40.0 -margin_bottom = 40.0 -rect_scale = Vector2( 2, 2 ) +offset_left = 8.0 +offset_top = 8.0 +offset_right = 40.0 +offset_bottom = 40.0 +scale = Vector2( 2, 2 ) texture = ExtResource( 1 ) __meta__ = { "_edit_use_anchors_": false } [node name="DuckPanel" type="Panel" parent="."] -margin_left = 288.0 -margin_top = 168.0 -margin_right = 368.0 -margin_bottom = 248.0 -custom_styles/panel = SubResource( 2 ) +offset_left = 288.0 +offset_top = 168.0 +offset_right = 368.0 +offset_bottom = 248.0 +theme_override_styles/panel = SubResource( 2 ) __meta__ = { "_edit_use_anchors_": false } [node name="Duck" type="TextureRect" parent="DuckPanel"] -margin_left = 8.0 -margin_top = 8.0 -margin_right = 40.0 -margin_bottom = 40.0 -rect_scale = Vector2( 2, 2 ) +offset_left = 8.0 +offset_top = 8.0 +offset_right = 40.0 +offset_bottom = 40.0 +scale = Vector2( 2, 2 ) texture = ExtResource( 2 ) __meta__ = { "_edit_use_anchors_": false } [node name="DovePanel" type="Panel" parent="."] -margin_left = 480.0 -margin_top = 168.0 -margin_right = 560.0 -margin_bottom = 248.0 -custom_styles/panel = SubResource( 2 ) +offset_left = 480.0 +offset_top = 168.0 +offset_right = 560.0 +offset_bottom = 248.0 +theme_override_styles/panel = SubResource( 2 ) __meta__ = { "_edit_use_anchors_": false } [node name="Dove" type="TextureRect" parent="DovePanel"] -margin_left = 8.0 -margin_top = 8.0 -margin_right = 40.0 -margin_bottom = 40.0 -rect_scale = Vector2( 2, 2 ) +offset_left = 8.0 +offset_top = 8.0 +offset_right = 40.0 +offset_bottom = 40.0 +scale = Vector2( 2, 2 ) texture = ExtResource( 5 ) __meta__ = { "_edit_use_anchors_": false } [node name="PidginPanel" type="Panel" parent="."] -margin_left = 672.0 -margin_top = 168.0 -margin_right = 752.0 -margin_bottom = 248.0 -custom_styles/panel = SubResource( 2 ) +offset_left = 672.0 +offset_top = 168.0 +offset_right = 752.0 +offset_bottom = 248.0 +theme_override_styles/panel = SubResource( 2 ) __meta__ = { "_edit_use_anchors_": false } [node name="Pidgin" type="TextureRect" parent="PidginPanel"] -margin_left = 8.0 -margin_top = 8.0 -margin_right = 40.0 -margin_bottom = 40.0 -rect_scale = Vector2( 2, 2 ) +offset_left = 8.0 +offset_top = 8.0 +offset_right = 40.0 +offset_bottom = 40.0 +scale = Vector2( 2, 2 ) texture = ExtResource( 7 ) __meta__ = { "_edit_use_anchors_": false } [node name="MonkeyPanel" type="Panel" parent="."] -margin_left = 96.0 -margin_top = 296.0 -margin_right = 176.0 -margin_bottom = 376.0 -custom_styles/panel = SubResource( 2 ) +offset_left = 96.0 +offset_top = 296.0 +offset_right = 176.0 +offset_bottom = 376.0 +theme_override_styles/panel = SubResource( 2 ) __meta__ = { "_edit_use_anchors_": false } [node name="Monkey" type="TextureRect" parent="MonkeyPanel"] -margin_left = 8.0 -margin_top = 8.0 -margin_right = 40.0 -margin_bottom = 40.0 -rect_scale = Vector2( 2, 2 ) +offset_left = 8.0 +offset_top = 8.0 +offset_right = 40.0 +offset_bottom = 40.0 +scale = Vector2( 2, 2 ) texture = ExtResource( 6 ) __meta__ = { "_edit_use_anchors_": false } [node name="ElephantPanel" type="Panel" parent="."] -margin_left = 288.0 -margin_top = 296.0 -margin_right = 368.0 -margin_bottom = 376.0 -custom_styles/panel = SubResource( 2 ) +offset_left = 288.0 +offset_top = 296.0 +offset_right = 368.0 +offset_bottom = 376.0 +theme_override_styles/panel = SubResource( 2 ) __meta__ = { "_edit_use_anchors_": false } [node name="Elephant" type="TextureRect" parent="ElephantPanel"] -margin_left = 8.0 -margin_top = 8.0 -margin_right = 40.0 -margin_bottom = 40.0 -rect_scale = Vector2( 2, 2 ) +offset_left = 8.0 +offset_top = 8.0 +offset_right = 40.0 +offset_bottom = 40.0 +scale = Vector2( 2, 2 ) texture = ExtResource( 8 ) __meta__ = { "_edit_use_anchors_": false diff --git a/UI/GameOver.gd b/UI/GameOver.gd index 6340e89..8ff8309 100644 --- a/UI/GameOver.gd +++ b/UI/GameOver.gd @@ -6,4 +6,4 @@ func _ready(): func _on_BackToLobby_pressed(): - get_tree().change_scene("res://Network/Lobby.tscn") + get_tree().change_scene_to_file("res://Network/Lobby.tscn") diff --git a/UI/GameOver.tscn b/UI/GameOver.tscn index 67d985d..7ab36bf 100644 --- a/UI/GameOver.tscn +++ b/UI/GameOver.tscn @@ -1,45 +1,91 @@ -[gd_scene load_steps=6 format=2] +[gd_scene load_steps=6 format=3 uid="uid://dryan50dg0um0"] -[ext_resource path="res://Assets/Fonts/impact-label/Impact_Label_Reversed.ttf" type="DynamicFontData" id=1] -[ext_resource path="res://Assets/Fonts/geometry-soft-pro/Geometry_Soft_Pro-Bold_N.otf" type="DynamicFontData" id=2] -[ext_resource path="res://UI/GameOver.gd" type="Script" id=3] +[ext_resource type="FontFile" uid="uid://c8r0x3spdh8sg" path="res://Assets/Fonts/impact-label/Impact_Label_Reversed.ttf" id="1"] +[ext_resource type="FontFile" uid="uid://qbiaulowpomb" path="res://Assets/Fonts/geometry-soft-pro/Geometry_Soft_Pro-Bold_N.otf" id="2"] +[ext_resource type="Script" path="res://UI/GameOver.gd" id="3"] -[sub_resource type="DynamicFont" id=1] -size = 144 -font_data = ExtResource( 1 ) +[sub_resource type="FontFile" id="1"] +fallbacks = Array[Font]([ExtResource("1")]) +face_index = null +embolden = null +transform = null +cache/0/16/0/ascent = 0.0 +cache/0/16/0/descent = 0.0 +cache/0/16/0/underline_position = 0.0 +cache/0/16/0/underline_thickness = 0.0 +cache/0/16/0/scale = 1.0 +cache/0/16/0/kerning_overrides/16/0 = Vector2(0, 0) +cache/0/16/0/kerning_overrides/72/0 = Vector2(0, 0) +cache/0/16/0/kerning_overrides/128/0 = Vector2(0, 0) +cache/0/72/0/ascent = 0.0 +cache/0/72/0/descent = 0.0 +cache/0/72/0/underline_position = 0.0 +cache/0/72/0/underline_thickness = 0.0 +cache/0/72/0/scale = 1.0 +cache/0/72/0/kerning_overrides/16/0 = Vector2(0, 0) +cache/0/72/0/kerning_overrides/72/0 = Vector2(0, 0) +cache/0/72/0/kerning_overrides/128/0 = Vector2(0, 0) +cache/0/128/0/ascent = 0.0 +cache/0/128/0/descent = 0.0 +cache/0/128/0/underline_position = 0.0 +cache/0/128/0/underline_thickness = 0.0 +cache/0/128/0/scale = 1.0 +cache/0/128/0/kerning_overrides/16/0 = Vector2(0, 0) +cache/0/128/0/kerning_overrides/72/0 = Vector2(0, 0) +cache/0/128/0/kerning_overrides/128/0 = Vector2(0, 0) -[sub_resource type="DynamicFont" id=2] -size = 36 -font_data = ExtResource( 2 ) +[sub_resource type="FontFile" id="2"] +fallbacks = Array[Font]([ExtResource("2")]) +face_index = null +embolden = null +transform = null +cache/0/16/0/ascent = 0.0 +cache/0/16/0/descent = 0.0 +cache/0/16/0/underline_position = 0.0 +cache/0/16/0/underline_thickness = 0.0 +cache/0/16/0/scale = 1.0 +cache/0/16/0/kerning_overrides/16/0 = Vector2(0, 0) +cache/0/16/0/kerning_overrides/72/0 = Vector2(0, 0) +cache/0/72/0/ascent = 0.0 +cache/0/72/0/descent = 0.0 +cache/0/72/0/underline_position = 0.0 +cache/0/72/0/underline_thickness = 0.0 +cache/0/72/0/scale = 1.0 +cache/0/72/0/kerning_overrides/16/0 = Vector2(0, 0) +cache/0/72/0/kerning_overrides/72/0 = Vector2(0, 0) [node name="GameOver" type="Panel"] +anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 -script = ExtResource( 3 ) -__meta__ = { -"_edit_use_anchors_": false -} +script = ExtResource("3") [node name="Title" type="Label" parent="."] -margin_left = 112.0 -margin_top = 56.0 -margin_right = 891.0 -margin_bottom = 200.0 -custom_fonts/font = SubResource( 1 ) +layout_mode = 0 +offset_left = 219.0 +offset_top = 95.0 +offset_right = 913.0 +offset_bottom = 226.0 +theme_override_fonts/font = SubResource("1") +theme_override_font_sizes/font_size = 128 text = "GAME OVER" [node name="Winner" type="Label" parent="."] -margin_left = 400.0 -margin_top = 264.0 -margin_right = 585.0 -margin_bottom = 301.0 -custom_fonts/font = SubResource( 2 ) +layout_mode = 0 +offset_left = 394.0 +offset_top = 268.0 +offset_right = 763.0 +offset_bottom = 345.0 +theme_override_fonts/font = SubResource("2") +theme_override_font_sizes/font_size = 72 text = "NAME won!" [node name="BackToLobby" type="Button" parent="."] -margin_left = 448.0 -margin_top = 464.0 -margin_right = 576.0 -margin_bottom = 496.0 +layout_mode = 0 +offset_left = 500.0 +offset_top = 447.0 +offset_right = 628.0 +offset_bottom = 479.0 text = "Back to Lobby" + [connection signal="pressed" from="BackToLobby" to="." method="_on_BackToLobby_pressed"] diff --git a/UI/HUD/CancelButton.tscn b/UI/HUD/CancelButton.tscn index 27441cb..e069083 100644 --- a/UI/HUD/CancelButton.tscn +++ b/UI/HUD/CancelButton.tscn @@ -1,28 +1,24 @@ -[gd_scene load_steps=4 format=2] +[gd_scene load_steps=4 format=3 uid="uid://c1t4wotcq114x"] -[ext_resource path="res://UI/HUD/CancelButton.gd" type="Script" id=1] +[ext_resource type="Script" path="res://UI/HUD/CancelButton.gd" id="1"] -[sub_resource type="StyleBoxFlat" id=2] -bg_color = Color( 0, 0, 0, 1 ) - -[sub_resource type="StyleBoxFlat" id=1] -bg_color = Color( 0.6, 0.6, 0.6, 0 ) +[sub_resource type="StyleBoxFlat" id="1"] +bg_color = Color(0.6, 0.6, 0.6, 0) border_width_left = 1 border_width_top = 1 border_width_right = 1 border_width_bottom = 1 -border_color = Color( 0, 0, 0, 1 ) +border_color = Color(0, 0, 0, 1) + +[sub_resource type="StyleBoxFlat" id="2"] +bg_color = Color(0, 0, 0, 1) [node name="CancelButton" type="Button"] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_top = 576.0 -margin_right = -960.0 -custom_styles/hover = SubResource( 2 ) -custom_styles/normal = SubResource( 1 ) +offset_right = 159.0 +offset_bottom = 62.0 +theme_override_styles/normal = SubResource("1") +theme_override_styles/hover = SubResource("2") text = "Cancel" -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} +script = ExtResource("1") + [connection signal="pressed" from="." to="." method="_on_CancelButton_pressed"] diff --git a/UI/HUD/LevelMap.gd b/UI/HUD/LevelMap.gd index 1b4b860..8c67520 100644 --- a/UI/HUD/LevelMap.gd +++ b/UI/HUD/LevelMap.gd @@ -2,7 +2,7 @@ extends Panel func _ready(): - Global.connect("level_map_updated", self, "draw") + Global.connect("level_map_updated", Callable(self, "draw")) self.draw() @@ -11,13 +11,13 @@ func draw(): #var Level = get_parent().get_parent() # HUD > Level for idx in range(Global.Level_Map.size()): # size = 9 - var cell = Cell.instance() + var cell = Cell.instantiate() cell.level_idx = idx cell.set_rect_size(150/3, 150/3) var column = idx % 3 var row = idx / 3 - cell.rect_position.x = cell.rect_size.x*column - cell.rect_position.y = cell.rect_size.y*row + cell.position.x = cell.size.x*column + cell.position.y = cell.size.y*row #if idx == Level.idx: #cell.set_border_width_all(3) diff --git a/UI/HUD/LevelMap.tscn b/UI/HUD/LevelMap.tscn index 646c96a..5f3ab37 100644 --- a/UI/HUD/LevelMap.tscn +++ b/UI/HUD/LevelMap.tscn @@ -1,18 +1,13 @@ -[gd_scene load_steps=3 format=2] +[gd_scene load_steps=3 format=3 uid="uid://ds2y86kx2kfxq"] -[ext_resource path="res://UI/HUD/LevelMap.gd" type="Script" id=1] +[ext_resource type="Script" path="res://UI/HUD/LevelMap.gd" id="1"] -[sub_resource type="StyleBoxFlat" id=1] -bg_color = Color( 0, 0, 0, 0.117647 ) +[sub_resource type="StyleBoxFlat" id="1"] +bg_color = Color(0, 0, 0, 0.117647) [node name="LevelMap" type="Panel"] -margin_left = 864.0 -margin_top = 8.0 -margin_right = 1014.0 -margin_bottom = 158.0 -rect_clip_content = true -custom_styles/panel = SubResource( 1 ) -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} +clip_contents = true +offset_right = 150.0 +offset_bottom = 150.0 +theme_override_styles/panel = SubResource("1") +script = ExtResource("1") diff --git a/UI/HUD/LevelMapCell.gd b/UI/HUD/LevelMapCell.gd index a03fc52..f66c8c3 100644 --- a/UI/HUD/LevelMapCell.gd +++ b/UI/HUD/LevelMapCell.gd @@ -20,7 +20,14 @@ func _ready(): func set_rect_size(x, y): - self.rect_size.x = x - self.rect_size.y = y - $ClearMark.rect_size.x = x - $ClearMark.rect_size.y = y + self.size.x = x + self.size.y = y + + $ClearMark.position = Vector2(0, 0) + $ClearMark.size.x = x + $ClearMark.size.y = y + $ClearMark.add_theme_font_size_override('font_size', y / 2) + + $Time.position = Vector2(3, 3) + + $Name.position = Vector2(3, y - ($Name.size.y / 2)) diff --git a/UI/HUD/LevelMapCell.tscn b/UI/HUD/LevelMapCell.tscn index d933d4f..ac981b9 100644 --- a/UI/HUD/LevelMapCell.tscn +++ b/UI/HUD/LevelMapCell.tscn @@ -1,71 +1,153 @@ -[gd_scene load_steps=7 format=2] +[gd_scene load_steps=7 format=3 uid="uid://dqwexsei86sdd"] -[ext_resource path="res://UI/LevelSelectCell.gd" type="Script" id=1] -[ext_resource path="res://Assets/Fonts/geometry-soft-pro/Geometry_Soft_Pro-Bold_N.otf" type="DynamicFontData" id=2] -[ext_resource path="res://Assets/Fonts/impact-label/Impact_Label_Reversed.ttf" type="DynamicFontData" id=3] +[ext_resource type="Script" path="res://UI/HUD/LevelMapCell.gd" id="1_j6u6l"] +[ext_resource type="FontFile" uid="uid://qbiaulowpomb" path="res://Assets/Fonts/geometry-soft-pro/Geometry_Soft_Pro-Bold_N.otf" id="2"] +[ext_resource type="FontFile" uid="uid://c8r0x3spdh8sg" path="res://Assets/Fonts/impact-label/Impact_Label_Reversed.ttf" id="3"] -[sub_resource type="StyleBoxFlat" id=1] -bg_color = Color( 0.133333, 0.372549, 0.188235, 1 ) +[sub_resource type="StyleBoxFlat" id="1"] +bg_color = Color(0.133333, 0.372549, 0.188235, 1) border_width_left = 1 border_width_top = 1 border_width_right = 1 border_width_bottom = 1 -[sub_resource type="DynamicFont" id=2] -size = 32 -font_data = ExtResource( 3 ) +[sub_resource type="FontFile" id="2"] +fallbacks = Array[Font]([ExtResource("3")]) +face_index = null +embolden = null +transform = null +cache/0/16/0/ascent = 0.0 +cache/0/16/0/descent = 0.0 +cache/0/16/0/underline_position = 0.0 +cache/0/16/0/underline_thickness = 0.0 +cache/0/16/0/scale = 1.0 +cache/0/16/0/kerning_overrides/16/0 = Vector2(0, 0) -[sub_resource type="DynamicFont" id=3] -size = 8 -outline_size = 2 -outline_color = Color( 0, 0, 0, 1 ) -font_data = ExtResource( 2 ) +[sub_resource type="FontFile" id="3"] +fallbacks = Array[Font]([ExtResource("2")]) +face_index = null +embolden = null +transform = null +cache/0/16/0/ascent = 0.0 +cache/0/16/0/descent = 0.0 +cache/0/16/0/underline_position = 0.0 +cache/0/16/0/underline_thickness = 0.0 +cache/0/16/0/scale = 1.0 +cache/0/16/0/kerning_overrides/16/0 = Vector2(0, 0) +cache/0/16/0/kerning_overrides/2/0 = Vector2(0, 0) +cache/0/16/0/kerning_overrides/24/0 = Vector2(0, 0) +cache/0/16/0/kerning_overrides/12/0 = Vector2(0, 0) +cache/0/16/0/kerning_overrides/10/0 = Vector2(0, 0) +cache/0/16/0/kerning_overrides/8/0 = Vector2(0, 0) +cache/0/16/0/kerning_overrides/1/0 = Vector2(0, 0) +cache/0/2/0/ascent = 0.0 +cache/0/2/0/descent = 0.0 +cache/0/2/0/underline_position = 0.0 +cache/0/2/0/underline_thickness = 0.0 +cache/0/2/0/scale = 1.0 +cache/0/2/0/kerning_overrides/16/0 = Vector2(0, 0) +cache/0/2/0/kerning_overrides/2/0 = Vector2(0, 0) +cache/0/2/0/kerning_overrides/24/0 = Vector2(0, 0) +cache/0/2/0/kerning_overrides/12/0 = Vector2(0, 0) +cache/0/2/0/kerning_overrides/10/0 = Vector2(0, 0) +cache/0/2/0/kerning_overrides/8/0 = Vector2(0, 0) +cache/0/2/0/kerning_overrides/1/0 = Vector2(0, 0) +cache/0/24/0/ascent = 0.0 +cache/0/24/0/descent = 0.0 +cache/0/24/0/underline_position = 0.0 +cache/0/24/0/underline_thickness = 0.0 +cache/0/24/0/scale = 1.0 +cache/0/24/0/kerning_overrides/16/0 = Vector2(0, 0) +cache/0/24/0/kerning_overrides/2/0 = Vector2(0, 0) +cache/0/24/0/kerning_overrides/24/0 = Vector2(0, 0) +cache/0/24/0/kerning_overrides/12/0 = Vector2(0, 0) +cache/0/24/0/kerning_overrides/10/0 = Vector2(0, 0) +cache/0/24/0/kerning_overrides/8/0 = Vector2(0, 0) +cache/0/24/0/kerning_overrides/1/0 = Vector2(0, 0) +cache/0/12/0/ascent = 0.0 +cache/0/12/0/descent = 0.0 +cache/0/12/0/underline_position = 0.0 +cache/0/12/0/underline_thickness = 0.0 +cache/0/12/0/scale = 1.0 +cache/0/12/0/kerning_overrides/16/0 = Vector2(0, 0) +cache/0/12/0/kerning_overrides/2/0 = Vector2(0, 0) +cache/0/12/0/kerning_overrides/24/0 = Vector2(0, 0) +cache/0/12/0/kerning_overrides/12/0 = Vector2(0, 0) +cache/0/12/0/kerning_overrides/10/0 = Vector2(0, 0) +cache/0/12/0/kerning_overrides/8/0 = Vector2(0, 0) +cache/0/12/0/kerning_overrides/1/0 = Vector2(0, 0) +cache/0/10/0/ascent = 0.0 +cache/0/10/0/descent = 0.0 +cache/0/10/0/underline_position = 0.0 +cache/0/10/0/underline_thickness = 0.0 +cache/0/10/0/scale = 1.0 +cache/0/10/0/kerning_overrides/16/0 = Vector2(0, 0) +cache/0/10/0/kerning_overrides/2/0 = Vector2(0, 0) +cache/0/10/0/kerning_overrides/24/0 = Vector2(0, 0) +cache/0/10/0/kerning_overrides/12/0 = Vector2(0, 0) +cache/0/10/0/kerning_overrides/10/0 = Vector2(0, 0) +cache/0/10/0/kerning_overrides/8/0 = Vector2(0, 0) +cache/0/10/0/kerning_overrides/1/0 = Vector2(0, 0) +cache/0/8/0/ascent = 0.0 +cache/0/8/0/descent = 0.0 +cache/0/8/0/underline_position = 0.0 +cache/0/8/0/underline_thickness = 0.0 +cache/0/8/0/scale = 1.0 +cache/0/8/0/kerning_overrides/16/0 = Vector2(0, 0) +cache/0/8/0/kerning_overrides/2/0 = Vector2(0, 0) +cache/0/8/0/kerning_overrides/24/0 = Vector2(0, 0) +cache/0/8/0/kerning_overrides/12/0 = Vector2(0, 0) +cache/0/8/0/kerning_overrides/10/0 = Vector2(0, 0) +cache/0/8/0/kerning_overrides/8/0 = Vector2(0, 0) +cache/0/8/0/kerning_overrides/1/0 = Vector2(0, 0) +cache/0/1/0/ascent = 0.0 +cache/0/1/0/descent = 0.0 +cache/0/1/0/underline_position = 0.0 +cache/0/1/0/underline_thickness = 0.0 +cache/0/1/0/scale = 1.0 +cache/0/1/0/kerning_overrides/16/0 = Vector2(0, 0) +cache/0/1/0/kerning_overrides/2/0 = Vector2(0, 0) +cache/0/1/0/kerning_overrides/24/0 = Vector2(0, 0) +cache/0/1/0/kerning_overrides/12/0 = Vector2(0, 0) +cache/0/1/0/kerning_overrides/10/0 = Vector2(0, 0) +cache/0/1/0/kerning_overrides/8/0 = Vector2(0, 0) +cache/0/1/0/kerning_overrides/1/0 = Vector2(0, 0) [node name="LevelMapCell" type="Panel"] +anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 -margin_right = -974.0 -margin_bottom = -550.0 -hint_tooltip = "Select Level" -custom_styles/panel = SubResource( 1 ) -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} +offset_right = -974.0 +offset_bottom = -550.0 +tooltip_text = "Select Level" +theme_override_styles/panel = SubResource("1") +script = ExtResource("1_j6u6l") [node name="ClearMark" type="Label" parent="."] -margin_left = 1.0 -margin_top = 1.0 -margin_right = 50.0 -margin_bottom = 50.0 -custom_fonts/font = SubResource( 2 ) +layout_mode = 0 +offset_left = 86.0 +offset_top = 37.0 +offset_right = 96.0 +offset_bottom = 56.0 +theme_override_fonts/font = SubResource("2") text = "X" -align = 1 -valign = 1 -__meta__ = { -"_edit_use_anchors_": false -} +horizontal_alignment = 1 +vertical_alignment = 1 [node name="Time" type="Label" parent="."] -margin_left = 3.72449 -margin_top = 2.01899 -margin_right = 32.7245 -margin_bottom = 15.019 -custom_fonts/font = SubResource( 3 ) +layout_mode = 0 +offset_right = 28.0 +offset_bottom = 16.0 +theme_override_fonts/font = SubResource("3") +theme_override_font_sizes/font_size = 12 text = "0.00s" -valign = 1 -__meta__ = { -"_edit_use_anchors_": false -} [node name="Name" type="Label" parent="."] -margin_left = 3.95238 -margin_top = 31.297 -margin_right = 61.9524 -margin_bottom = 52.297 -custom_fonts/font = SubResource( 3 ) +layout_mode = 0 +offset_left = 1.0 +offset_top = 85.0 +offset_right = 25.0 +offset_bottom = 97.0 +theme_override_fonts/font = SubResource("3") +theme_override_font_sizes/font_size = 8 text = "Player" -valign = 1 -__meta__ = { -"_edit_use_anchors_": false -} diff --git a/UI/HUD/Timer.tscn b/UI/HUD/Timer.tscn index 93a3512..983b3d4 100644 --- a/UI/HUD/Timer.tscn +++ b/UI/HUD/Timer.tscn @@ -1,13 +1,6 @@ -[gd_scene format=2] +[gd_scene format=3 uid="uid://cch42nnvwpi67"] [node name="Timer" type="Label"] -anchor_right = 1.0 -anchor_bottom = 1.0 -margin_left = 10.0 -margin_top = 10.0 -margin_right = 10.0 -margin_bottom = 10.0 +offset_right = 51.0 +offset_bottom = 26.0 text = "0.00s" -__meta__ = { -"_edit_use_anchors_": false -} diff --git a/UI/LevelSelect.gd b/UI/LevelSelect.gd index 2d40a36..368d338 100644 --- a/UI/LevelSelect.gd +++ b/UI/LevelSelect.gd @@ -2,7 +2,7 @@ extends Control func _ready(): - Global.connect("level_map_updated", self, "draw") + Global.connect("level_map_updated", Callable(self, "draw")) draw() @@ -10,14 +10,17 @@ func draw(): var Cell = load("res://UI/LevelSelectCell.tscn") for idx in range(Global.Level_Map.size()): # size = 9 - var cell = Cell.instance() + var cell = Cell.instantiate() cell.level_idx = idx - cell.set_rect_size(1024/3, 600/3) + cell.set_rect_size( + get_viewport_rect().size.x/3, + get_viewport_rect().size.y/3 + ) var column = idx % 3 var row = idx / 3 - cell.rect_position.x = cell.rect_size.x*column - cell.rect_position.y = cell.rect_size.y*row - cell.connect("gui_input", self, '_button_pressed', [idx]) + cell.position.x = cell.size.x*column + cell.position.y = cell.size.y*row + cell.connect("gui_input", Callable(self, '_button_pressed').bind(idx)) self.add_child(cell) diff --git a/UI/LevelSelect.tscn b/UI/LevelSelect.tscn index ef31cde..053edc0 100644 --- a/UI/LevelSelect.tscn +++ b/UI/LevelSelect.tscn @@ -1,11 +1,12 @@ -[gd_scene load_steps=2 format=2] +[gd_scene load_steps=2 format=3 uid="uid://cen0nq086nuhf"] -[ext_resource path="res://UI/LevelSelect.gd" type="Script" id=1] +[ext_resource type="Script" path="res://UI/LevelSelect.gd" id="1"] [node name="LevelSelect" type="Control"] +layout_mode = 3 +anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} +grow_horizontal = 2 +grow_vertical = 2 +script = ExtResource("1") diff --git a/UI/LevelSelectCell.gd b/UI/LevelSelectCell.gd index a03fc52..a756210 100644 --- a/UI/LevelSelectCell.gd +++ b/UI/LevelSelectCell.gd @@ -20,7 +20,14 @@ func _ready(): func set_rect_size(x, y): - self.rect_size.x = x - self.rect_size.y = y - $ClearMark.rect_size.x = x - $ClearMark.rect_size.y = y + self.size.x = x + self.size.y = y + + $ClearMark.position = Vector2(0, 0) + $ClearMark.size.x = x + $ClearMark.size.y = y + $ClearMark.add_theme_font_size_override('font_size', y / 2) + + $Time.position = Vector2(3, 3) + + $Name.position = Vector2(3, y - $Name.size.y) diff --git a/UI/LevelSelectCell.tscn b/UI/LevelSelectCell.tscn index 3660cef..b76111b 100644 --- a/UI/LevelSelectCell.tscn +++ b/UI/LevelSelectCell.tscn @@ -1,70 +1,71 @@ -[gd_scene load_steps=7 format=2] +[gd_scene load_steps=6 format=3 uid="uid://btujg2tw5k8on"] -[ext_resource path="res://UI/LevelSelectCell.gd" type="Script" id=1] -[ext_resource path="res://Assets/Fonts/geometry-soft-pro/Geometry_Soft_Pro-Bold_N.otf" type="DynamicFontData" id=2] -[ext_resource path="res://Assets/Fonts/impact-label/Impact_Label_Reversed.ttf" type="DynamicFontData" id=3] +[ext_resource type="Script" path="res://UI/LevelSelectCell.gd" id="1"] +[ext_resource type="FontFile" uid="uid://qbiaulowpomb" path="res://Assets/Fonts/geometry-soft-pro/Geometry_Soft_Pro-Bold_N.otf" id="2"] +[ext_resource type="FontFile" uid="uid://c8r0x3spdh8sg" path="res://Assets/Fonts/impact-label/Impact_Label_Reversed.ttf" id="2_fcaqg"] -[sub_resource type="StyleBoxFlat" id=1] -bg_color = Color( 0.133333, 0.372549, 0.188235, 1 ) +[sub_resource type="StyleBoxFlat" id="1"] +bg_color = Color(0.133333, 0.372549, 0.188235, 1) border_width_left = 1 border_width_top = 1 border_width_right = 1 border_width_bottom = 1 -[sub_resource type="DynamicFont" id=2] -size = 120 -font_data = ExtResource( 3 ) - -[sub_resource type="DynamicFont" id=3] -size = 20 -outline_size = 2 -outline_color = Color( 0, 0, 0, 1 ) -font_data = ExtResource( 2 ) +[sub_resource type="FontFile" id="3"] +fallbacks = Array[Font]([ExtResource("2")]) +face_index = null +embolden = null +transform = null +cache/0/16/0/ascent = 0.0 +cache/0/16/0/descent = 0.0 +cache/0/16/0/underline_position = 0.0 +cache/0/16/0/underline_thickness = 0.0 +cache/0/16/0/scale = 1.0 +cache/0/16/0/kerning_overrides/16/0 = Vector2(0, 0) +cache/0/16/0/kerning_overrides/72/0 = Vector2(0, 0) +cache/0/72/0/ascent = 0.0 +cache/0/72/0/descent = 0.0 +cache/0/72/0/underline_position = 0.0 +cache/0/72/0/underline_thickness = 0.0 +cache/0/72/0/scale = 1.0 +cache/0/72/0/kerning_overrides/16/0 = Vector2(0, 0) +cache/0/72/0/kerning_overrides/72/0 = Vector2(0, 0) [node name="LevelSelectCell" type="Panel"] +anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 -margin_right = -683.0 -margin_bottom = -400.0 -hint_tooltip = "Select Level" -custom_styles/panel = SubResource( 1 ) -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} +offset_right = -683.0 +offset_bottom = -400.0 +tooltip_text = "Select Level" +theme_override_styles/panel = SubResource("1") +script = ExtResource("1") [node name="ClearMark" type="Label" parent="."] -margin_top = 1.0 -margin_right = 341.0 -margin_bottom = 201.0 -custom_fonts/font = SubResource( 2 ) +layout_mode = 0 +offset_left = 233.0 +offset_top = 103.0 +offset_right = 243.0 +offset_bottom = 129.0 +theme_override_fonts/font = ExtResource("2_fcaqg") text = "X" -align = 1 -valign = 1 -__meta__ = { -"_edit_use_anchors_": false -} +horizontal_alignment = 1 +vertical_alignment = 1 [node name="Time" type="Label" parent="."] -margin_left = 7.0 -margin_top = 3.0 -margin_right = 54.0 -margin_bottom = 24.0 -custom_fonts/font = SubResource( 3 ) +layout_mode = 0 +offset_left = 7.0 +offset_top = 3.0 +offset_right = 54.0 +offset_bottom = 24.0 +theme_override_fonts/font = SubResource("3") text = "0.00s" -valign = 1 -__meta__ = { -"_edit_use_anchors_": false -} [node name="Name" type="Label" parent="."] -margin_left = 8.0 -margin_top = 176.0 -margin_right = 66.0 -margin_bottom = 197.0 -custom_fonts/font = SubResource( 3 ) +layout_mode = 0 +offset_left = 5.0 +offset_top = 221.0 +offset_right = 63.0 +offset_bottom = 242.0 +theme_override_fonts/font = SubResource("3") text = "Player" -valign = 1 -__meta__ = { -"_edit_use_anchors_": false -} diff --git a/UI/Menu/KeyBindings.gd b/UI/Menu/KeyBindings.gd index 4650be9..eca3d22 100644 --- a/UI/Menu/KeyBindings.gd +++ b/UI/Menu/KeyBindings.gd @@ -24,8 +24,8 @@ func set_keys(): var input = get_node("Panel/VBoxContainer/" + str(action) + "/Input") input.set_pressed(false) - var action_list = InputMap.get_action_list(action) - if action_list.empty(): + var action_list = InputMap.action_get_events(action) + if action_list.is_empty(): input.set_text("SET BUTTON") else: var text = "" diff --git a/UI/Menu/KeyBindings.tscn b/UI/Menu/KeyBindings.tscn index 948b44b..76efdde 100644 --- a/UI/Menu/KeyBindings.tscn +++ b/UI/Menu/KeyBindings.tscn @@ -1,123 +1,91 @@ -[gd_scene load_steps=2 format=2] +[gd_scene load_steps=2 format=3 uid="uid://bs0r1xpkaxjr0"] -[ext_resource path="res://UI/Menu/KeyBindings.gd" type="Script" id=1] +[ext_resource type="Script" path="res://UI/Menu/KeyBindings.gd" id="1"] [node name="KeyBindings" type="Control"] +layout_mode = 3 +anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 -margin_left = 64.0 -margin_top = 64.0 -margin_right = -64.0 -margin_bottom = -88.0 -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} +offset_left = 64.0 +offset_top = 64.0 +offset_right = -64.0 +offset_bottom = -88.0 +script = ExtResource("1") [node name="Panel" type="Panel" parent="."] -margin_right = 896.0 -margin_bottom = 448.0 +layout_mode = 0 +offset_right = 896.0 +offset_bottom = 448.0 [node name="VBoxContainer" type="VBoxContainer" parent="Panel"] -margin_left = 256.0 -margin_top = 24.0 -margin_right = 640.0 -margin_bottom = 424.0 -__meta__ = { -"_edit_use_anchors_": false -} +layout_mode = 0 +offset_left = 256.0 +offset_top = 24.0 +offset_right = 640.0 +offset_bottom = 424.0 [node name="DIRECTION_LEFT" type="HBoxContainer" parent="Panel/VBoxContainer"] -margin_right = 384.0 -margin_bottom = 20.0 +layout_mode = 2 [node name="Label" type="Label" parent="Panel/VBoxContainer/DIRECTION_LEFT"] -margin_top = 3.0 -margin_right = 24.0 -margin_bottom = 17.0 +layout_mode = 2 text = "Left" [node name="Input" type="Button" parent="Panel/VBoxContainer/DIRECTION_LEFT"] -margin_left = 28.0 -margin_right = 40.0 -margin_bottom = 20.0 +layout_mode = 2 [node name="Clear" type="Button" parent="Panel/VBoxContainer/DIRECTION_LEFT"] -margin_left = 44.0 -margin_right = 88.0 -margin_bottom = 20.0 +layout_mode = 2 text = "Clear" [node name="DIRECTION_RIGHT" type="HBoxContainer" parent="Panel/VBoxContainer"] -margin_top = 24.0 -margin_right = 384.0 -margin_bottom = 44.0 +layout_mode = 2 [node name="Label" type="Label" parent="Panel/VBoxContainer/DIRECTION_RIGHT"] -margin_top = 3.0 -margin_right = 32.0 -margin_bottom = 17.0 +layout_mode = 2 text = "Right" [node name="Input" type="Button" parent="Panel/VBoxContainer/DIRECTION_RIGHT"] -margin_left = 36.0 -margin_right = 48.0 -margin_bottom = 20.0 +layout_mode = 2 [node name="Clear" type="Button" parent="Panel/VBoxContainer/DIRECTION_RIGHT"] -margin_left = 52.0 -margin_right = 96.0 -margin_bottom = 20.0 +layout_mode = 2 text = "Clear" [node name="JUMP" type="HBoxContainer" parent="Panel/VBoxContainer"] -margin_top = 48.0 -margin_right = 384.0 -margin_bottom = 68.0 +layout_mode = 2 [node name="Label" type="Label" parent="Panel/VBoxContainer/JUMP"] -margin_top = 3.0 -margin_right = 32.0 -margin_bottom = 17.0 +layout_mode = 2 text = "Jump" [node name="Input" type="Button" parent="Panel/VBoxContainer/JUMP"] -margin_left = 36.0 -margin_right = 48.0 -margin_bottom = 20.0 +layout_mode = 2 [node name="Clear" type="Button" parent="Panel/VBoxContainer/JUMP"] -margin_left = 52.0 -margin_right = 96.0 -margin_bottom = 20.0 +layout_mode = 2 text = "Clear" [node name="RUN" type="HBoxContainer" parent="Panel/VBoxContainer"] -margin_top = 72.0 -margin_right = 384.0 -margin_bottom = 92.0 +layout_mode = 2 [node name="Label" type="Label" parent="Panel/VBoxContainer/RUN"] -margin_top = 3.0 -margin_right = 24.0 -margin_bottom = 17.0 +layout_mode = 2 text = "Run" [node name="Input" type="Button" parent="Panel/VBoxContainer/RUN"] -margin_left = 28.0 -margin_right = 40.0 -margin_bottom = 20.0 +layout_mode = 2 [node name="Clear" type="Button" parent="Panel/VBoxContainer/RUN"] -margin_left = 44.0 -margin_right = 88.0 -margin_bottom = 20.0 +layout_mode = 2 text = "Clear" -[connection signal="pressed" from="Panel/VBoxContainer/DIRECTION_LEFT/Input" to="." method="_on_Input_pressed" binds= [ "DIRECTION_LEFT" ]] -[connection signal="pressed" from="Panel/VBoxContainer/DIRECTION_LEFT/Clear" to="." method="_on_Clear_pressed" binds= [ "DIRECTION_LEFT" ]] -[connection signal="pressed" from="Panel/VBoxContainer/DIRECTION_RIGHT/Input" to="." method="_on_Input_pressed" binds= [ "DIRECTION_RIGHT" ]] -[connection signal="pressed" from="Panel/VBoxContainer/DIRECTION_RIGHT/Clear" to="." method="_on_Clear_pressed" binds= [ "DIRECTION_RIGHT" ]] -[connection signal="pressed" from="Panel/VBoxContainer/JUMP/Input" to="." method="_on_Input_pressed" binds= [ "JUMP" ]] -[connection signal="pressed" from="Panel/VBoxContainer/JUMP/Clear" to="." method="_on_Clear_pressed" binds= [ "JUMP" ]] -[connection signal="pressed" from="Panel/VBoxContainer/RUN/Input" to="." method="_on_Input_pressed" binds= [ "RUN" ]] -[connection signal="pressed" from="Panel/VBoxContainer/RUN/Clear" to="." method="_on_Clear_pressed" binds= [ "RUN" ]] + +[connection signal="pressed" from="Panel/VBoxContainer/DIRECTION_LEFT/Input" to="." method="_on_Input_pressed" binds= ["DIRECTION_LEFT"]] +[connection signal="pressed" from="Panel/VBoxContainer/DIRECTION_LEFT/Clear" to="." method="_on_Clear_pressed" binds= ["DIRECTION_LEFT"]] +[connection signal="pressed" from="Panel/VBoxContainer/DIRECTION_RIGHT/Input" to="." method="_on_Input_pressed" binds= ["DIRECTION_RIGHT"]] +[connection signal="pressed" from="Panel/VBoxContainer/DIRECTION_RIGHT/Clear" to="." method="_on_Clear_pressed" binds= ["DIRECTION_RIGHT"]] +[connection signal="pressed" from="Panel/VBoxContainer/JUMP/Input" to="." method="_on_Input_pressed" binds= ["JUMP"]] +[connection signal="pressed" from="Panel/VBoxContainer/JUMP/Clear" to="." method="_on_Clear_pressed" binds= ["JUMP"]] +[connection signal="pressed" from="Panel/VBoxContainer/RUN/Input" to="." method="_on_Input_pressed" binds= ["RUN"]] +[connection signal="pressed" from="Panel/VBoxContainer/RUN/Clear" to="." method="_on_Clear_pressed" binds= ["RUN"]] diff --git a/UI/Menu/Menu.gd b/UI/Menu/Menu.gd index 400f669..02971e5 100644 --- a/UI/Menu/Menu.gd +++ b/UI/Menu/Menu.gd @@ -3,7 +3,7 @@ extends CanvasLayer func _ready(): - self.pause_mode = PAUSE_MODE_PROCESS + self.process_mode = PROCESS_MODE_ALWAYS func close(): diff --git a/UI/Menu/Menu.tscn b/UI/Menu/Menu.tscn index 69c14c2..c29cf22 100644 --- a/UI/Menu/Menu.tscn +++ b/UI/Menu/Menu.tscn @@ -1,41 +1,38 @@ -[gd_scene load_steps=5 format=2] +[gd_scene load_steps=5 format=3 uid="uid://dg1cuxm1da1rh"] -[ext_resource path="res://UI/Menu/Menu.gd" type="Script" id=1] -[ext_resource path="res://UI/Menu/KeyBindings.tscn" type="PackedScene" id=2] +[ext_resource type="Script" path="res://UI/Menu/Menu.gd" id="1"] +[ext_resource type="PackedScene" path="res://UI/Menu/KeyBindings.tscn" id="2"] -[sub_resource type="StyleBoxFlat" id=3] -bg_color = Color( 0, 0, 0, 0.882353 ) +[sub_resource type="StyleBoxFlat" id="3"] +bg_color = Color(0, 0, 0, 0.882353) -[sub_resource type="StyleBoxFlat" id=2] -bg_color = Color( 1, 1, 1, 0 ) +[sub_resource type="StyleBoxFlat" id="2"] +bg_color = Color(1, 1, 1, 0) border_width_left = 1 border_width_top = 1 border_width_right = 1 border_width_bottom = 1 [node name="Menu" type="CanvasLayer"] -pause_mode = 2 -script = ExtResource( 1 ) +process_mode = 2 +script = ExtResource("1") [node name="Container" type="Panel" parent="."] -margin_right = 1024.0 -margin_bottom = 600.0 -custom_styles/panel = SubResource( 3 ) -__meta__ = { -"_edit_use_anchors_": false -} +offset_right = 1024.0 +offset_bottom = 600.0 +theme_override_styles/panel = SubResource("3") [node name="Close" type="Button" parent="Container"] -margin_left = 976.0 -margin_right = 1023.0 -margin_bottom = 20.0 -custom_styles/normal = SubResource( 2 ) +layout_mode = 0 +offset_left = 976.0 +offset_right = 1023.0 +offset_bottom = 20.0 +theme_override_styles/normal = SubResource("2") text = "Close" -__meta__ = { -"_edit_use_anchors_": false -} -[node name="KeyBindings" parent="Container" instance=ExtResource( 2 )] -margin_right = 24.0 -margin_bottom = 24.0 +[node name="KeyBindings" parent="Container" instance=ExtResource("2")] +anchors_preset = 0 +offset_right = 24.0 +offset_bottom = 24.0 + [connection signal="pressed" from="Container/Close" to="." method="_on_Close_pressed"] diff --git a/UI/Menu/MenuButton.tscn b/UI/Menu/MenuButton.tscn index b5626fb..763420c 100644 --- a/UI/Menu/MenuButton.tscn +++ b/UI/Menu/MenuButton.tscn @@ -1,15 +1,14 @@ -[gd_scene load_steps=2 format=2] +[gd_scene load_steps=2 format=3 uid="uid://b0fuyoa5jbxn0"] -[ext_resource path="res://UI/Menu/MenuButton.gd" type="Script" id=1] +[ext_resource type="Script" path="res://UI/Menu/MenuButton.gd" id="1"] [node name="MenuButton" type="Button"] +anchors_preset = 15 anchor_right = 1.0 anchor_bottom = 1.0 -margin_right = -976.0 -margin_bottom = -580.0 +offset_right = -976.0 +offset_bottom = -580.0 text = "Menu" -script = ExtResource( 1 ) -__meta__ = { -"_edit_use_anchors_": false -} +script = ExtResource("1") + [connection signal="pressed" from="." to="." method="_on_MenuButton_pressed"] |