Drag[en]gine Script Module DragonScript  1.21
Dragengine.Scenery.ECPImage Class Reference

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

Inheritance diagram for Dragengine.Scenery.ECPImage:
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. More...
 
void failedLoading (String filename, ResourceLoaderType resourceType)
 Resource failed loading. More...
 
void finishedLoading (String path, ResourceLoaderType resourceType, Object resource)
 Resource has finished loading. More...
 
bool getHasPreloaded ()
 Property has been preloaded. More...
 
Image getImage ()
 Image resource or null if not present. More...
 
Image getImage (StubWithProperties stub, ElementClass eclass)
 Image modified by stub property if present. More...
 
String getPath ()
 Path to image resource. More...
 
bool logPreloadProblems (ElementClass elementClass, Console console)
 Log preloading problems. More...
 
ECPImage new (String name)
 Create property. More...
 
ECPImage new (String name, String path)
 Create property with initial path. More...
 
void preloadResources (ElementClass elementClass, PreloadCounter counter)
 Preload resources if supported. More...
 
void setImage (Image image)
 Set image resource or null if not present. More...
 
void setPath (String path)
 Set path to image resource. More...
 
void setValue (Object value)
 Set value of property from XML decoded value. More...
 
- Public Member Functions inherited from Dragengine.Scenery.ElementClassProperty
void dispose ()
 Dispose of element class property to break reference loops. More...
 
String getName ()
 Name. More...
 
Notification

Detailed Description

Image resource element class property for use with XML loading.

Image 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.ECPImage.copyValue ( ElementClass  elementClass,
ElementClassProperty  property 
)

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

Version
1.17

◆ failedLoading()

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

Resource failed loading.

Implements Dragengine.ResourceListener.

◆ finishedLoading()

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

Resource has finished loading.

Implements Dragengine.ResourceListener.

◆ getHasPreloaded()

bool Dragengine.Scenery.ECPImage.getHasPreloaded ( )

Property has been preloaded.

◆ getImage() [1/2]

Image Dragengine.Scenery.ECPImage.getImage ( )

Image resource or null if not present.

◆ getImage() [2/2]

Image Dragengine.Scenery.ECPImage.getImage ( StubWithProperties  stub,
ElementClass  eclass 
)

Image modified by stub property if present.

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

◆ getPath()

String Dragengine.Scenery.ECPImage.getPath ( )

Path to image resource.

◆ logPreloadProblems()

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

Log preloading problems.

Returns
True if problems are present.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

◆ new() [1/2]

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

Create property.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

◆ new() [2/2]

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

Create property with initial path.

◆ preloadResources()

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

Preload resources if supported.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

◆ setImage()

void Dragengine.Scenery.ECPImage.setImage ( Image  image)

Set image resource or null if not present.

◆ setPath()

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

Set path to image resource.

◆ setValue()

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

Set value of property from XML decoded value.

Reimplemented from Dragengine.Scenery.ElementClassProperty.


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