SelectableOptionNode.tscn 3.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697
  1. [gd_scene load_steps=8 format=3 uid="uid://dbvy0rhwpv4w4"]
  2. [ext_resource type="Script" uid="uid://vm4py6u87p6d" path="res://Scripts/UI/SelectableOptionNode.gd" id="1_qeqfu"]
  3. [ext_resource type="Texture2D" uid="uid://3p2l7rec0gh5" path="res://Assets/Sprites/UI/Cursor.png" id="1_r2b5m"]
  4. [ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="3_on6n3"]
  5. [ext_resource type="JSON" path="res://Assets/Sprites/UI/Cursor.json" id="4_mljen"]
  6. [ext_resource type="Script" uid="uid://d63p6qr5a748" path="res://Scripts/UI/AutoScrollContainer.gd" id="5_mljen"]
  7. [ext_resource type="Script" uid="uid://co6tjg3w6qpd8" path="res://Scripts/Parts/LabelFontChanger.gd" id="5_on6n3"]
  8. [sub_resource type="AtlasTexture" id="AtlasTexture_qti1l"]
  9. atlas = ExtResource("1_r2b5m")
  10. region = Rect2(0, 0, 8, 8)
  11. [node name="SelectableOptionNode" type="HBoxContainer"]
  12. offset_right = 253.0
  13. offset_bottom = 8.0
  14. focus_mode = 2
  15. theme_override_constants/separation = 0
  16. script = ExtResource("1_qeqfu")
  17. [node name="Cursor" type="Control" parent="."]
  18. custom_minimum_size = Vector2(8, 0)
  19. layout_mode = 2
  20. [node name="Cursor" type="TextureRect" parent="Cursor"]
  21. layout_mode = 0
  22. offset_top = 4.0
  23. offset_right = 8.0
  24. offset_bottom = 12.0
  25. texture = SubResource("AtlasTexture_qti1l")
  26. stretch_mode = 2
  27. [node name="ResourceSetter" type="Node" parent="Cursor/Cursor" node_paths=PackedStringArray("node_to_affect")]
  28. script = ExtResource("3_on6n3")
  29. node_to_affect = NodePath("..")
  30. property_name = "texture"
  31. mode = 1
  32. resource_json = ExtResource("4_mljen")
  33. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  34. [node name="AutoScrollContainer" type="ScrollContainer" parent="."]
  35. layout_mode = 2
  36. size_flags_horizontal = 3
  37. horizontal_scroll_mode = 3
  38. vertical_scroll_mode = 0
  39. script = ExtResource("5_mljen")
  40. metadata/_custom_type_script = "uid://d63p6qr5a748"
  41. [node name="Title" type="Label" parent="AutoScrollContainer"]
  42. unique_name_in_owner = true
  43. layout_mode = 2
  44. size_flags_horizontal = 3
  45. text = "modeadpiawjda:"
  46. uppercase = true
  47. [node name="LabelFontChanger" type="Node" parent="." node_paths=PackedStringArray("labels")]
  48. script = ExtResource("5_on6n3")
  49. labels = [NodePath("../AutoScrollContainer/Title"), NodePath("../HBoxContainer/AutoScrollContainer2/Value")]
  50. metadata/_custom_type_script = "uid://co6tjg3w6qpd8"
  51. [node name="HBoxContainer" type="HBoxContainer" parent="."]
  52. layout_mode = 2
  53. theme_override_constants/separation = -4
  54. [node name="LeftArrow" type="Label" parent="HBoxContainer"]
  55. unique_name_in_owner = true
  56. layout_mode = 2
  57. text = "◄"
  58. uppercase = true
  59. [node name="AutoScrollContainer2" type="ScrollContainer" parent="HBoxContainer"]
  60. unique_name_in_owner = true
  61. custom_minimum_size = Vector2(56, 0)
  62. layout_mode = 2
  63. horizontal_scroll_mode = 3
  64. vertical_scroll_mode = 0
  65. script = ExtResource("5_mljen")
  66. is_active = true
  67. auto_minimum_resize = true
  68. metadata/_custom_type_script = "uid://d63p6qr5a748"
  69. [node name="Value" type="Label" parent="HBoxContainer/AutoScrollContainer2"]
  70. unique_name_in_owner = true
  71. layout_mode = 2
  72. size_flags_horizontal = 10
  73. text = "aaaaaa"
  74. horizontal_alignment = 1
  75. uppercase = true
  76. [node name="RightArrow" type="Label" parent="HBoxContainer"]
  77. unique_name_in_owner = true
  78. layout_mode = 2
  79. text = "►"
  80. uppercase = true
  81. [connection signal="focus_entered" from="." to="." method="set_selected" binds= [true]]
  82. [connection signal="focus_exited" from="." to="." method="set_selected" binds= [false]]