diff options
Diffstat (limited to 'ui/login')
-rw-r--r-- | ui/login/character_creation.gd | 134 | ||||
-rw-r--r-- | ui/login/character_creation.tscn | 304 | ||||
-rw-r--r-- | ui/login/character_selection_item.tscn | 10 | ||||
-rw-r--r-- | ui/login/login_character_selection_list.gd | 5 | ||||
-rw-r--r-- | ui/login/login_character_selection_list.tscn | 22 | ||||
-rw-r--r-- | ui/login/stat_entry.gd | 18 | ||||
-rw-r--r-- | ui/login/stat_entry.tscn | 24 |
7 files changed, 501 insertions, 16 deletions
diff --git a/ui/login/character_creation.gd b/ui/login/character_creation.gd new file mode 100644 index 0000000..f3989d1 --- /dev/null +++ b/ui/login/character_creation.gd @@ -0,0 +1,134 @@ +extends HBoxContainer + + +var strength := 5: + set(value): + strength = value + %StatEntryStrength.value = value + %Polygon.polygon[0] = ( + Vector2(100, 100) + + ((Vector2(100, 0) - Vector2(100, 100)) / 9.0) * value + ) + +var vitality := 5: + set(value): + vitality = value + %StatEntryVitality.value = value + %Polygon.polygon[1] = ( + Vector2(100, 100) + + ((Vector2(200, 50) - Vector2(100, 100)) / 9.0) * value + ) + +var luck := 5: + set(value): + luck = value + %StatEntryLuck.value = value + %Polygon.polygon[2] = ( + Vector2(100, 100) + + ((Vector2(200, 150) - Vector2(100, 100)) / 9.0) * value + ) + +var intelligence := 5: + set(value): + intelligence = value + %StatEntryIntelligence.value = value + %Polygon.polygon[3] = ( + Vector2(100, 100) + + ((Vector2(100, 200) - Vector2(100, 100)) / 9.0) * value + ) + +var dexterity := 5: + set(value): + dexterity = value + %StatEntryDexterity.value = value + %Polygon.polygon[4] = ( + Vector2(100, 100) + + ((Vector2(0, 150) - Vector2(100, 100)) / 9.0) * value + ) + +var agility := 5: + set(value): + agility = value + %StatEntryAgility.value = value + %Polygon.polygon[5] = ( + Vector2(100, 100) + + ((Vector2(0, 50) - Vector2(100, 100)) / 9.0) * value + ) + +var head_id := 1: + set(value): + head_id = value + %Head.texture = load( + "%s/%s/000.png" % [ + "res://client_data/data/sprite", + Constants.FilePaths.get_player_head(Constants.Gender.Male, head_id), + ] + ) + +var character_name: String + + +func _on_strength_button_pressed() -> void: + if strength >= 9: + return + + strength += 1 + intelligence -= 1 + + +func _on_vitality_button_pressed() -> void: + if vitality >= 9: + return + + vitality += 1 + dexterity -= 1 + + +func _on_luck_button_pressed() -> void: + if luck >= 9: + return + + luck += 1 + agility -= 1 + + +func _on_intelligence_button_pressed() -> void: + if intelligence >= 9: + return + + intelligence += 1 + strength -= 1 + + +func _on_dexterity_button_pressed() -> void: + if dexterity >= 9: + return + + dexterity += 1 + vitality -= 1 + + +func _on_agility_button_pressed() -> void: + if agility >= 9: + return + + agility += 1 + luck -= 1 + + +func _on_appearance_left_button_pressed() -> void: + head_id = (head_id - 1) % (42 + 1) + # TODO: fix + + +func _on_appearance_right_button_pressed() -> void: + head_id = (head_id + 1) % (42 + 1) + + +func _on_appearance_up_button_pressed() -> void: + # TODO: change hair color + pass # Replace with function body. + + +func _on_name_text_changed(new_text: String) -> void: + character_name = new_text diff --git a/ui/login/character_creation.tscn b/ui/login/character_creation.tscn new file mode 100644 index 0000000..dbecf32 --- /dev/null +++ b/ui/login/character_creation.tscn @@ -0,0 +1,304 @@ +[gd_scene load_steps=21 format=3 uid="uid://di8inwptr42fe"] + +[ext_resource type="Script" uid="uid://w10xfhscfuo0" path="res://ui/login/character_creation.gd" id="1_i6vfx"] +[ext_resource type="Theme" uid="uid://c6y6r8kcnbb10" path="res://ui/theme_clear.tres" id="1_kuhsd"] +[ext_resource type="Texture2D" uid="uid://687s0xq708kn" path="res://client_data/data/texture/유저인터페이스/basic_interface/arw_left.png" id="2_6pdc2"] +[ext_resource type="Texture2D" uid="uid://0to1babdx1js" path="res://client_data/data/texture/유저인터페이스/basic_interface/arw_right.png" id="3_60s0a"] +[ext_resource type="Texture2D" uid="uid://mvgh8pjg7qar" path="res://client_data/data/texture/유저인터페이스/basic_interface/arw_up.png" id="4_ufd68"] +[ext_resource type="Texture2D" uid="uid://ci2liot5s8jnb" path="res://client_data/data/sprite/인간족/머리통/남/16_남/000.png" id="5_6pdc2"] +[ext_resource type="Texture2D" uid="uid://be3ax80esna7b" path="res://client_data/data/sprite/인간족/몸통/남/초보자_남/000.png" id="6_60s0a"] +[ext_resource type="Texture2D" uid="uid://c0kd66xiup6qq" path="res://client_data/data/texture/유저인터페이스/login_interface/arw-str0.png" id="8_6pdc2"] +[ext_resource type="Texture2D" uid="uid://c5k65ct7at0ns" path="res://client_data/data/texture/유저인터페이스/login_interface/arw-str1.png" id="9_60s0a"] +[ext_resource type="Texture2D" uid="uid://cnpgjr7mj4j14" path="res://client_data/data/texture/유저인터페이스/login_interface/arw-vit0.png" id="10_6pdc2"] +[ext_resource type="Texture2D" uid="uid://b4878jg8ex7tm" path="res://client_data/data/texture/유저인터페이스/login_interface/arw-vit1.png" id="11_60s0a"] +[ext_resource type="Texture2D" uid="uid://iviinm4jtx2j" path="res://client_data/data/texture/유저인터페이스/login_interface/arw-luk0.png" id="12_6pdc2"] +[ext_resource type="Texture2D" uid="uid://dx0w5jac6n12s" path="res://client_data/data/texture/유저인터페이스/login_interface/arw-luk1.png" id="13_60s0a"] +[ext_resource type="PackedScene" uid="uid://cff164qwvlsqd" path="res://ui/login/stat_entry.tscn" id="14_b1a0f"] +[ext_resource type="Texture2D" uid="uid://qrudl7mwwjvq" path="res://client_data/data/texture/유저인터페이스/login_interface/arw-int0.png" id="14_ufd68"] +[ext_resource type="Texture2D" uid="uid://7vxidv2eb4uk" path="res://client_data/data/texture/유저인터페이스/login_interface/arw-int1.png" id="15_uors6"] +[ext_resource type="Texture2D" uid="uid://bd20v4ovvst4r" path="res://client_data/data/texture/유저인터페이스/login_interface/arw-dex0.png" id="16_kbej0"] +[ext_resource type="Texture2D" uid="uid://cyry27r8wpd7i" path="res://client_data/data/texture/유저인터페이스/login_interface/arw-dex1.png" id="17_1iw4y"] +[ext_resource type="Texture2D" uid="uid://cd7riu7j5lyri" path="res://client_data/data/texture/유저인터페이스/login_interface/arw-agi0.png" id="18_225jb"] +[ext_resource type="Texture2D" uid="uid://dcotmlbpx0iaa" path="res://client_data/data/texture/유저인터페이스/login_interface/arw-agi1.png" id="19_b1a0f"] + +[node name="CharacterCreation" type="HBoxContainer"] +script = ExtResource("1_i6vfx") + +[node name="VBoxContainer" type="VBoxContainer" parent="."] +layout_mode = 2 +size_flags_vertical = 8 + +[node name="Control" type="Control" parent="VBoxContainer"] +custom_minimum_size = Vector2(0, 20) +layout_mode = 2 + +[node name="AppearanceLeftButton" type="TextureButton" parent="VBoxContainer/Control"] +texture_filter = 1 +layout_mode = 1 +anchors_preset = 4 +anchor_top = 0.5 +anchor_bottom = 0.5 +offset_top = -5.5 +offset_right = 11.0 +offset_bottom = 5.5 +grow_vertical = 2 +scale = Vector2(1.5, 1.5) +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("2_6pdc2") + +[node name="AppearanceRightButton" type="TextureButton" parent="VBoxContainer/Control"] +texture_filter = 1 +layout_mode = 1 +anchors_preset = 6 +anchor_left = 1.0 +anchor_top = 0.5 +anchor_right = 1.0 +anchor_bottom = 0.5 +offset_left = -11.0 +offset_top = -5.5 +offset_bottom = 5.5 +grow_horizontal = 0 +grow_vertical = 2 +scale = Vector2(1.5, 1.5) +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("3_60s0a") + +[node name="AppearanceUpButton" type="TextureButton" parent="VBoxContainer/Control"] +texture_filter = 1 +layout_mode = 1 +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -5.5 +offset_top = -8.0 +offset_right = 5.5 +offset_bottom = 3.0 +grow_horizontal = 2 +scale = Vector2(1.5, 1.5) +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("4_ufd68") + +[node name="VBoxContainer" type="VBoxContainer" parent="VBoxContainer"] +layout_mode = 2 +theme_override_constants/separation = -8 + +[node name="Head" type="TextureRect" parent="VBoxContainer/VBoxContainer"] +unique_name_in_owner = true +z_index = 1 +texture_filter = 1 +layout_mode = 2 +texture = ExtResource("5_6pdc2") +stretch_mode = 5 + +[node name="Body" type="TextureRect" parent="VBoxContainer/VBoxContainer"] +texture_filter = 1 +layout_mode = 2 +texture = ExtResource("6_60s0a") +stretch_mode = 5 + +[node name="HBoxContainer" type="HBoxContainer" parent="VBoxContainer"] +layout_mode = 2 + +[node name="Label" type="Label" parent="VBoxContainer/HBoxContainer"] +texture_filter = 1 +layout_mode = 2 +theme = ExtResource("1_kuhsd") +theme_type_variation = &"LabelLabel" +text = "Name" + +[node name="Name" type="LineEdit" parent="VBoxContainer/HBoxContainer"] +unique_name_in_owner = true +layout_mode = 2 +size_flags_vertical = 4 +theme = ExtResource("1_kuhsd") + +[node name="Control" type="Control" parent="."] +custom_minimum_size = Vector2(280, 280) +layout_mode = 2 + +[node name="Container" type="Node2D" parent="Control"] +position = Vector2(40, 40) + +[node name="Polygon" type="Polygon2D" parent="Control/Container"] +unique_name_in_owner = true +color = Color(0.776471, 0.807843, 0.905882, 1) +polygon = PackedVector2Array(100, 50, 148, 76, 148, 124, 100, 150, 52, 124, 52, 76) +uv = PackedVector2Array(100, 0, 200, 50, 200, 150, 100, 200, 0, 150, 0, 75) + +[node name="LineCircle" type="Line2D" parent="Control/Container"] +points = PackedVector2Array(100, 0, 200, 50, 200, 150, 100, 200, 0, 150, 0, 50) +closed = true +width = 1.0 +default_color = Color(0.776471, 0.807843, 0.905882, 1) + +[node name="LineNS" type="Line2D" parent="Control/Container"] +points = PackedVector2Array(100, 0, 100, 200) +closed = true +width = 1.0 +default_color = Color(0.776471, 0.807843, 0.905882, 1) + +[node name="LineNESW" type="Line2D" parent="Control/Container"] +points = PackedVector2Array(200, 50, 0, 150) +closed = true +width = 1.0 +default_color = Color(0.776471, 0.807843, 0.905882, 1) + +[node name="LineNWSE" type="Line2D" parent="Control/Container"] +points = PackedVector2Array(0, 50, 200, 150) +closed = true +width = 1.0 +default_color = Color(0.776471, 0.807843, 0.905882, 1) + +[node name="StrengthButton" type="TextureButton" parent="Control"] +texture_filter = 1 +layout_mode = 1 +anchors_preset = 5 +anchor_left = 0.5 +anchor_right = 0.5 +offset_left = -19.0 +offset_top = 1.0 +offset_right = 21.0 +offset_bottom = 41.0 +grow_horizontal = 2 +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("8_6pdc2") +texture_pressed = ExtResource("9_60s0a") + +[node name="VitalityButton" type="TextureButton" parent="Control"] +texture_filter = 1 +layout_mode = 1 +anchors_preset = 1 +anchor_left = 1.0 +anchor_right = 1.0 +offset_left = -42.9999 +offset_top = 67.0 +offset_right = -2.99994 +offset_bottom = 107.0 +grow_horizontal = 0 +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("10_6pdc2") +texture_pressed = ExtResource("11_60s0a") + +[node name="LuckButton" type="TextureButton" parent="Control"] +texture_filter = 1 +layout_mode = 1 +anchors_preset = 3 +anchor_left = 1.0 +anchor_top = 1.0 +anchor_right = 1.0 +anchor_bottom = 1.0 +offset_left = -44.0 +offset_top = -101.0 +offset_right = -4.0 +offset_bottom = -61.0 +grow_horizontal = 0 +grow_vertical = 0 +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("12_6pdc2") +texture_pressed = ExtResource("13_60s0a") + +[node name="IntelligenceButton" type="TextureButton" parent="Control"] +texture_filter = 1 +layout_mode = 1 +anchors_preset = 7 +anchor_left = 0.5 +anchor_top = 1.0 +anchor_right = 0.5 +anchor_bottom = 1.0 +offset_left = -18.0 +offset_top = -40.0 +offset_right = 22.0 +grow_horizontal = 2 +grow_vertical = 0 +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("14_ufd68") +texture_pressed = ExtResource("15_uors6") + +[node name="DexterityButton" type="TextureButton" parent="Control"] +texture_filter = 1 +layout_mode = 1 +anchors_preset = 2 +anchor_top = 1.0 +anchor_bottom = 1.0 +offset_left = 9.0 +offset_top = -104.0 +offset_right = 49.0 +offset_bottom = -64.0 +grow_vertical = 0 +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("16_kbej0") +texture_pressed = ExtResource("17_1iw4y") + +[node name="AgilityButton" type="TextureButton" parent="Control"] +texture_filter = 1 +layout_mode = 1 +offset_left = 8.0 +offset_top = 67.0 +offset_right = 48.0 +offset_bottom = 107.0 +mouse_default_cursor_shape = 2 +texture_normal = ExtResource("18_225jb") +texture_pressed = ExtResource("19_b1a0f") + +[node name="VBoxContainer2" type="VBoxContainer" parent="."] +layout_mode = 2 +theme_override_constants/separation = 1 + +[node name="StatEntryStrength" parent="VBoxContainer2" instance=ExtResource("14_b1a0f")] +unique_name_in_owner = true +layout_mode = 2 +theme_override_constants/separation = 0 +label = "STR" +value = 5 +value_alignment = 1 + +[node name="StatEntryAgility" parent="VBoxContainer2" instance=ExtResource("14_b1a0f")] +unique_name_in_owner = true +layout_mode = 2 +theme_override_constants/separation = 0 +label = "AGI" +value = 5 +value_alignment = 1 + +[node name="StatEntryVitality" parent="VBoxContainer2" instance=ExtResource("14_b1a0f")] +unique_name_in_owner = true +layout_mode = 2 +theme_override_constants/separation = 0 +label = "VIT" +value = 5 +value_alignment = 1 + +[node name="StatEntryIntelligence" parent="VBoxContainer2" instance=ExtResource("14_b1a0f")] +unique_name_in_owner = true +layout_mode = 2 +theme_override_constants/separation = 0 +label = "INT" +value = 5 +value_alignment = 1 + +[node name="StatEntryDexterity" parent="VBoxContainer2" instance=ExtResource("14_b1a0f")] +unique_name_in_owner = true +layout_mode = 2 +theme_override_constants/separation = 0 +label = "DEX" +value = 5 +value_alignment = 1 + +[node name="StatEntryLuck" parent="VBoxContainer2" instance=ExtResource("14_b1a0f")] +unique_name_in_owner = true +layout_mode = 2 +theme_override_constants/separation = 0 +label = "LUK" +value = 5 +value_alignment = 1 + +[connection signal="pressed" from="VBoxContainer/Control/AppearanceLeftButton" to="." method="_on_appearance_left_button_pressed"] +[connection signal="pressed" from="VBoxContainer/Control/AppearanceRightButton" to="." method="_on_appearance_right_button_pressed"] +[connection signal="pressed" from="VBoxContainer/Control/AppearanceUpButton" to="." method="_on_appearance_up_button_pressed"] +[connection signal="text_changed" from="VBoxContainer/HBoxContainer/Name" to="." method="_on_name_text_changed"] +[connection signal="pressed" from="Control/StrengthButton" to="." method="_on_strength_button_pressed"] +[connection signal="pressed" from="Control/VitalityButton" to="." method="_on_vitality_button_pressed"] +[connection signal="pressed" from="Control/LuckButton" to="." method="_on_luck_button_pressed"] +[connection signal="pressed" from="Control/IntelligenceButton" to="." method="_on_intelligence_button_pressed"] +[connection signal="pressed" from="Control/DexterityButton" to="." method="_on_dexterity_button_pressed"] +[connection signal="pressed" from="Control/AgilityButton" to="." method="_on_agility_button_pressed"] diff --git a/ui/login/character_selection_item.tscn b/ui/login/character_selection_item.tscn index de28392..0dab44c 100644 --- a/ui/login/character_selection_item.tscn +++ b/ui/login/character_selection_item.tscn @@ -1,10 +1,10 @@ [gd_scene load_steps=7 format=3 uid="uid://rrd131rq74n5"] [ext_resource type="Script" uid="uid://bsglhorusc7ug" path="res://ui/login/character_selection_item.gd" id="1_25yur"] -[ext_resource type="Texture2D" uid="uid://danymuvfjf4o1" path="res://client_data/data/sprite/Àΰ£Á·/¸Ó¸®Åë/³²/16_³²/000.png" id="2_aqbfs"] -[ext_resource type="Texture2D" uid="uid://cwqgdd00sf7pu" path="res://client_data/data/sprite/Àΰ£Á·/¸öÅë/³²/Ãʺ¸ÀÚ_³²/000.png" id="3_xv3pn"] +[ext_resource type="Texture2D" uid="uid://ci2liot5s8jnb" path="res://client_data/data/sprite/인간족/머리통/남/16_남/000.png" id="2_u21ok"] +[ext_resource type="Texture2D" uid="uid://be3ax80esna7b" path="res://client_data/data/sprite/인간족/몸통/남/초보자_남/000.png" id="3_vhrt2"] [ext_resource type="PackedScene" uid="uid://knmmuhon34rh" path="res://ui/bmp_texture_rect.tscn" id="4_vhrt2"] -[ext_resource type="Texture2D" uid="uid://1s8lrydoctbv" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/login_interface/box_select.png" id="5_vhrt2"] +[ext_resource type="Texture2D" uid="uid://bfe86fb6ytqg3" path="res://client_data/data/texture/유저인터페이스/login_interface/box_select.png" id="5_vhrt2"] [sub_resource type="StyleBoxFlat" id="StyleBoxFlat_u21ok"] bg_color = Color(0, 0, 0, 0.0980392) @@ -43,14 +43,14 @@ unique_name_in_owner = true z_index = 1 texture_filter = 1 layout_mode = 2 -texture = ExtResource("2_aqbfs") +texture = ExtResource("2_u21ok") stretch_mode = 3 [node name="Body" type="TextureRect" parent="MarginContainer/VBoxContainer/Sprite"] unique_name_in_owner = true texture_filter = 1 layout_mode = 2 -texture = ExtResource("3_xv3pn") +texture = ExtResource("3_vhrt2") stretch_mode = 3 [node name="SelectionBorder" parent="." instance=ExtResource("4_vhrt2")] diff --git a/ui/login/login_character_selection_list.gd b/ui/login/login_character_selection_list.gd index bd19fa1..7ff43cf 100644 --- a/ui/login/login_character_selection_list.gd +++ b/ui/login/login_character_selection_list.gd @@ -76,6 +76,11 @@ func set_login_character_list(value: LoginCharacterList) -> void: draw() +func add_character_information(info: CharacterInformation) -> void: + login_character_list.add_character_information(info) + draw() + + func draw(): if not login_character_list: return diff --git a/ui/login/login_character_selection_list.tscn b/ui/login/login_character_selection_list.tscn index 02a9dc2..373dcde 100644 --- a/ui/login/login_character_selection_list.tscn +++ b/ui/login/login_character_selection_list.tscn @@ -4,12 +4,12 @@ [ext_resource type="Script" uid="uid://dmch4gi1khn2r" path="res://ui/login/login_character_selection_list.gd" id="1_togb6"] [ext_resource type="PackedScene" uid="uid://rrd131rq74n5" path="res://ui/login/character_selection_item.tscn" id="2_k142l"] [ext_resource type="PackedScene" uid="uid://cjcm2mai50thr" path="res://ui/bmp_texture_button.tscn" id="2_s7n6r"] -[ext_resource type="Texture2D" uid="uid://cey66pn46da80" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/select_character/chr_arrow_l_out.png" id="3_wnv6e"] -[ext_resource type="Texture2D" uid="uid://bbs77ppnvcm23" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/select_character/chr_arrow_l_press.png" id="4_rdaw5"] -[ext_resource type="Texture2D" uid="uid://c4supu7w8gabw" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/select_character/chr_arrow_l_over.png" id="5_1vggc"] -[ext_resource type="Texture2D" uid="uid://dqweltumn8n7t" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/select_character/chr_arrow_r_out.png" id="7_wnv6e"] -[ext_resource type="Texture2D" uid="uid://bsdygckmj667w" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/select_character/chr_arrow_r_press.png" id="8_rdaw5"] -[ext_resource type="Texture2D" uid="uid://dqdmks4uak1go" path="res://client_data/data/texture/À¯ÀúÀÎÅÍÆäÀ̽º/select_character/chr_arrow_r_over.png" id="9_1vggc"] +[ext_resource type="Texture2D" uid="uid://c1cgkiyacvr4k" path="res://client_data/data/texture/유저인터페이스/styleshop/chr_arrow_l_out.png" id="3_wnv6e"] +[ext_resource type="Texture2D" uid="uid://dar08umwslovr" path="res://client_data/data/texture/유저인터페이스/styleshop/chr_arrow_l_press.png" id="4_wnv6e"] +[ext_resource type="Texture2D" uid="uid://b38efa2wsrsiw" path="res://client_data/data/texture/유저인터페이스/styleshop/chr_arrow_l_over.png" id="5_wnv6e"] +[ext_resource type="Texture2D" uid="uid://cjmj1etf1wth7" path="res://client_data/data/texture/유저인터페이스/styleshop/chr_arrow_r_out.png" id="7_1vggc"] +[ext_resource type="Texture2D" uid="uid://deorq2yjwe4ie" path="res://client_data/data/texture/유저인터페이스/styleshop/chr_arrow_r_press.png" id="8_1oc8k"] +[ext_resource type="Texture2D" uid="uid://ccfm5ls854xpf" path="res://client_data/data/texture/유저인터페이스/styleshop/chr_arrow_r_over.png" id="9_muwiy"] [node name="LoginCharacterSelectionList" type="VBoxContainer"] theme_override_constants/separation = 32 @@ -31,8 +31,8 @@ unique_name_in_owner = true texture_filter = 0 layout_mode = 2 texture_normal = ExtResource("3_wnv6e") -texture_pressed = ExtResource("4_rdaw5") -texture_hover = ExtResource("5_1vggc") +texture_pressed = ExtResource("4_wnv6e") +texture_hover = ExtResource("5_wnv6e") stretch_mode = 5 [node name="CharacterList" type="HBoxContainer" parent="MarginContainer/HBoxContainer"] @@ -50,9 +50,9 @@ layout_mode = 2 unique_name_in_owner = true texture_filter = 0 layout_mode = 2 -texture_normal = ExtResource("7_wnv6e") -texture_pressed = ExtResource("8_rdaw5") -texture_hover = ExtResource("9_1vggc") +texture_normal = ExtResource("7_1vggc") +texture_pressed = ExtResource("8_1oc8k") +texture_hover = ExtResource("9_muwiy") stretch_mode = 5 [node name="CharacterSelectionStatus" parent="." instance=ExtResource("1_5anyi")] diff --git a/ui/login/stat_entry.gd b/ui/login/stat_entry.gd new file mode 100644 index 0000000..6d79ac0 --- /dev/null +++ b/ui/login/stat_entry.gd @@ -0,0 +1,18 @@ +@tool +extends HBoxContainer + + +@export var label: String: + set(value): + label = value + $Label.text = value + +@export var value: int: + set(v): + value = v + $Value.text = str(v) + +@export var value_alignment: HorizontalAlignment: + set(value): + value_alignment = value + $Value.horizontal_alignment = value diff --git a/ui/login/stat_entry.tscn b/ui/login/stat_entry.tscn new file mode 100644 index 0000000..91e9abe --- /dev/null +++ b/ui/login/stat_entry.tscn @@ -0,0 +1,24 @@ +[gd_scene load_steps=3 format=3 uid="uid://cff164qwvlsqd"] + +[ext_resource type="Theme" uid="uid://c6y6r8kcnbb10" path="res://ui/theme_clear.tres" id="1_3i1yo"] +[ext_resource type="Script" uid="uid://bjdgrc1kwcbtj" path="res://ui/login/stat_entry.gd" id="1_vt1a4"] + +[node name="StatEntry" type="HBoxContainer"] +offset_right = 169.0 +offset_bottom = 20.0 +script = ExtResource("1_vt1a4") + +[node name="Label" type="Label" parent="."] +custom_minimum_size = Vector2(45, 0) +layout_mode = 2 +theme = ExtResource("1_3i1yo") +theme_type_variation = &"CharacterSelectionStatusLabel" +text = "Label" + +[node name="Value" type="Label" parent="."] +custom_minimum_size = Vector2(120, 0) +layout_mode = 2 +size_flags_horizontal = 3 +theme = ExtResource("1_3i1yo") +theme_type_variation = &"CharacterSelectionStatusLabel2" +text = "value" |