preload.tscn 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. [gd_scene load_steps=3 format=2]
  2. [ext_resource path="res://preload.gd" type="Script" id=1]
  3. [sub_resource type="GDScript" id=1]
  4. script/source = "extends LinkButton
  5. func _on_LinkButton_button_up():
  6. # warning-ignore:return_value_discarded
  7. OS.shell_open(\"http://docs.godotengine.org/en/3.2/tutorials/io/background_loading.html#using-multiple-threads\")
  8. "
  9. [node name="Node" type="Node"]
  10. script = ExtResource( 1 )
  11. [node name="ColorRect" type="ColorRect" parent="."]
  12. anchor_right = 1.0
  13. anchor_bottom = 1.0
  14. color = Color( 0.00390625, 0, 0, 1 )
  15. [node name="ProgressBar" type="ProgressBar" parent="."]
  16. anchor_left = 0.5
  17. anchor_top = 0.5
  18. anchor_right = 0.5
  19. anchor_bottom = 0.5
  20. margin_left = -225.0
  21. margin_top = -66.0
  22. margin_right = 225.0
  23. margin_bottom = 66.0
  24. step = 1.0
  25. [node name="Button" type="Button" parent="."]
  26. anchor_left = 0.5
  27. anchor_top = 0.5
  28. anchor_right = 0.5
  29. anchor_bottom = 0.5
  30. margin_left = -223.0
  31. margin_top = -193.0
  32. margin_right = 224.0
  33. margin_bottom = -84.0
  34. text = "Load next scene"
  35. [node name="Label" type="Label" parent="."]
  36. anchor_left = 0.5
  37. anchor_right = 0.5
  38. margin_left = -267.0
  39. margin_top = 12.0
  40. margin_right = 267.0
  41. margin_bottom = 82.0
  42. text = "Multiple-treads loading demo
  43. The next scene contains 40 resource files. Loading is done using multiple threads.
  44. The download speed depends on the performance of your device.
  45. For more information, see:"
  46. __meta__ = {
  47. "_edit_use_anchors_": false
  48. }
  49. [node name="LinkButton" type="LinkButton" parent="."]
  50. anchor_left = 0.5
  51. anchor_right = 0.5
  52. margin_left = -233.0
  53. margin_top = 80.0
  54. margin_right = 233.0
  55. margin_bottom = 94.0
  56. text = "http://docs.godotengine.org/en/3.2/tutorials/io/background_loading.html"
  57. script = SubResource( 1 )
  58. __meta__ = {
  59. "_edit_use_anchors_": false
  60. }
  61. [connection signal="button_up" from="Button" to="." method="_on_Button_button_up"]
  62. [connection signal="button_up" from="LinkButton" to="LinkButton" method="_on_LinkButton_button_up"]