CustomLevelContainer.tscn 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. [gd_scene load_steps=12 format=3 uid="uid://dt20tjug8m6oh"]
  2. [ext_resource type="StyleBox" uid="uid://comkghpj0djcl" path="res://Resources/UI/Panel.tres" id="1_54x78"]
  3. [ext_resource type="StyleBox" uid="uid://dlbdmqmnl30sq" path="res://Resources/UI/PanelSelected.tres" id="2_wmblk"]
  4. [ext_resource type="Script" uid="uid://0pxa4836hn6c" path="res://Scripts/UI/CustomLevelContainer.gd" id="3_t47t0"]
  5. [ext_resource type="Texture2D" uid="uid://cn8bcncfmdikq" path="res://Assets/Sprites/UI/CustomLevelIconNight.png" id="4_jiwhq"]
  6. [ext_resource type="Texture2D" uid="uid://dmggnqp6esawy" path="res://Assets/Sprites/UI/DifficultyStars.png" id="5_6ktlh"]
  7. [ext_resource type="Texture2D" uid="uid://dfeu75lbxfkim" path="res://Assets/Sprites/UI/GameStyles.png" id="5_l0vwk"]
  8. [ext_resource type="Script" uid="uid://d63p6qr5a748" path="res://Scripts/UI/AutoScrollContainer.gd" id="5_psjdr"]
  9. [ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="7_t47t0"]
  10. [ext_resource type="JSON" path="res://Assets/Sprites/UI/Cursor.json" id="8_l0vwk"]
  11. [ext_resource type="Script" uid="uid://co6tjg3w6qpd8" path="res://Scripts/Parts/LabelFontChanger.gd" id="10_psjdr"]
  12. [ext_resource type="Resource" uid="uid://8dcuxbc3h2u2" path="res://Resources/ThemedResources/Font.tres" id="11_jiigy"]
  13. [node name="CustomLevelContainer" type="Button"]
  14. custom_minimum_size = Vector2(0, 40)
  15. anchors_preset = 10
  16. anchor_right = 1.0
  17. offset_bottom = 40.0
  18. grow_horizontal = 2
  19. mouse_filter = 2
  20. theme_override_styles/normal = ExtResource("1_54x78")
  21. theme_override_styles/pressed = ExtResource("1_54x78")
  22. theme_override_styles/hover = ExtResource("2_wmblk")
  23. theme_override_styles/focus = ExtResource("2_wmblk")
  24. button_mask = 0
  25. script = ExtResource("3_t47t0")
  26. [node name="MarginContainer" type="MarginContainer" parent="."]
  27. layout_mode = 1
  28. anchors_preset = 10
  29. anchor_right = 1.0
  30. offset_bottom = 40.0
  31. grow_horizontal = 2
  32. theme_override_constants/margin_left = 4
  33. theme_override_constants/margin_top = 4
  34. theme_override_constants/margin_right = 4
  35. theme_override_constants/margin_bottom = 4
  36. [node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer"]
  37. layout_mode = 2
  38. [node name="HSplitContainer" type="HBoxContainer" parent="MarginContainer/HBoxContainer"]
  39. layout_mode = 2
  40. size_flags_horizontal = 3
  41. theme_override_constants/separation = 0
  42. [node name="LeftHalf" type="HBoxContainer" parent="MarginContainer/HBoxContainer/HSplitContainer"]
  43. layout_mode = 2
  44. size_flags_horizontal = 3
  45. [node name="LevelIcon" type="NinePatchRect" parent="MarginContainer/HBoxContainer/HSplitContainer/LeftHalf"]
  46. unique_name_in_owner = true
  47. custom_minimum_size = Vector2(32, 32)
  48. layout_mode = 2
  49. size_flags_horizontal = 0
  50. size_flags_vertical = 4
  51. texture = ExtResource("4_jiwhq")
  52. region_rect = Rect2(64, 64, 32, 32)
  53. [node name="LevelInfo" type="VBoxContainer" parent="MarginContainer/HBoxContainer/HSplitContainer/LeftHalf"]
  54. layout_mode = 2
  55. size_flags_horizontal = 3
  56. theme_override_constants/separation = -4
  57. [node name="ScrollContainer" type="ScrollContainer" parent="MarginContainer/HBoxContainer/HSplitContainer/LeftHalf/LevelInfo"]
  58. custom_minimum_size = Vector2(0, 16)
  59. layout_mode = 2
  60. horizontal_scroll_mode = 3
  61. script = ExtResource("5_psjdr")
  62. [node name="LevelName" type="Label" parent="MarginContainer/HBoxContainer/HSplitContainer/LeftHalf/LevelInfo/ScrollContainer"]
  63. unique_name_in_owner = true
  64. layout_mode = 2
  65. size_flags_horizontal = 3
  66. text = "Level Name AIJOPDIOPJAWPDADAPDkaopD"
  67. uppercase = true
  68. [node name="ScrollContainer2" type="ScrollContainer" parent="MarginContainer/HBoxContainer/HSplitContainer/LeftHalf/LevelInfo"]
  69. custom_minimum_size = Vector2(0, 16)
  70. layout_mode = 2
  71. horizontal_scroll_mode = 3
  72. script = ExtResource("5_psjdr")
  73. [node name="LevelAuthor" type="Label" parent="MarginContainer/HBoxContainer/HSplitContainer/LeftHalf/LevelInfo/ScrollContainer2"]
  74. unique_name_in_owner = true
  75. modulate = Color(0.47058824, 0.47058824, 0.47058824, 1)
  76. layout_mode = 2
  77. size_flags_horizontal = 3
  78. text = "Level Name"
  79. uppercase = true
  80. [node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/HBoxContainer/HSplitContainer"]
  81. layout_mode = 2
  82. [node name="DifficultyStars" type="HBoxContainer" parent="MarginContainer/HBoxContainer/HSplitContainer/VBoxContainer"]
  83. unique_name_in_owner = true
  84. layout_mode = 2
  85. theme_override_constants/separation = 0
  86. [node name="Star1" type="NinePatchRect" parent="MarginContainer/HBoxContainer/HSplitContainer/VBoxContainer/DifficultyStars"]
  87. custom_minimum_size = Vector2(8, 0)
  88. layout_mode = 2
  89. texture = ExtResource("5_6ktlh")
  90. region_rect = Rect2(0, 0, 8, 8)
  91. patch_margin_bottom = 8
  92. [node name="Star2" type="NinePatchRect" parent="MarginContainer/HBoxContainer/HSplitContainer/VBoxContainer/DifficultyStars"]
  93. custom_minimum_size = Vector2(8, 0)
  94. layout_mode = 2
  95. texture = ExtResource("5_6ktlh")
  96. region_rect = Rect2(0, 0, 8, 8)
  97. patch_margin_bottom = 8
  98. [node name="Star3" type="NinePatchRect" parent="MarginContainer/HBoxContainer/HSplitContainer/VBoxContainer/DifficultyStars"]
  99. custom_minimum_size = Vector2(8, 0)
  100. layout_mode = 2
  101. texture = ExtResource("5_6ktlh")
  102. region_rect = Rect2(0, 0, 8, 8)
  103. patch_margin_bottom = 8
  104. [node name="Star4" type="NinePatchRect" parent="MarginContainer/HBoxContainer/HSplitContainer/VBoxContainer/DifficultyStars"]
  105. custom_minimum_size = Vector2(8, 0)
  106. layout_mode = 2
  107. texture = ExtResource("5_6ktlh")
  108. region_rect = Rect2(0, 0, 8, 8)
  109. patch_margin_bottom = 8
  110. [node name="Star5" type="NinePatchRect" parent="MarginContainer/HBoxContainer/HSplitContainer/VBoxContainer/DifficultyStars"]
  111. custom_minimum_size = Vector2(8, 0)
  112. layout_mode = 2
  113. texture = ExtResource("5_6ktlh")
  114. region_rect = Rect2(0, 0, 8, 8)
  115. patch_margin_bottom = 8
  116. [node name="CampaignIcon" type="NinePatchRect" parent="MarginContainer/HBoxContainer/HSplitContainer/VBoxContainer"]
  117. unique_name_in_owner = true
  118. custom_minimum_size = Vector2(42, 16)
  119. layout_mode = 2
  120. size_flags_vertical = 10
  121. texture = ExtResource("5_l0vwk")
  122. region_rect = Rect2(0, 0, 42, 16)
  123. [node name="TextureRect" type="TextureRect" parent="."]
  124. visible = false
  125. layout_mode = 1
  126. anchors_preset = -1
  127. anchor_top = 0.5
  128. anchor_bottom = 0.5
  129. offset_left = -8.0
  130. offset_top = -4.0
  131. offset_bottom = 4.0
  132. grow_vertical = 2
  133. [node name="ResourceSetterNew" type="Node" parent="TextureRect" node_paths=PackedStringArray("node_to_affect")]
  134. script = ExtResource("7_t47t0")
  135. node_to_affect = NodePath("..")
  136. property_name = "texture"
  137. mode = 1
  138. resource_json = ExtResource("8_l0vwk")
  139. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  140. [node name="LabelFontChanger" type="Node" parent="." node_paths=PackedStringArray("labels")]
  141. script = ExtResource("10_psjdr")
  142. labels = [NodePath("../MarginContainer/HBoxContainer/HSplitContainer/LeftHalf/LevelInfo/ScrollContainer/LevelName"), NodePath("../MarginContainer/HBoxContainer/HSplitContainer/LeftHalf/LevelInfo/ScrollContainer2/LevelAuthor")]
  143. resource = ExtResource("11_jiigy")
  144. metadata/_custom_type_script = "uid://co6tjg3w6qpd8"
  145. [connection signal="focus_entered" from="." to="TextureRect" method="show"]
  146. [connection signal="focus_entered" from="." to="." method="set_process" binds= [true]]
  147. [connection signal="focus_exited" from="." to="TextureRect" method="hide"]
  148. [connection signal="focus_exited" from="." to="." method="set_process" binds= [false]]