OnlineLevelContainer.tscn 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. [gd_scene load_steps=13 format=3 uid="uid://cr2pku7fjkgpo"]
  2. [ext_resource type="StyleBox" uid="uid://comkghpj0djcl" path="res://Resources/UI/Panel.tres" id="1_1k7iw"]
  3. [ext_resource type="StyleBox" uid="uid://dlbdmqmnl30sq" path="res://Resources/UI/PanelSelected.tres" id="2_h6n8u"]
  4. [ext_resource type="Script" uid="uid://d486p6delid2" path="res://Scripts/UI/OnlineLevelContainer.gd" id="3_1k7iw"]
  5. [ext_resource type="Script" uid="uid://d63p6qr5a748" path="res://Scripts/UI/AutoScrollContainer.gd" id="5_ajmg3"]
  6. [ext_resource type="Texture2D" uid="uid://dmggnqp6esawy" path="res://Assets/Sprites/UI/DifficultyStars.png" id="6_m23pw"]
  7. [ext_resource type="Texture2D" uid="uid://dfeu75lbxfkim" path="res://Assets/Sprites/UI/GameStyles.png" id="7_scevv"]
  8. [ext_resource type="Script" uid="uid://cbal8ms2oe1ik" path="res://Scripts/Classes/Components/ResourceSetterNew.gd" id="8_vfnya"]
  9. [ext_resource type="JSON" path="res://Assets/Sprites/UI/Cursor.json" id="9_d0564"]
  10. [ext_resource type="Script" uid="uid://co6tjg3w6qpd8" path="res://Scripts/Parts/LabelFontChanger.gd" id="10_x7igx"]
  11. [sub_resource type="Animation" id="Animation_w0xci"]
  12. resource_name = "Load"
  13. length = 1.3333
  14. loop_mode = 1
  15. tracks/0/type = "value"
  16. tracks/0/imported = false
  17. tracks/0/enabled = true
  18. tracks/0/path = NodePath(".:visible_ratio")
  19. tracks/0/interp = 1
  20. tracks/0/loop_wrap = false
  21. tracks/0/keys = {
  22. "times": PackedFloat32Array(0, 1),
  23. "transitions": PackedFloat32Array(1, 1),
  24. "update": 0,
  25. "values": [0.0, 1.0]
  26. }
  27. [sub_resource type="Animation" id="Animation_1k7iw"]
  28. length = 0.001
  29. tracks/0/type = "value"
  30. tracks/0/imported = false
  31. tracks/0/enabled = true
  32. tracks/0/path = NodePath(".:visible_ratio")
  33. tracks/0/interp = 1
  34. tracks/0/loop_wrap = true
  35. tracks/0/keys = {
  36. "times": PackedFloat32Array(0),
  37. "transitions": PackedFloat32Array(1),
  38. "update": 0,
  39. "values": [0.0]
  40. }
  41. [sub_resource type="AnimationLibrary" id="AnimationLibrary_h6n8u"]
  42. _data = {
  43. &"Load": SubResource("Animation_w0xci"),
  44. &"RESET": SubResource("Animation_1k7iw")
  45. }
  46. [node name="CustomLevelContainer" type="Button"]
  47. custom_minimum_size = Vector2(0, 40)
  48. anchors_preset = 10
  49. anchor_right = 1.0
  50. offset_bottom = 40.0
  51. grow_horizontal = 2
  52. mouse_filter = 2
  53. theme_override_styles/normal = ExtResource("1_1k7iw")
  54. theme_override_styles/pressed = ExtResource("1_1k7iw")
  55. theme_override_styles/hover = ExtResource("2_h6n8u")
  56. theme_override_styles/focus = ExtResource("2_h6n8u")
  57. button_mask = 0
  58. script = ExtResource("3_1k7iw")
  59. [node name="MarginContainer" type="MarginContainer" parent="."]
  60. layout_mode = 1
  61. anchors_preset = 10
  62. anchor_right = 1.0
  63. offset_bottom = 40.0
  64. grow_horizontal = 2
  65. theme_override_constants/margin_left = 4
  66. theme_override_constants/margin_top = 4
  67. theme_override_constants/margin_right = 4
  68. theme_override_constants/margin_bottom = 4
  69. [node name="HBoxContainer" type="HBoxContainer" parent="MarginContainer"]
  70. layout_mode = 2
  71. [node name="HSplitContainer" type="HBoxContainer" parent="MarginContainer/HBoxContainer"]
  72. layout_mode = 2
  73. size_flags_horizontal = 3
  74. theme_override_constants/separation = 0
  75. [node name="LeftHalf" type="HBoxContainer" parent="MarginContainer/HBoxContainer/HSplitContainer"]
  76. layout_mode = 2
  77. size_flags_horizontal = 3
  78. [node name="LevelIcon" type="TextureRect" parent="MarginContainer/HBoxContainer/HSplitContainer/LeftHalf"]
  79. unique_name_in_owner = true
  80. custom_minimum_size = Vector2(32, 32)
  81. layout_mode = 2
  82. size_flags_horizontal = 0
  83. size_flags_vertical = 4
  84. expand_mode = 3
  85. stretch_mode = 5
  86. [node name="Label" type="Label" parent="MarginContainer/HBoxContainer/HSplitContainer/LeftHalf/LevelIcon"]
  87. show_behind_parent = true
  88. layout_mode = 1
  89. anchors_preset = 15
  90. anchor_right = 1.0
  91. anchor_bottom = 1.0
  92. grow_horizontal = 2
  93. grow_vertical = 2
  94. text = "..."
  95. horizontal_alignment = 1
  96. vertical_alignment = 1
  97. visible_characters = 0
  98. visible_ratio = 0.0
  99. [node name="AnimationPlayer" type="AnimationPlayer" parent="MarginContainer/HBoxContainer/HSplitContainer/LeftHalf/LevelIcon/Label"]
  100. libraries = {
  101. &"": SubResource("AnimationLibrary_h6n8u")
  102. }
  103. autoplay = "Load"
  104. [node name="Error" type="Label" parent="MarginContainer/HBoxContainer/HSplitContainer/LeftHalf/LevelIcon"]
  105. visible = false
  106. modulate = Color(0.32172796, 0.32172796, 0.32172796, 1)
  107. layout_mode = 1
  108. anchors_preset = 15
  109. anchor_right = 1.0
  110. anchor_bottom = 1.0
  111. grow_horizontal = 2
  112. grow_vertical = 2
  113. text = " NONE"
  114. horizontal_alignment = 1
  115. vertical_alignment = 1
  116. [node name="LevelInfo" type="VBoxContainer" parent="MarginContainer/HBoxContainer/HSplitContainer/LeftHalf"]
  117. layout_mode = 2
  118. size_flags_horizontal = 3
  119. theme_override_constants/separation = -4
  120. [node name="ScrollContainer" type="ScrollContainer" parent="MarginContainer/HBoxContainer/HSplitContainer/LeftHalf/LevelInfo"]
  121. custom_minimum_size = Vector2(0, 16)
  122. layout_mode = 2
  123. horizontal_scroll_mode = 3
  124. vertical_scroll_mode = 3
  125. script = ExtResource("5_ajmg3")
  126. [node name="LevelName" type="Label" parent="MarginContainer/HBoxContainer/HSplitContainer/LeftHalf/LevelInfo/ScrollContainer"]
  127. unique_name_in_owner = true
  128. layout_mode = 2
  129. size_flags_horizontal = 3
  130. text = "&&&&&&&&"
  131. uppercase = true
  132. [node name="ScrollContainer2" type="ScrollContainer" parent="MarginContainer/HBoxContainer/HSplitContainer/LeftHalf/LevelInfo"]
  133. custom_minimum_size = Vector2(0, 16)
  134. layout_mode = 2
  135. horizontal_scroll_mode = 3
  136. vertical_scroll_mode = 3
  137. script = ExtResource("5_ajmg3")
  138. [node name="LevelAuthor" type="Label" parent="MarginContainer/HBoxContainer/HSplitContainer/LeftHalf/LevelInfo/ScrollContainer2"]
  139. unique_name_in_owner = true
  140. modulate = Color(0.47058824, 0.47058824, 0.47058824, 1)
  141. layout_mode = 2
  142. size_flags_horizontal = 3
  143. text = "Level Name"
  144. uppercase = true
  145. [node name="VBoxContainer" type="VBoxContainer" parent="MarginContainer/HBoxContainer/HSplitContainer"]
  146. layout_mode = 2
  147. [node name="DifficultyStars" type="HBoxContainer" parent="MarginContainer/HBoxContainer/HSplitContainer/VBoxContainer"]
  148. unique_name_in_owner = true
  149. layout_mode = 2
  150. theme_override_constants/separation = 0
  151. [node name="Star1" type="NinePatchRect" parent="MarginContainer/HBoxContainer/HSplitContainer/VBoxContainer/DifficultyStars"]
  152. custom_minimum_size = Vector2(8, 0)
  153. layout_mode = 2
  154. texture = ExtResource("6_m23pw")
  155. region_rect = Rect2(0, 0, 8, 8)
  156. patch_margin_bottom = 8
  157. [node name="Star2" type="NinePatchRect" parent="MarginContainer/HBoxContainer/HSplitContainer/VBoxContainer/DifficultyStars"]
  158. custom_minimum_size = Vector2(8, 0)
  159. layout_mode = 2
  160. texture = ExtResource("6_m23pw")
  161. region_rect = Rect2(0, 0, 8, 8)
  162. patch_margin_bottom = 8
  163. [node name="Star3" type="NinePatchRect" parent="MarginContainer/HBoxContainer/HSplitContainer/VBoxContainer/DifficultyStars"]
  164. custom_minimum_size = Vector2(8, 0)
  165. layout_mode = 2
  166. texture = ExtResource("6_m23pw")
  167. region_rect = Rect2(0, 0, 8, 8)
  168. patch_margin_bottom = 8
  169. [node name="Star4" type="NinePatchRect" parent="MarginContainer/HBoxContainer/HSplitContainer/VBoxContainer/DifficultyStars"]
  170. custom_minimum_size = Vector2(8, 0)
  171. layout_mode = 2
  172. texture = ExtResource("6_m23pw")
  173. region_rect = Rect2(0, 0, 8, 8)
  174. patch_margin_bottom = 8
  175. [node name="Star5" type="NinePatchRect" parent="MarginContainer/HBoxContainer/HSplitContainer/VBoxContainer/DifficultyStars"]
  176. custom_minimum_size = Vector2(8, 0)
  177. layout_mode = 2
  178. texture = ExtResource("6_m23pw")
  179. region_rect = Rect2(0, 0, 8, 8)
  180. patch_margin_bottom = 8
  181. [node name="CampaignIcon" type="NinePatchRect" parent="MarginContainer/HBoxContainer/HSplitContainer/VBoxContainer"]
  182. unique_name_in_owner = true
  183. custom_minimum_size = Vector2(42, 16)
  184. layout_mode = 2
  185. size_flags_vertical = 10
  186. texture = ExtResource("7_scevv")
  187. region_rect = Rect2(0, 0, 42, 16)
  188. [node name="TextureRect" type="TextureRect" parent="."]
  189. visible = false
  190. layout_mode = 1
  191. anchors_preset = -1
  192. anchor_top = 0.5
  193. anchor_bottom = 0.5
  194. offset_left = -8.0
  195. offset_top = -4.0
  196. offset_bottom = 4.0
  197. grow_vertical = 2
  198. [node name="ResourceSetterNew" type="Node" parent="TextureRect" node_paths=PackedStringArray("node_to_affect")]
  199. script = ExtResource("8_vfnya")
  200. node_to_affect = NodePath("..")
  201. property_name = "texture"
  202. mode = 1
  203. resource_json = ExtResource("9_d0564")
  204. metadata/_custom_type_script = "uid://cbal8ms2oe1ik"
  205. [node name="LabelFontChanger" type="Node" parent="." node_paths=PackedStringArray("labels")]
  206. script = ExtResource("10_x7igx")
  207. labels = [NodePath("../MarginContainer/HBoxContainer/HSplitContainer/LeftHalf/LevelInfo/ScrollContainer/LevelName"), NodePath("../MarginContainer/HBoxContainer/HSplitContainer/LeftHalf/LevelInfo/ScrollContainer2/LevelAuthor")]
  208. metadata/_custom_type_script = "uid://co6tjg3w6qpd8"
  209. [node name="ThumbnailDownloader" type="HTTPRequest" parent="."]
  210. [connection signal="focus_entered" from="." to="TextureRect" method="show"]
  211. [connection signal="focus_entered" from="." to="." method="set_process" binds= [true]]
  212. [connection signal="focus_exited" from="." to="TextureRect" method="hide"]
  213. [connection signal="focus_exited" from="." to="." method="set_process" binds= [false]]
  214. [connection signal="request_completed" from="ThumbnailDownloader" to="." method="on_request_completed"]
  215. [connection signal="tree_exiting" from="ThumbnailDownloader" to="ThumbnailDownloader" method="cancel_request"]