diff --git a/assets/graphics/gui/rankings/3rd.png b/assets/graphics/gui/rankings/3rd.png index c175d57..4ceffe1 100644 Binary files a/assets/graphics/gui/rankings/3rd.png and b/assets/graphics/gui/rankings/3rd.png differ diff --git a/assets/graphics/gui/rankings/3rd.png.import b/assets/graphics/gui/rankings/3rd.png.import index 4301db6..1c3e3f6 100644 --- a/assets/graphics/gui/rankings/3rd.png.import +++ b/assets/graphics/gui/rankings/3rd.png.import @@ -2,7 +2,7 @@ importer="texture" type="CompressedTexture2D" -uid="uid://f5mgglfrifjd" +uid="uid://bowng12514p53" path="res://.godot/imported/3rd.png-3cb9417b465e45d108dc5bb387e9572c.ctex" metadata={ "vram_texture": false diff --git a/scenes/main.tscn b/scenes/main.tscn index 90ba788..9b60c05 100644 --- a/scenes/main.tscn +++ b/scenes/main.tscn @@ -23,6 +23,7 @@ [ext_resource type="Texture2D" uid="uid://ctgxeo2i3vcfq" path="res://assets/graphics/gui/gauge/Segment1_empty.png" id="16_yq6so"] [ext_resource type="Texture2D" uid="uid://djbin5556lwsx" path="res://assets/graphics/gui/gauge/Segment2_empty.png" id="17_fv21b"] [ext_resource type="Theme" uid="uid://0dhxl4ohyxh8" path="res://assets/graphics/game_setting/setting_theme.tres" id="18_pm3ni"] +[ext_resource type="Texture2D" uid="uid://cxp0k2spgs080" path="res://assets/graphics/gui/gauge/gauge_ready.png" id="22_kmb1v"] [ext_resource type="Texture2D" uid="uid://ba80xnybpixw2" path="res://assets/graphics/touch_control/take_tile.png" id="25_qkpxi"] [ext_resource type="Texture2D" uid="uid://bsgqrjx2ity4c" path="res://assets/graphics/touch_control/speed.png" id="26_2f3dj"] [ext_resource type="Texture2D" uid="uid://pwxo4lb87yi" path="res://assets/graphics/touch_control/put_tile.png" id="26_5q0nq"] @@ -30,7 +31,7 @@ [ext_resource type="Texture2D" uid="uid://umw3e8nfe3vr" path="res://assets/graphics/touch_control/attack_mode.png" id="27_dgi5k"] [ext_resource type="Texture2D" uid="uid://cfpxknbdsk4u" path="res://assets/graphics/character_selection/sc_characters/sc_unknown.png" id="27_j8jky"] [ext_resource type="Texture2D" uid="uid://ikek8mcpeob5" path="res://assets/graphics/gui/rankings/2nd.png" id="28_fuf3a"] -[ext_resource type="Texture2D" uid="uid://f5mgglfrifjd" path="res://assets/graphics/gui/rankings/3rd.png" id="29_pibwh"] +[ext_resource type="Texture2D" uid="uid://bowng12514p53" path="res://assets/graphics/gui/rankings/3rd.png" id="29_pibwh"] [ext_resource type="Texture2D" uid="uid://biun2yvglxgij" path="res://assets/graphics/touch_control/grab_tekton.png" id="36_pibwh"] [ext_resource type="Script" uid="uid://86ikh0wuqk7v" path="res://scripts/ui/powerup_inventory_ui.gd" id="powerup_ui_script"] [ext_resource type="Script" uid="uid://b54tfa0n6kogi" path="res://scripts/managers/touch_controls.gd" id="touch_manager"] @@ -1124,44 +1125,62 @@ custom_minimum_size = Vector2(207, 135) layout_mode = 2 theme_override_styles/panel = SubResource("StyleBoxTexture_pibwh") -[node name="PowerUpBar" type="PanelContainer" parent="." unique_id=1775378146] +[node name="PowerBar" type="Control" parent="." unique_id=1778094375] +layout_mode = 3 +anchors_preset = 0 +offset_left = 24.0 +offset_top = 370.0 +offset_right = 169.0 +offset_bottom = 406.0 +rotation = -0.10297442 + +[node name="PowerUpBar" type="PanelContainer" parent="PowerBar" unique_id=1775378146] +layout_mode = 1 anchors_preset = 4 anchor_top = 0.5 anchor_bottom = 0.5 -offset_left = 24.0 -offset_top = 10.0 -offset_right = 169.0 -offset_bottom = 46.0 +offset_top = -18.0 +offset_right = 145.0 +offset_bottom = 18.0 grow_vertical = 2 -rotation = -0.10297442 scale = Vector2(1.5, 1.5) theme_override_styles/panel = SubResource("StyleBoxTexture_tel4y") -[node name="HBox" type="HBoxContainer" parent="PowerUpBar" unique_id=334600330] +[node name="HBox" type="HBoxContainer" parent="PowerBar/PowerUpBar" unique_id=334600330] layout_mode = 2 theme_override_constants/separation = 0 alignment = 1 -[node name="PowerLabel" type="Panel" parent="PowerUpBar/HBox" unique_id=1662719884] +[node name="PowerLabel" type="Panel" parent="PowerBar/PowerUpBar/HBox" unique_id=1662719884] custom_minimum_size = Vector2(39, 36) layout_mode = 2 theme_override_styles/panel = SubResource("StyleBoxTexture_qkpxi") -[node name="Segment0" type="Panel" parent="PowerUpBar/HBox" unique_id=500774723] +[node name="Segment0" type="Panel" parent="PowerBar/PowerUpBar/HBox" unique_id=500774723] custom_minimum_size = Vector2(33, 36) layout_mode = 2 theme_override_styles/panel = SubResource("StyleBoxTexture_5q0nq") -[node name="Segment1" type="Panel" parent="PowerUpBar/HBox" unique_id=1042222722] +[node name="Segment1" type="Panel" parent="PowerBar/PowerUpBar/HBox" unique_id=1042222722] custom_minimum_size = Vector2(33, 36) layout_mode = 2 theme_override_styles/panel = SubResource("StyleBoxTexture_dgi5k") -[node name="Segment2" type="Panel" parent="PowerUpBar/HBox" unique_id=272336972] +[node name="Segment2" type="Panel" parent="PowerBar/PowerUpBar/HBox" unique_id=272336972] custom_minimum_size = Vector2(40, 36) layout_mode = 2 theme_override_styles/panel = SubResource("StyleBoxTexture_j8jky") +[node name="PowerUpReady" type="TextureRect" parent="PowerBar" unique_id=60059461] +visible = false +layout_mode = 0 +offset_left = 39.0 +offset_top = -13.0 +offset_right = 231.3631 +offset_bottom = 58.511047 +texture = ExtResource("22_kmb1v") +expand_mode = 1 + [node name="GoalsTimer" type="PanelContainer" parent="." unique_id=2106663301] visible = false offset_left = 223.8717 @@ -1265,16 +1284,18 @@ layout_mode = 2 theme_override_styles/panel = SubResource("StyleBoxTexture_5he1u") [node name="HBox" type="HBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry1" unique_id=617135879] +custom_minimum_size = Vector2(0, 100) layout_mode = 2 theme_override_constants/separation = 2 [node name="RankLabel" type="Label" parent="LeaderboardPanel/MarginContainer/VBox/Entry1/HBox" unique_id=828754165] custom_minimum_size = Vector2(70, 0) layout_mode = 2 +theme_override_colors/font_color = Color(0.9647059, 0.7607843, 0.20392157, 1) theme_override_colors/font_outline_color = Color(0, 0, 0, 1) -theme_override_constants/outline_size = 7 +theme_override_constants/outline_size = 15 theme_override_fonts/font = ExtResource("13_j8jky") -theme_override_font_sizes/font_size = 36 +theme_override_font_sizes/font_size = 50 text = "1st" horizontal_alignment = 1 vertical_alignment = 1 @@ -1283,12 +1304,12 @@ vertical_alignment = 1 custom_minimum_size = Vector2(100, 100) layout_mode = 2 texture = ExtResource("27_j8jky") -expand_mode = 1 -stretch_mode = 5 +expand_mode = 5 +stretch_mode = 6 [node name="SplitterContainer" type="VBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry1/HBox" unique_id=1068203836] layout_mode = 2 -theme_override_constants/separation = 22 +theme_override_constants/separation = 18 alignment = 1 [node name="SectionA" type="HBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry1/HBox/SplitterContainer" unique_id=1497811185] @@ -1299,14 +1320,13 @@ theme_override_constants/separation = 0 custom_minimum_size = Vector2(150, 0) layout_mode = 2 theme_override_fonts/font = ExtResource("13_j8jky") -theme_override_font_sizes/font_size = 22 +theme_override_font_sizes/font_size = 32 text = "Player 1" -vertical_alignment = 1 clip_text = true [node name="GhostIcon" type="TextureRect" parent="LeaderboardPanel/MarginContainer/VBox/Entry1/HBox/SplitterContainer/SectionA" unique_id=143108099] modulate = Color(1, 1, 1, 0) -custom_minimum_size = Vector2(25, 25) +custom_minimum_size = Vector2(40, 40) layout_mode = 2 expand_mode = 1 stretch_mode = 5 @@ -1321,7 +1341,7 @@ custom_minimum_size = Vector2(120, 0) layout_mode = 2 size_flags_horizontal = 3 theme_override_fonts/font = ExtResource("13_j8jky") -theme_override_font_sizes/font_size = 22 +theme_override_font_sizes/font_size = 32 text = "0" [node name="MiniPowerUpBar" type="HBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry1/HBox/SplitterContainer/SectionB" unique_id=1277323584] @@ -1348,15 +1368,16 @@ theme_override_styles/panel = SubResource("StyleBoxTexture_5poiv") [node name="HBox" type="HBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry2" unique_id=1942870621] layout_mode = 2 -theme_override_constants/separation = 2 +theme_override_constants/separation = 0 [node name="RankLabel" type="Label" parent="LeaderboardPanel/MarginContainer/VBox/Entry2/HBox" unique_id=1946714047] custom_minimum_size = Vector2(70, 0) layout_mode = 2 +theme_override_colors/font_color = Color(0.84313726, 0.84313726, 0.84313726, 1) theme_override_colors/font_outline_color = Color(0, 0, 0, 1) -theme_override_constants/outline_size = 7 +theme_override_constants/outline_size = 15 theme_override_fonts/font = ExtResource("13_j8jky") -theme_override_font_sizes/font_size = 36 +theme_override_font_sizes/font_size = 46 text = "2nd" horizontal_alignment = 1 vertical_alignment = 1 @@ -1366,11 +1387,11 @@ custom_minimum_size = Vector2(100, 100) layout_mode = 2 texture = ExtResource("27_j8jky") expand_mode = 1 -stretch_mode = 5 +stretch_mode = 6 [node name="SplitterContainer" type="VBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry2/HBox" unique_id=2134048836] layout_mode = 2 -theme_override_constants/separation = 22 +theme_override_constants/separation = 8 alignment = 1 [node name="SectionA" type="HBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry2/HBox/SplitterContainer" unique_id=1404467822] @@ -1381,14 +1402,14 @@ theme_override_constants/separation = 0 custom_minimum_size = Vector2(150, 0) layout_mode = 2 theme_override_fonts/font = ExtResource("13_j8jky") -theme_override_font_sizes/font_size = 22 +theme_override_font_sizes/font_size = 32 text = "Player 2" vertical_alignment = 1 clip_text = true [node name="GhostIcon" type="TextureRect" parent="LeaderboardPanel/MarginContainer/VBox/Entry2/HBox/SplitterContainer/SectionA" unique_id=414359335] modulate = Color(1, 1, 1, 0) -custom_minimum_size = Vector2(25, 25) +custom_minimum_size = Vector2(40, 40) layout_mode = 2 expand_mode = 1 stretch_mode = 5 @@ -1403,7 +1424,7 @@ custom_minimum_size = Vector2(120, 0) layout_mode = 2 size_flags_horizontal = 3 theme_override_fonts/font = ExtResource("13_j8jky") -theme_override_font_sizes/font_size = 22 +theme_override_font_sizes/font_size = 32 text = "0" [node name="MiniPowerUpBar" type="HBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry2/HBox/SplitterContainer/SectionB" unique_id=219625555] @@ -1435,10 +1456,11 @@ theme_override_constants/separation = 2 [node name="RankLabel" type="Label" parent="LeaderboardPanel/MarginContainer/VBox/Entry3/HBox" unique_id=377846102] custom_minimum_size = Vector2(70, 0) layout_mode = 2 +theme_override_colors/font_color = Color(0.7647059, 0.4392157, 0.3019608, 1) theme_override_colors/font_outline_color = Color(0, 0, 0, 1) -theme_override_constants/outline_size = 7 +theme_override_constants/outline_size = 15 theme_override_fonts/font = ExtResource("13_j8jky") -theme_override_font_sizes/font_size = 36 +theme_override_font_sizes/font_size = 50 text = "3rd" horizontal_alignment = 1 vertical_alignment = 1 @@ -1448,11 +1470,11 @@ custom_minimum_size = Vector2(100, 100) layout_mode = 2 texture = ExtResource("27_j8jky") expand_mode = 1 -stretch_mode = 5 +stretch_mode = 6 [node name="SplitterContainer" type="VBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry3/HBox" unique_id=1969616094] layout_mode = 2 -theme_override_constants/separation = 22 +theme_override_constants/separation = 8 alignment = 1 [node name="SectionA" type="HBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry3/HBox/SplitterContainer" unique_id=1627755679] @@ -1463,14 +1485,14 @@ theme_override_constants/separation = 0 custom_minimum_size = Vector2(150, 0) layout_mode = 2 theme_override_fonts/font = ExtResource("13_j8jky") -theme_override_font_sizes/font_size = 22 +theme_override_font_sizes/font_size = 32 text = "Player 3" vertical_alignment = 1 clip_text = true [node name="GhostIcon" type="TextureRect" parent="LeaderboardPanel/MarginContainer/VBox/Entry3/HBox/SplitterContainer/SectionA" unique_id=616766448] modulate = Color(1, 1, 1, 0) -custom_minimum_size = Vector2(25, 25) +custom_minimum_size = Vector2(40, 40) layout_mode = 2 expand_mode = 1 stretch_mode = 5 @@ -1485,7 +1507,7 @@ custom_minimum_size = Vector2(120, 0) layout_mode = 2 size_flags_horizontal = 3 theme_override_fonts/font = ExtResource("13_j8jky") -theme_override_font_sizes/font_size = 22 +theme_override_font_sizes/font_size = 32 text = "0" [node name="MiniPowerUpBar" type="HBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry3/HBox/SplitterContainer/SectionB" unique_id=473697297] @@ -1517,10 +1539,11 @@ theme_override_constants/separation = 2 [node name="RankLabel" type="Label" parent="LeaderboardPanel/MarginContainer/VBox/Entry4/HBox" unique_id=171801451] custom_minimum_size = Vector2(70, 0) layout_mode = 2 +theme_override_colors/font_color = Color(0.84313726, 0.84313726, 0.84313726, 1) theme_override_colors/font_outline_color = Color(0, 0, 0, 1) -theme_override_constants/outline_size = 7 +theme_override_constants/outline_size = 15 theme_override_fonts/font = ExtResource("13_j8jky") -theme_override_font_sizes/font_size = 36 +theme_override_font_sizes/font_size = 50 text = "4th" horizontal_alignment = 1 vertical_alignment = 1 @@ -1530,11 +1553,11 @@ custom_minimum_size = Vector2(100, 100) layout_mode = 2 texture = ExtResource("27_j8jky") expand_mode = 1 -stretch_mode = 5 +stretch_mode = 6 [node name="SplitterContainer" type="VBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry4/HBox" unique_id=249320303] layout_mode = 2 -theme_override_constants/separation = 22 +theme_override_constants/separation = 8 alignment = 1 [node name="SectionA" type="HBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry4/HBox/SplitterContainer" unique_id=404059862] @@ -1545,14 +1568,14 @@ theme_override_constants/separation = 0 custom_minimum_size = Vector2(150, 0) layout_mode = 2 theme_override_fonts/font = ExtResource("13_j8jky") -theme_override_font_sizes/font_size = 22 +theme_override_font_sizes/font_size = 32 text = "Player 4" vertical_alignment = 1 clip_text = true [node name="GhostIcon" type="TextureRect" parent="LeaderboardPanel/MarginContainer/VBox/Entry4/HBox/SplitterContainer/SectionA" unique_id=316169104] modulate = Color(1, 1, 1, 0) -custom_minimum_size = Vector2(25, 25) +custom_minimum_size = Vector2(40, 40) layout_mode = 2 expand_mode = 1 stretch_mode = 5 @@ -1567,7 +1590,7 @@ custom_minimum_size = Vector2(120, 0) layout_mode = 2 size_flags_horizontal = 3 theme_override_fonts/font = ExtResource("13_j8jky") -theme_override_font_sizes/font_size = 22 +theme_override_font_sizes/font_size = 32 text = "0" [node name="MiniPowerUpBar" type="HBoxContainer" parent="LeaderboardPanel/MarginContainer/VBox/Entry4/HBox/SplitterContainer/SectionB" unique_id=2099215641] diff --git a/scripts/managers/ui_manager.gd b/scripts/managers/ui_manager.gd index 90bd5f2..61ce0c2 100644 --- a/scripts/managers/ui_manager.gd +++ b/scripts/managers/ui_manager.gd @@ -230,14 +230,19 @@ func _connect_powerup_manager_deferred(player): # ============================================================================= var powerup_bar: PanelContainer +var powerup_ready_rect: TextureRect var powerup_segments: Array = [] func setup_powerup_bar_ui(main_node): """Get reference to existing PowerUpBar in scene and cache segment references.""" - powerup_bar = main_node.get_node_or_null("PowerUpBar") + powerup_bar = main_node.get_node_or_null("PowerBar/PowerUpBar") + if not powerup_bar: + powerup_bar = main_node.get_node_or_null("PowerUpBar") if not powerup_bar: push_warning("PowerUpBar node not found in scene") return + + powerup_ready_rect = main_node.get_node_or_null("PowerBar/PowerUpReady") # Get segment references from scene powerup_segments.clear() @@ -276,6 +281,12 @@ func update_powerup_bar(current_points: int, _max_points: int): style.texture = load(tex_path) segment.add_theme_stylebox_override("panel", style) + + if powerup_ready_rect: + if current_points >= _max_points and _max_points > 0: + powerup_ready_rect.visible = true + else: + powerup_ready_rect.visible = false var _previous_bars: int = 0