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

Color element class property for use with XML loading. More...

Inheritance diagram for Dragengine.Scenery.ECPColor:
Dragengine.Scenery.ElementClassProperty

Public Member Functions

void copyValue (ElementClass elementClass, ElementClassProperty property)
 Copy value from another element class property of the same type. More...
 
Color getColor ()
 Color. More...
 
Color getColor (StubWithProperties stub, CodecPropertyString codec)
 Color modified by stub property if present. More...
 
ECPColor new (String name)
 Create property. More...
 
ECPColor new (String name, Color color)
 Create property with initial path. More...
 
void setColor (Color color)
 Set color. 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...
 
bool logPreloadProblems (ElementClass elementClass, Console console)
 Log preloading problems. More...
 
void preloadResources (ElementClass elementClass, PreloadCounter counter)
 Preload resources if supported. More...
 

Detailed Description

Color element class property for use with XML loading.

Color is stored as Color instance.

Member Function Documentation

◆ copyValue()

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

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

Version
1.17

◆ getColor() [1/2]

Color Dragengine.Scenery.ECPColor.getColor ( )

Color.

◆ getColor() [2/2]

Color Dragengine.Scenery.ECPColor.getColor ( StubWithProperties  stub,
CodecPropertyString  codec 
)

Color modified by stub property if present.

If named stub property is not present or empty string the stored color is returned. If the named stub property is present it is decoded using codec.

The following property value formats are understood where "red", "green" and "blue" are positive floating point values including 0:

  • "red green blue": Color.new(red, green, blue, 1)
  • "red green blue alpha": Color.new(red, green, blue, alpha)

◆ new() [1/2]

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

Create property.

Reimplemented from Dragengine.Scenery.ElementClassProperty.

◆ new() [2/2]

ECPColor Dragengine.Scenery.ECPColor.new ( String  name,
Color  color 
)

Create property with initial path.

◆ setColor()

void Dragengine.Scenery.ECPColor.setColor ( Color  color)

Set color.

◆ setValue()

void Dragengine.Scenery.ECPColor.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: