Refactor HUD and marketplace layout for improved responsiveness and usability
This commit is contained in:
@@ -32,7 +32,6 @@ health_progressbar = NodePath("Panel/PanelContainer/ProgressBar")
|
|||||||
lives_label = NodePath("Panel/PanelContainer/Lives")
|
lives_label = NodePath("Panel/PanelContainer/Lives")
|
||||||
|
|
||||||
[node name="Panel" type="Panel" parent="."]
|
[node name="Panel" type="Panel" parent="."]
|
||||||
custom_minimum_size = Vector2(0, 16)
|
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 10
|
anchors_preset = 10
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
@@ -42,10 +41,11 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_aa3sf")
|
|||||||
|
|
||||||
[node name="PanelContainer" type="HBoxContainer" parent="Panel"]
|
[node name="PanelContainer" type="HBoxContainer" parent="Panel"]
|
||||||
layout_mode = 1
|
layout_mode = 1
|
||||||
anchors_preset = 10
|
anchors_preset = 15
|
||||||
anchor_right = 1.0
|
anchor_right = 1.0
|
||||||
offset_bottom = 16.0
|
anchor_bottom = 1.0
|
||||||
grow_horizontal = 2
|
grow_horizontal = 2
|
||||||
|
grow_vertical = 2
|
||||||
theme_override_constants/separation = 10
|
theme_override_constants/separation = 10
|
||||||
|
|
||||||
[node name="Health Label" type="Label" parent="Panel/PanelContainer"]
|
[node name="Health Label" type="Label" parent="Panel/PanelContainer"]
|
||||||
|
@@ -55,4 +55,4 @@ layout_mode = 2
|
|||||||
size_flags_vertical = 3
|
size_flags_vertical = 3
|
||||||
theme_override_constants/h_separation = 8
|
theme_override_constants/h_separation = 8
|
||||||
theme_override_constants/v_separation = 8
|
theme_override_constants/v_separation = 8
|
||||||
columns = 3
|
columns = 2
|
||||||
|
@@ -482,13 +482,8 @@ position = Vector2(877, -577)
|
|||||||
[node name="HUD" parent="CanvasLayer" instance=ExtResource("1_gbpkv")]
|
[node name="HUD" parent="CanvasLayer" instance=ExtResource("1_gbpkv")]
|
||||||
|
|
||||||
[node name="Marketplace" parent="CanvasLayer" node_paths=PackedStringArray("root", "skill_unlocker") instance=ExtResource("20_ss8k0")]
|
[node name="Marketplace" parent="CanvasLayer" node_paths=PackedStringArray("root", "skill_unlocker") instance=ExtResource("20_ss8k0")]
|
||||||
visible = false
|
|
||||||
custom_minimum_size = Vector2(480, 240)
|
custom_minimum_size = Vector2(480, 240)
|
||||||
anchors_preset = 8
|
offset_top = 16.0
|
||||||
anchor_left = 0.5
|
|
||||||
anchor_top = 0.5
|
|
||||||
anchor_right = 0.5
|
|
||||||
anchor_bottom = 0.5
|
|
||||||
root = NodePath(".")
|
root = NodePath(".")
|
||||||
skill_unlocker = NodePath("../../Brick Player/SkillUnlockerComponent")
|
skill_unlocker = NodePath("../../Brick Player/SkillUnlockerComponent")
|
||||||
|
|
||||||
|
@@ -42,6 +42,7 @@ func create_upgrade_button(skill: SkillData):
|
|||||||
button.pressed.connect(func () -> void: _on_button_pressed(skill))
|
button.pressed.connect(func () -> void: _on_button_pressed(skill))
|
||||||
|
|
||||||
grid.add_child(button)
|
grid.add_child(button)
|
||||||
|
grid.queue_sort()
|
||||||
|
|
||||||
|
|
||||||
func remove_button(skill: SkillData):
|
func remove_button(skill: SkillData):
|
||||||
|
Reference in New Issue
Block a user