ResourceInteractiveLoader.xml 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ResourceInteractiveLoader" inherits="Reference" version="3.4">
  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 loading resources with high granularity, which makes it mainly useful for displaying loading bars or percentages.
  8. </description>
  9. <tutorials>
  10. </tutorials>
  11. <methods>
  12. <method name="get_resource">
  13. <return type="Resource" />
  14. <description>
  15. Returns the loaded resource if the load operation completed successfully, [code]null[/code] otherwise.
  16. </description>
  17. </method>
  18. <method name="get_stage" qualifiers="const">
  19. <return type="int" />
  20. <description>
  21. Returns the load stage. The total amount of stages can be queried with [method get_stage_count].
  22. </description>
  23. </method>
  24. <method name="get_stage_count" qualifiers="const">
  25. <return type="int" />
  26. <description>
  27. Returns the total amount of stages (calls to [method poll]) needed to completely load this resource.
  28. </description>
  29. </method>
  30. <method name="poll">
  31. <return type="int" enum="Error" />
  32. <description>
  33. Polls the loading operation, i.e. loads a data chunk up to the next stage.
  34. Returns [constant 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.
  35. Returns [constant ERR_FILE_EOF] if the load operation has completed successfully. The loaded resource can be obtained by calling [method get_resource].
  36. Returns another [enum Error] code if the poll has failed.
  37. </description>
  38. </method>
  39. <method name="wait">
  40. <return type="int" enum="Error" />
  41. <description>
  42. Polls the loading operation successively until the resource is completely loaded or a [method poll] fails.
  43. Returns [constant ERR_FILE_EOF] if the load operation has completed successfully. The loaded resource can be obtained by calling [method get_resource].
  44. Returns another [enum Error] code if a poll has failed, aborting the operation.
  45. </description>
  46. </method>
  47. </methods>
  48. <constants>
  49. </constants>
  50. </class>