ResourceInteractiveLoader.xml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <class name="ResourceInteractiveLoader" inherits="Reference" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../class.xsd">
  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. <members>
  49. <member name="no_subresource_cache" type="bool" setter="set_no_subresource_cache" getter="get_no_subresource_cache">
  50. Configures whether nested resources, if included, should not be cached.
  51. </member>
  52. </members>
  53. <constants>
  54. </constants>
  55. </class>