More UI stuff, fancy number display (needs work)
This commit is contained in:
27
prefabs/StylizedNumberDisplay.tscn
Normal file
27
prefabs/StylizedNumberDisplay.tscn
Normal file
@@ -0,0 +1,27 @@
|
||||
[gd_scene format=3 uid="uid://bc5a7tb0my6n5"]
|
||||
|
||||
[ext_resource type="Script" uid="uid://biud4ob4h0rrs" path="res://scripts/ui/stylized_number_display.gd" id="1_s5s2y"]
|
||||
[ext_resource type="Texture2D" uid="uid://cavpqnd0qqoou" path="res://assets/ui/SO008B.BMP" id="2_b1oqg"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_b1oqg"]
|
||||
atlas = ExtResource("2_b1oqg")
|
||||
region = Rect2(546, 839, 272, 39)
|
||||
|
||||
[node name="StylizedNumberDisplay" type="Control" unique_id=702997768]
|
||||
layout_mode = 3
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
script = ExtResource("1_s5s2y")
|
||||
sprite_sheet = SubResource("AtlasTexture_b1oqg")
|
||||
|
||||
[node name="HBoxContainer" type="HBoxContainer" parent="." unique_id=2089310026]
|
||||
unique_name_in_owner = true
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
@@ -2,12 +2,37 @@
|
||||
|
||||
[ext_resource type="Theme" uid="uid://dx26d6py3n8xi" path="res://resources/main_ui_theme.tres" id="1_2ro41"]
|
||||
[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"]
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_hadma"]
|
||||
atlas = ExtResource("3_tfn3h")
|
||||
region = Rect2(0, 0, 800, 600)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_55shj"]
|
||||
atlas = ExtResource("3_hadma")
|
||||
region = Rect2(393, 280, 168, 77)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_gqe5k"]
|
||||
atlas = ExtResource("3_hadma")
|
||||
region = Rect2(141, 0, 513, 169)
|
||||
|
||||
[sub_resource type="CanvasItemMaterial" id="CanvasItemMaterial_hadma"]
|
||||
blend_mode = 1
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_3wejr"]
|
||||
atlas = ExtResource("3_hadma")
|
||||
region = Rect2(614, 711, 137, 26)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_uh1k2"]
|
||||
atlas = ExtResource("3_hadma")
|
||||
region = Rect2(614, 737, 55, 20)
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_yayqj"]
|
||||
atlas = ExtResource("3_hadma")
|
||||
region = Rect2(546, 839, 272, 39)
|
||||
|
||||
[node name="BattleViewUI" type="CanvasLayer" unique_id=1093388037]
|
||||
script = ExtResource("2_ui_script")
|
||||
|
||||
@@ -20,16 +45,52 @@ grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 1
|
||||
|
||||
[node name="Overlay" type="Control" parent="UIBase" unique_id=114439631]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
mouse_filter = 2
|
||||
|
||||
[node name="Background" type="TextureRect" parent="UIBase/Overlay" unique_id=1726665864]
|
||||
layout_mode = 1
|
||||
anchors_preset = 15
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
grow_horizontal = 2
|
||||
grow_vertical = 2
|
||||
texture = SubResource("AtlasTexture_hadma")
|
||||
|
||||
[node name="HoverInfo" type="TextureRect" parent="UIBase/Overlay" unique_id=1180275113]
|
||||
layout_mode = 0
|
||||
offset_right = 40.0
|
||||
offset_bottom = 40.0
|
||||
texture = SubResource("AtlasTexture_55shj")
|
||||
|
||||
[node name="Bars" type="TextureRect" parent="UIBase/Overlay" unique_id=780801800]
|
||||
layout_mode = 1
|
||||
anchors_preset = 1
|
||||
anchor_left = 1.0
|
||||
anchor_right = 1.0
|
||||
offset_left = -513.0
|
||||
offset_bottom = 169.0
|
||||
grow_horizontal = 0
|
||||
texture = SubResource("AtlasTexture_gqe5k")
|
||||
|
||||
[node name="UnitPanel" type="PanelContainer" parent="UIBase" unique_id=2000000001]
|
||||
unique_name_in_owner = true
|
||||
visible = false
|
||||
layout_mode = 1
|
||||
anchors_preset = 2
|
||||
anchors_preset = 3
|
||||
anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = 8.0
|
||||
offset_left = -200.0
|
||||
offset_top = -70.0
|
||||
offset_right = 208.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 0
|
||||
theme = ExtResource("1_2ro41")
|
||||
|
||||
@@ -189,11 +250,69 @@ unique_name_in_owner = true
|
||||
layout_mode = 2
|
||||
text = "Cancel"
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="UIBase" unique_id=1726665864]
|
||||
[node name="UnitPanel2" type="Control" parent="UIBase" unique_id=1823763147]
|
||||
layout_mode = 1
|
||||
anchors_preset = 3
|
||||
anchor_left = 1.0
|
||||
anchor_top = 1.0
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 1.0
|
||||
offset_left = -241.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
|
||||
texture = SubResource("AtlasTexture_hadma")
|
||||
|
||||
[node name="Level" type="Control" parent="UIBase/UnitPanel2/VBoxContainer" unique_id=1602621942]
|
||||
layout_mode = 2
|
||||
|
||||
[node name="TextureRect" type="TextureRect" parent="UIBase/UnitPanel2/VBoxContainer/Level" unique_id=691752297]
|
||||
material = SubResource("CanvasItemMaterial_hadma")
|
||||
layout_mode = 1
|
||||
anchors_preset = 6
|
||||
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
|
||||
texture = SubResource("AtlasTexture_3wejr")
|
||||
|
||||
[node name="Items" type="HBoxContainer" parent="UIBase/UnitPanel2/VBoxContainer/Level" unique_id=828992814]
|
||||
layout_mode = 1
|
||||
anchors_preset = 6
|
||||
anchor_left = 1.0
|
||||
anchor_top = 0.5
|
||||
anchor_right = 1.0
|
||||
anchor_bottom = 0.5
|
||||
offset_left = -241.0
|
||||
offset_top = -10.0
|
||||
offset_bottom = 10.0
|
||||
grow_horizontal = 0
|
||||
grow_vertical = 2
|
||||
|
||||
[node name="Spacer" type="Control" parent="UIBase/UnitPanel2/VBoxContainer/Level/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]
|
||||
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")]
|
||||
layout_mode = 2
|
||||
sprite_sheet = SubResource("AtlasTexture_yayqj")
|
||||
number_sprite_width = 27
|
||||
number_sprite_height = 36
|
||||
value = 12
|
||||
|
||||
@@ -25,7 +25,7 @@ func _on_unit_unit_allegiance_changed(_unit: Unit, allegiance: UnitAllegiance) -
|
||||
[sub_resource type="ShaderMaterial" id="ShaderMaterial_fhs1y"]
|
||||
shader = ExtResource("3_fhs1y")
|
||||
shader_parameter/key_color = Color(0, 1, 0, 1)
|
||||
shader_parameter/threshold = 0.750000035625
|
||||
shader_parameter/threshold = 0.010000000475
|
||||
|
||||
[sub_resource type="AtlasTexture" id="AtlasTexture_fhs1y"]
|
||||
atlas = ExtResource("3_on614")
|
||||
|
||||
Reference in New Issue
Block a user