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

Dictionary of images element class property for use with XML loading. More...

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

Public Member Functions

void dispose ()
 Dispose of element class property to break reference loops.
void forEach (Block ablock)
 Visit images with block with String id and Image value.
Image getAt (String id)
 Image with identifier or null if absent.
int getCount ()
 Number of images.
bool getHasPreloaded ()
 Property has been preloaded.
ECPImageMap new (String name)
 Create property.
void removeAll ()
 Remove all images.
void removeAllPath ()
 Remove all path.
void setAt (String id, Image image)
 Set image for identifier.
void setPathAt (String id, String path)
 Set path to load for identifier.
void setValue (Object value)
 Set value of property from XML decoded value.
Public Member Functions inherited from Dragengine.Scenery.ElementClassProperty
String getName ()
 Name.
bool logPreloadProblems (ElementClass elementClass, Console console)
 Log preloading problems.
void preloadResources (ElementClass elementClass, PreloadCounter counter)
 Preload resources if supported.
Public Member Functions inherited from Dragengine.ResourceListener
void finishedLoading (String filename, ResourceLoaderType resourceType, Object resource)
 Resource finished loading successfully.
void failedLoading (String filename, ResourceLoaderType resourceType)
 Resource failed loading.

Public Attributes

PreloadCounter pCounter
Array pFailedLoading
bool pHasPreloaded
Dictionary pPath

Detailed Description

Dictionary of images element class property for use with XML loading.

Version
1.35

Similar to ECPImage but assigns each image a unique name. This is useful to define a list of images to use mapped against well known identifiers. Also allows to map the same image to multiple unique identifiers if required.

Member Function Documentation

◆ dispose()

void Dragengine.Scenery.ECPImageMap.dispose ( )

Dispose of element class property to break reference loops.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

References dispose(), and new().

Referenced by dispose().

◆ forEach()

void Dragengine.Scenery.ECPImageMap.forEach ( Block ablock)

Visit images with block with String id and Image value.

Referenced by setValue().

◆ getAt()

Image Dragengine.Scenery.ECPImageMap.getAt ( String id)

Image with identifier or null if absent.

References pPath, setAt(), and setPathAt().

Referenced by getHasPreloaded(), and setAt().

◆ getCount()

int Dragengine.Scenery.ECPImageMap.getCount ( )

Number of images.

Referenced by removeAll().

◆ getHasPreloaded()

bool Dragengine.Scenery.ECPImageMap.getHasPreloaded ( )

Property has been preloaded.

References getAt().

Referenced by setValue().

◆ new()

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

Create property.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

References new(), and pPath.

Referenced by dispose(), new(), and setValue().

◆ removeAll()

void Dragengine.Scenery.ECPImageMap.removeAll ( )

Remove all images.

References getCount().

Referenced by setPathAt(), and setValue().

◆ removeAllPath()

void Dragengine.Scenery.ECPImageMap.removeAllPath ( )

Remove all path.

Referenced by setPathAt().

◆ setAt()

void Dragengine.Scenery.ECPImageMap.setAt ( String id,
Image image )

Set image for identifier.

References getAt().

Referenced by getAt(), and setValue().

◆ setPathAt()

void Dragengine.Scenery.ECPImageMap.setPathAt ( String id,
String path )

Set path to load for identifier.

References pPath, removeAll(), and removeAllPath().

Referenced by getAt().

◆ setValue()

Member Data Documentation

◆ pCounter

PreloadCounter Dragengine.Scenery.ECPImageMap.pCounter

Referenced by setValue().

◆ pFailedLoading

Array Dragengine.Scenery.ECPImageMap.pFailedLoading

Referenced by setValue().

◆ pHasPreloaded

bool Dragengine.Scenery.ECPImageMap.pHasPreloaded

Referenced by setValue().

◆ pPath

Dictionary Dragengine.Scenery.ECPImageMap.pPath

Referenced by getAt(), new(), setPathAt(), and setValue().


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