Unit panel rewire

This commit is contained in:
gamer147
2026-04-10 09:29:36 -04:00
parent f6ac31b52e
commit b01d8c6648
6 changed files with 176 additions and 39 deletions

19
prefabs/chip_bar.tscn Normal file
View File

@@ -0,0 +1,19 @@
[gd_scene format=3 uid="uid://8edgswcwdiwu"]
[ext_resource type="Script" uid="uid://cvmmsm13nyr62" path="res://scripts/ui/chip_bar.gd" id="1_3whrn"]
[node name="ChipBar" type="Control" unique_id=379110810]
layout_mode = 3
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
script = ExtResource("1_3whrn")
[node name="HFlowContainer" type="HFlowContainer" parent="." unique_id=185867767]
layout_mode = 0
offset_right = 40.0
offset_bottom = 40.0
theme_override_constants/h_separation = 0
theme_override_constants/v_separation = 0

View File

@@ -4,7 +4,8 @@
[ext_resource type="Script" uid="uid://w2wh6gtv3u2l" path="res://scripts/battle/combat_ui.gd" id="2_ui_script"]
[ext_resource type="Texture2D" uid="uid://cavpqnd0qqoou" path="res://assets/ui/SO008B.BMP" id="3_hadma"]
[ext_resource type="Texture2D" uid="uid://cau61m1755dkn" path="res://assets/ui/SO008A.BMP" id="3_tfn3h"]
[ext_resource type="PackedScene" uid="uid://bc5a7tb0my6n5" path="res://prefabs/StylizedNumberDisplay.tscn" id="5_55shj"]
[ext_resource type="PackedScene" uid="uid://bc5a7tb0my6n5" path="res://prefabs/stylized_number_display.tscn" id="5_55shj"]
[ext_resource type="PackedScene" uid="uid://8edgswcwdiwu" path="res://prefabs/chip_bar.tscn" id="6_gqe5k"]
[sub_resource type="AtlasTexture" id="AtlasTexture_hadma"]
atlas = ExtResource("3_tfn3h")
@@ -18,6 +19,10 @@ region = Rect2(393, 280, 168, 77)
atlas = ExtResource("3_hadma")
region = Rect2(141, 0, 513, 169)
[sub_resource type="AtlasTexture" id="AtlasTexture_hr2yf"]
atlas = ExtResource("3_hadma")
region = Rect2(393, 169, 263, 111)
[sub_resource type="AtlasTexture" id="AtlasTexture_3wejr"]
atlas = ExtResource("3_hadma")
region = Rect2(614, 711, 137, 26)
@@ -28,7 +33,23 @@ region = Rect2(614, 737, 55, 20)
[sub_resource type="AtlasTexture" id="AtlasTexture_yayqj"]
atlas = ExtResource("3_hadma")
region = Rect2(546, 839, 272, 39)
region = Rect2(547, 839, 270, 36)
[sub_resource type="AtlasTexture" id="AtlasTexture_eskga"]
atlas = ExtResource("3_hadma")
region = Rect2(249, 272, 3, 14)
[sub_resource type="AtlasTexture" id="AtlasTexture_14b7f"]
atlas = ExtResource("3_hadma")
region = Rect2(246, 272, 3, 14)
[sub_resource type="AtlasTexture" id="AtlasTexture_manhy"]
atlas = ExtResource("3_hadma")
region = Rect2(1055, 151, 28, 19)
[sub_resource type="AtlasTexture" id="AtlasTexture_ox7qj"]
atlas = ExtResource("3_hadma")
region = Rect2(547, 824, 130, 15)
[node name="BattleViewUI" type="CanvasLayer" unique_id=1093388037]
script = ExtResource("2_ui_script")
@@ -76,6 +97,14 @@ offset_bottom = 169.0
grow_horizontal = 0
texture = SubResource("AtlasTexture_gqe5k")
[node name="TextureRect" type="TextureRect" parent="UIBase/Overlay" unique_id=1469571203]
layout_mode = 0
offset_left = 536.0
offset_top = 432.0
offset_right = 799.0
offset_bottom = 543.0
texture = SubResource("AtlasTexture_hr2yf")
[node name="UnitPanel" type="PanelContainer" parent="UIBase" unique_id=2000000001]
unique_name_in_owner = true
visible = false
@@ -254,59 +283,69 @@ anchor_left = 1.0
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 1.0
offset_left = -241.0
offset_left = -265.0
offset_top = -194.0
grow_horizontal = 0
grow_vertical = 0
[node name="VBoxContainer" type="VBoxContainer" parent="UIBase/UnitPanel2" unique_id=1655913738]
layout_mode = 1
anchors_preset = 15
anchor_right = 1.0
anchor_bottom = 1.0
grow_horizontal = 2
grow_vertical = 2
[node name="Level" type="Control" parent="UIBase/UnitPanel2/VBoxContainer" unique_id=1040926780]
layout_mode = 2
[node name="TextureRect" type="TextureRect" parent="UIBase/UnitPanel2/VBoxContainer/Level" unique_id=691752297]
[node name="TextureRect" type="TextureRect" parent="UIBase/UnitPanel2" unique_id=691752297]
layout_mode = 0
anchor_left = 1.0
anchor_top = 0.5
anchor_right = 1.0
anchor_bottom = 0.5
offset_left = -137.0
offset_top = -13.0
offset_bottom = 13.0
grow_horizontal = 0
grow_vertical = 2
offset_left = 128.0
offset_right = 265.0
offset_bottom = 26.0
size_flags_horizontal = 8
texture = SubResource("AtlasTexture_3wejr")
[node name="Items" type="HBoxContainer" parent="UIBase/UnitPanel2/VBoxContainer/Level" unique_id=828992814]
layout_mode = 0
[node name="Items" type="HBoxContainer" parent="UIBase/UnitPanel2/TextureRect" unique_id=828992814]
layout_mode = 1
anchors_preset = 3
anchor_left = 1.0
anchor_top = 0.5
anchor_top = 1.0
anchor_right = 1.0
anchor_bottom = 0.5
offset_left = -241.0
offset_top = -10.0
offset_bottom = 10.0
anchor_bottom = 1.0
offset_left = -63.0
offset_top = -20.0
grow_horizontal = 0
grow_vertical = 2
grow_vertical = 0
[node name="Spacer" type="Control" parent="UIBase/UnitPanel2/VBoxContainer/Level/Items" unique_id=1068603879]
[node name="Spacer" type="Control" parent="UIBase/UnitPanel2/TextureRect/Items" unique_id=1068603879]
layout_mode = 2
size_flags_horizontal = 3
[node name="Label" type="TextureRect" parent="UIBase/UnitPanel2/VBoxContainer/Level/Items" unique_id=1299333906]
[node name="Label" type="TextureRect" parent="UIBase/UnitPanel2/TextureRect/Items" unique_id=1299333906]
layout_mode = 2
size_flags_vertical = 8
texture = SubResource("AtlasTexture_uh1k2")
[node name="StylizedNumberDisplay" parent="UIBase/UnitPanel2/VBoxContainer/Level/Items" unique_id=702997768 instance=ExtResource("5_55shj")]
[node name="StylizedNumberDisplay" parent="UIBase/UnitPanel2/TextureRect/Items" unique_id=702997768 instance=ExtResource("5_55shj")]
layout_mode = 2
sprite_sheet = SubResource("AtlasTexture_yayqj")
number_sprite_width = 28
number_sprite_height = 36
number_sprite_width = 27
number_sprite_height = 39
value = 12
[node name="UnitHealth" type="HBoxContainer" parent="UIBase/UnitPanel2" unique_id=53239936]
layout_mode = 0
offset_left = 185.0
offset_top = 103.0
offset_right = 225.0
offset_bottom = 143.0
[node name="ChipBar" parent="UIBase/UnitPanel2/UnitHealth" unique_id=379110810 instance=ExtResource("6_gqe5k")]
layout_mode = 2
size_flags_vertical = 0
max_chips_per_row = 100
empty_chip_texture = SubResource("AtlasTexture_eskga")
filled_chip_texture = SubResource("AtlasTexture_14b7f")
[node name="TextureRect" type="TextureRect" parent="UIBase/UnitPanel2/UnitHealth" unique_id=668812970]
layout_mode = 2
size_flags_vertical = 0
texture = SubResource("AtlasTexture_manhy")
[node name="StylizedNumberDisplay" parent="UIBase/UnitPanel2/UnitHealth" unique_id=1442983008 instance=ExtResource("5_55shj")]
layout_mode = 2
size_flags_vertical = 0
sprite_sheet = SubResource("AtlasTexture_ox7qj")
number_sprite_width = 13
number_sprite_height = 15