ResourceInteractiveLoader.xml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ResourceInteractiveLoader" inherits="Reference" category="Core" version="3.1.2">
  3. <brief_description>
  4. Interactive [Resource] loader.
  5. </brief_description>
  6. <description>
  7. Interactive [Resource] loader. This object is returned by [ResourceLoader] when performing an interactive load. It allows to load with high granularity, so this is mainly useful for displaying loading bars/percentages.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. <method name="get_resource">
  13. <return type="Resource">
  14. </return>
  15. <description>
  16. Returns the loaded resource if the load operation completed successfully, [code]null[/code] otherwise.
  17. </description>
  18. </method>
  19. <method name="get_stage" qualifiers="const">
  20. <return type="int">
  21. </return>
  22. <description>
  23. Returns the load stage. The total amount of stages can be queried with [method get_stage_count].
  24. </description>
  25. </method>
  26. <method name="get_stage_count" qualifiers="const">
  27. <return type="int">
  28. </return>
  29. <description>
  30. Returns the total amount of stages (calls to [method poll]) needed to completely load this resource.
  31. </description>
  32. </method>
  33. <method name="poll">
  34. <return type="int" enum="Error">
  35. </return>
  36. <description>
  37. Polls the loading operation, i.e. loads a data chunk up to the next stage.
  38. Returns [constant @GlobalScope.OK] if the poll is successful but the load operation has not finished yet (intermediate stage). This means [method poll] will have to be called again until the last stage is completed.
  39. Returns [constant @GlobalScope.ERR_FILE_EOF] if the load operation has completed successfully. The loaded resource can be obtained by calling [method get_resource].
  40. Returns another [enum @GlobalScope.Error] code if the poll has failed.
  41. </description>
  42. </method>
  43. <method name="wait">
  44. <return type="int" enum="Error">
  45. </return>
  46. <description>
  47. Polls the loading operation successively until the resource is completely loaded or a [method poll] fails.
  48. Returns [constant @GlobalScope.ERR_FILE_EOF] if the load operation has completed successfully. The loaded resource can be obtained by calling [method get_resource].
  49. Returns another [enum @GlobalScope.Error] code if a poll has failed, aborting the operation.
  50. </description>
  51. </method>
  52. </methods>
  53. <constants>
  54. </constants>
  55. </class>