public class UiThemeLoader extends java.lang.Object implements AsyncAssetLoader<UiTheme>
AsyncAssetLoader for loading UiThemes| Constructor and Description |
|---|
UiThemeLoader(FileHandleResolver resolver)
Constructor
|
UiThemeLoader(FileHandleResolver resolver,
boolean headless)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
org.mini2Dx.gdx.utils.Array<AssetDescriptor> |
getDependencies(AssetDescriptor assetDescriptor,
AsyncLoadingCache asyncLoadingCache)
Returns an
Array of assets that the requested asset depends on |
void |
loadOnAsyncThread(AssetDescriptor assetDescriptor,
AsyncLoadingCache asyncLoadingCache)
Loads an asset (or partial data) via a non-main thread
|
boolean |
loadOnGameThread(AssetManager assetManager,
AssetDescriptor<UiTheme> assetDescriptor,
AsyncLoadingCache asyncLoadingCache,
AssetLoaderResult<UiTheme> resultHolder)
Loads an asset on the main game thread
|
public UiThemeLoader(FileHandleResolver resolver)
resolver - The FileHandleResolver to usepublic UiThemeLoader(FileHandleResolver resolver, boolean headless)
resolver - The FileHandleResolver to useheadless - True if the game is using the headless runtimepublic void loadOnAsyncThread(AssetDescriptor assetDescriptor, AsyncLoadingCache asyncLoadingCache)
AsyncAssetLoaderloadOnAsyncThread in interface AsyncAssetLoader<UiTheme>assetDescriptor - A descriptor of the asset to be loadedasyncLoadingCache - Stores data in this cache to pass to the game thread loadingpublic boolean loadOnGameThread(AssetManager assetManager, AssetDescriptor<UiTheme> assetDescriptor, AsyncLoadingCache asyncLoadingCache, AssetLoaderResult<UiTheme> resultHolder)
AssetLoaderloadOnGameThread in interface AssetLoader<UiTheme>assetManager - The AssetManager executing the loadingassetDescriptor - A descriptor of the asset to be loadedasyncLoadingCache - Stores values loaded on other threadsresultHolder - Stores the resulting objectpublic org.mini2Dx.gdx.utils.Array<AssetDescriptor> getDependencies(AssetDescriptor assetDescriptor, AsyncLoadingCache asyncLoadingCache)
AssetLoaderArray of assets that the requested asset depends ongetDependencies in interface AssetLoader<UiTheme>assetDescriptor - A descriptor of the asset to be loadedasyncLoadingCache - Stores values loaded on other threadsArray or null if there's no dependencies