Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.Scenery.ECPFont Class Reference

Font resource element class property for use with XML loading. More...

Inheritance diagram for Dragengine.Scenery.ECPFont:
Dragengine.Scenery.ElementClassProperty Dragengine.ResourceListener

Public Member Functions

void copyValue (ElementClass elementClass, ElementClassProperty property)
 Copy value from another element class property of the same type.
void failedLoading (String filename, ResourceLoaderType resourceType)
 Resource failed loading.
void finishedLoading (String path, ResourceLoaderType resourceType, Object resource)
 Resource has finished loading.
Font getFont ()
 Font resource or null if not present.
Font getFont (StubWithProperties stub, ElementClass eclass)
 Font modified by stub property if present.
bool getHasPreloaded ()
 Property has been preloaded.
String getPath ()
 Path to font resource.
bool logPreloadProblems (ElementClass elementClass, Console console)
 Log preloading problems.
ECPFont new (String name)
 Create property.
ECPFont new (String name, String path)
 Create property with initial path.
void preloadResources (ElementClass elementClass, PreloadCounter counter)
 Preload resources if supported.
void setFont (Font font)
 Set font resource or null if not present.
void setPath (String path)
 Set path to font resource.
void setValue (Object value)
 Set value of property from XML decoded value.
Public Member Functions inherited from Dragengine.Scenery.ElementClassProperty
void dispose ()
 Dispose of element class property to break reference loops.
String getName ()
 Name.
Public Member Functions inherited from Dragengine.ResourceListener

Detailed Description

Font resource element class property for use with XML loading.

Font resource is set from XML using a path. Loads the resource during preloading. The value of the property is then the loaded resource. If loading fails null resource is stored.

Member Function Documentation

◆ copyValue()

void Dragengine.Scenery.ECPFont.copyValue ( ElementClass elementClass,
ElementClassProperty property )

Copy value from another element class property of the same type.

Version
1.17

References getHasPreloaded().

Referenced by logPreloadProblems().

◆ failedLoading()

void Dragengine.Scenery.ECPFont.failedLoading ( String filename,
ResourceLoaderType resourceType )

Resource failed loading.

Implements Dragengine.ResourceListener.

References preloadResources().

Referenced by getFont().

◆ finishedLoading()

void Dragengine.Scenery.ECPFont.finishedLoading ( String path,
ResourceLoaderType resourceType,
Object resource )

Resource has finished loading.

Implements Dragengine.ResourceListener.

References getPath().

Referenced by getFont().

◆ getFont() [1/2]

Font Dragengine.Scenery.ECPFont.getFont ( )

Font resource or null if not present.

References setPath().

Referenced by getFont(), and getHasPreloaded().

◆ getFont() [2/2]

Font Dragengine.Scenery.ECPFont.getFont ( StubWithProperties stub,
ElementClass eclass )

Font modified by stub property if present.

If named stub property is not present or empty string the stored font is returned. If the named stub property is present it is loaded as font resource.

References failedLoading(), finishedLoading(), getFont(), logPreloadProblems(), and new().

◆ getHasPreloaded()

bool Dragengine.Scenery.ECPFont.getHasPreloaded ( )

Property has been preloaded.

References getFont().

Referenced by copyValue().

◆ getPath()

String Dragengine.Scenery.ECPFont.getPath ( )

Path to font resource.

Referenced by finishedLoading(), and setPath().

◆ logPreloadProblems()

bool Dragengine.Scenery.ECPFont.logPreloadProblems ( ElementClass elementClass,
Console console )

Log preloading problems.

Returns
True if problems are present.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

References copyValue().

Referenced by getFont().

◆ new() [1/2]

ECPFont Dragengine.Scenery.ECPFont.new ( String name)

Create property.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

References new().

Referenced by getFont(), new(), and new().

◆ new() [2/2]

ECPFont Dragengine.Scenery.ECPFont.new ( String name,
String path )

Create property with initial path.

References new().

◆ preloadResources()

void Dragengine.Scenery.ECPFont.preloadResources ( ElementClass elementClass,
PreloadCounter counter )

Preload resources if supported.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

References setValue().

Referenced by failedLoading().

◆ setFont()

void Dragengine.Scenery.ECPFont.setFont ( Font font)

Set font resource or null if not present.

Referenced by setValue().

◆ setPath()

void Dragengine.Scenery.ECPFont.setPath ( String path)

Set path to font resource.

References getPath().

Referenced by getFont().

◆ setValue()

void Dragengine.Scenery.ECPFont.setValue ( Object value)

Set value of property from XML decoded value.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

References setFont().

Referenced by preloadResources().


The documentation for this class was generated from the following file: