/
ResourceInteractiveLoader.hx
54 lines (43 loc) · 2.15 KB
/
ResourceInteractiveLoader.hx
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
// Automatically generated Godot externs: DO NOT EDIT
// MIT licensed, see LICENSE.md
package godot;
import cs.system.*;
/**
Interactive `godot.Resource` loader. This object is returned by `godot.ResourceLoader` when performing an interactive load. It allows loading resources with high granularity, which makes it mainly useful for displaying loading bars or percentages.
**/
@:libType
@:csNative
@:native("Godot.ResourceInteractiveLoader")
@:autoBuild(godot.Godot.buildUserClass())
extern abstract class ResourceInteractiveLoader extends godot.Reference {
/**
Returns the loaded resource if the load operation completed successfully, `null` otherwise.
**/
@:native("GetResource")
public function getResource():godot.Resource;
/**
Polls the loading operation, i.e. loads a data chunk up to the next stage.
Returns `OK` if the poll is successful but the load operation has not finished yet (intermediate stage). This means `godot.ResourceInteractiveLoader.poll` will have to be called again until the last stage is completed.
Returns `ERR_FILE_EOF` if the load operation has completed successfully. The loaded resource can be obtained by calling `godot.ResourceInteractiveLoader.getResource`.
Returns another `godot.Error` code if the poll has failed.
**/
@:native("Poll")
public function poll():godot.Error;
/**
Polls the loading operation successively until the resource is completely loaded or a `godot.ResourceInteractiveLoader.poll` fails.
Returns `ERR_FILE_EOF` if the load operation has completed successfully. The loaded resource can be obtained by calling `godot.ResourceInteractiveLoader.getResource`.
Returns another `godot.Error` code if a poll has failed, aborting the operation.
**/
@:native("Wait")
public function wait():godot.Error;
/**
Returns the load stage. The total amount of stages can be queried with `godot.ResourceInteractiveLoader.getStageCount`.
**/
@:native("GetStage")
public function getStage():Int;
/**
Returns the total amount of stages (calls to `godot.ResourceInteractiveLoader.poll`) needed to completely load this resource.
**/
@:native("GetStageCount")
public function getStageCount():Int;
}