public class BitmapFontLoader extends AsynchronousAssetLoader<BitmapFont,BitmapFontLoader.BitmapFontParameter>
AssetLoader for BitmapFont instances. Loads the font description file (.fnt) asynchronously, loads the
Texture containing the glyphs as a dependency. The BitmapFontLoader.BitmapFontParameter allows you to set things like texture
filters or whether to flip the glyphs vertically.| Modifier and Type | Class and Description |
|---|---|
static class |
BitmapFontLoader.BitmapFontParameter
Parameter to be passed to
AssetManager.load(String, Class, AssetLoaderParameters) if additional configuration is
necessary for the BitmapFont. |
| Constructor and Description |
|---|
BitmapFontLoader(FileHandleResolver resolver) |
| Modifier and Type | Method and Description |
|---|---|
Array<AssetDescriptor> |
getDependencies(java.lang.String fileName,
FileHandle file,
BitmapFontLoader.BitmapFontParameter parameter)
Returns the assets this asset requires to be loaded first.
|
void |
loadAsync(AssetManager manager,
java.lang.String fileName,
FileHandle file,
BitmapFontLoader.BitmapFontParameter parameter)
Loads the non-OpenGL part of the asset and injects any dependencies of the asset into the AssetManager.
|
BitmapFont |
loadSync(AssetManager manager,
java.lang.String fileName,
FileHandle file,
BitmapFontLoader.BitmapFontParameter parameter)
Loads the OpenGL part of the asset.
|
resolvepublic BitmapFontLoader(FileHandleResolver resolver)
public Array<AssetDescriptor> getDependencies(java.lang.String fileName, FileHandle file, BitmapFontLoader.BitmapFontParameter parameter)
AssetLoadergetDependencies in class AssetLoader<BitmapFont,BitmapFontLoader.BitmapFontParameter>fileName - name of the asset to loadfile - the resolved file to loadparameter - parameters for loading the assetpublic void loadAsync(AssetManager manager, java.lang.String fileName, FileHandle file, BitmapFontLoader.BitmapFontParameter parameter)
AsynchronousAssetLoaderloadAsync in class AsynchronousAssetLoader<BitmapFont,BitmapFontLoader.BitmapFontParameter>fileName - the name of the asset to loadfile - the resolved file to loadparameter - the parameters to use for loading the assetpublic BitmapFont loadSync(AssetManager manager, java.lang.String fileName, FileHandle file, BitmapFontLoader.BitmapFontParameter parameter)
AsynchronousAssetLoaderloadSync in class AsynchronousAssetLoader<BitmapFont,BitmapFontLoader.BitmapFontParameter>file - the resolved file to load