Drag[en]gine Script Module DragonScript
1.21
|
Public Member Functions | |
Console | getConsole () |
String | getName () |
int | hexToInt (byte hex) |
void | logDeprecated (EasyXMLElement tag, String whatIsDeprecated) |
void | logDeprecated (EasyXMLElement tag, String whatIsDeprecated, String useWhatInstead) |
void | logDeprecatedTag (EasyXMLElement tag) |
void | logDuplicateObject (EasyXMLElement tag, String object, String identifier) |
Output error message duplicate object on the application console. More... | |
void | logIncompatibleAttributes (EasyXMLElement tag, String attributeNames) |
void | logInvalidAttribute (String filename, EasyXMLElement tag, String attribute) |
Log attribute not allowed. More... | |
void | logInvalidAttributeValue (EasyXMLElement tag, String attribute, String value) |
void | logInvalidEmptyString (EasyXMLElement tag) |
void | logInvalidValue (EasyXMLElement tag, String value) |
void | logInvalidValue (String filename, EasyXMLElement tag, String value) |
void | logLoadFileFailed (EasyXMLElement tag, String filename) |
void | logLoadingFailed (String filename) |
Log loading file failed with error log. More... | |
void | logLoadingFromFile (String filename) |
void | logMissingAttribute (EasyXMLElement tag, String attrName) |
void | logMissingCData (EasyXMLElement tag) |
void | logMissingTag (String tagName) |
void | logNotSupported (EasyXMLElement tag, String whatIsNotSupported) |
void | logObjectExists (EasyXMLElement tag, String object, String value) |
Output error message value exists already on the application console. More... | |
void | logParsingFailed (String errorLog) |
void | logSavingFailed (String filename) |
Log saving to file failed with error log. More... | |
void | logSavingFromFile (String filename) |
Log filename on the application console. More... | |
void | logUnknownTag (EasyXMLElement tag) |
void | logUnknownTag (String filename, EasyXMLElement tag) |
BaseXmlLoader | new (Console console, String name) |
void | printOnConsole (EasyXMLElement tag, String errorMessage) |
void | printOnConsole (String filename, EasyXMLElement tag, String message) |
Print message on console. More... | |
void | printOnConsole (String filename, String message) |
Print message on console. More... | |
void | printOnConsole (String message) |
BorderSize | readBorderSize (EasyXMLElement root) |
Read border size area. More... | |
int | readCDataHex (EasyXMLElement tag) |
Color | readColor (EasyXMLElement root) |
Color | readColor (EasyXMLElement root, Color defaultColor) |
ColorMatrix | readColorMatrix (EasyXMLElement root) |
Read color matrix. More... | |
CurveBezier | readCurveBezier (EasyXMLElement root) |
void | readCurveBezierPoint (EasyXMLElement root, CurveBezier curve) |
DVector | readDVector (EasyXMLElement root) |
FloatRectArea | readFloatRectArea (EasyXMLElement root) |
Read floating point rectangular area. More... | |
Font | readFont (EasyXMLElement root) |
Parse font tag. More... | |
Font | readFont (EasyXMLElement root, String basePath) |
Parse font tag. More... | |
String | readMultilineString (EasyXMLElement root) |
Multi-line string or an empty string if absent. More... | |
Point | readPoint (EasyXMLElement root) |
Point3 | readPoint3 (EasyXMLElement root) |
RectArea | readRectArea (EasyXMLElement root) |
Read rectangular area. More... | |
Vector | readVector (EasyXMLElement root) |
Vector2 | readVector2 (EasyXMLElement root) |
Vector2 | readVector2UV (EasyXMLElement root) |
Quaternion | readVectorAsQuaternion (EasyXMLElement root) |
Read vector tag as quaternion. More... | |
void | writeColor3 (EasyXMLElement root, String name, Color color) |
Write 3-component color tag using rgb attributes. More... | |
void | writeColor4 (EasyXMLElement root, String name, Color color) |
Write 4-component color tag using rgba attributes. More... | |
void | writeCurveBezier (EasyXMLElement root, String name, CurveBezier curve) |
Write bezier curve tag. More... | |
void | writeCurveBezierPoint (EasyXMLElement root, String name, CurveBezier curve, int point) |
Write bezier curve point tag. More... | |
void | writeDVector (EasyXMLElement root, String name, DVector vector) |
Write vector tag. More... | |
void | writePoint (EasyXMLElement root, String name, Point point) |
Write point tag. More... | |
void | writePoint3 (EasyXMLElement root, String name, Point3 point) |
Write point3 tag. More... | |
void | writeVector (EasyXMLElement root, String name, Vector vector) |
Write vector tag. More... | |
void | writeVector2 (EasyXMLElement root, String name, Vector2 vector) |
Write vector2 tag. More... | |
Public Attributes | |
Console | pConsole |
String | pLogFilename |
String | pName |
Protected Member Functions | |
Object | loadAndParseRootTag (String filename, String rootTagName, Block parseBlock) |
Load file safely. More... | |
Basic xml loader class providing functionality useful across various xml file loaders. Stores also a name and a console so the error functions are more generic.
Console Dragengine.LoadSave.BaseXmlLoader.getConsole | ( | ) |
Retrieves the console.
String Dragengine.LoadSave.BaseXmlLoader.getName | ( | ) |
Retrieves the name.
int Dragengine.LoadSave.BaseXmlLoader.hexToInt | ( | byte | hex | ) |
Converts a hex value to an integer value.
|
protected |
Load file safely.
Loads file inside a try-catch block to report failures in a debuggable way. The file is loaded then checked if the root tag has the correct name. Then the block is called to parse the root tag. The block receives as only parameter the root tag of type EasyXMLElement. The return value of the block is returned.
void Dragengine.LoadSave.BaseXmlLoader.logDeprecated | ( | EasyXMLElement | tag, |
String | whatIsDeprecated | ||
) |
Outputs an deprecated message on the application console.
void Dragengine.LoadSave.BaseXmlLoader.logDeprecated | ( | EasyXMLElement | tag, |
String | whatIsDeprecated, | ||
String | useWhatInstead | ||
) |
Outputs an deprecated message on the application console.
void Dragengine.LoadSave.BaseXmlLoader.logDeprecatedTag | ( | EasyXMLElement | tag | ) |
Outputs an deprecated message on the application console.
void Dragengine.LoadSave.BaseXmlLoader.logDuplicateObject | ( | EasyXMLElement | tag, |
String | object, | ||
String | identifier | ||
) |
Output error message duplicate object on the application console.
void Dragengine.LoadSave.BaseXmlLoader.logIncompatibleAttributes | ( | EasyXMLElement | tag, |
String | attributeNames | ||
) |
Outputs error message about incompatible attributes.
void Dragengine.LoadSave.BaseXmlLoader.logInvalidAttribute | ( | String | filename, |
EasyXMLElement | tag, | ||
String | attribute | ||
) |
Log attribute not allowed.
void Dragengine.LoadSave.BaseXmlLoader.logInvalidAttributeValue | ( | EasyXMLElement | tag, |
String | attribute, | ||
String | value | ||
) |
Outputs error message invalid attribute value on the application console.
void Dragengine.LoadSave.BaseXmlLoader.logInvalidEmptyString | ( | EasyXMLElement | tag | ) |
Outputs error message invalid empty string on the application console.
void Dragengine.LoadSave.BaseXmlLoader.logInvalidValue | ( | EasyXMLElement | tag, |
String | value | ||
) |
Outputs error message invalid value on the application console.
void Dragengine.LoadSave.BaseXmlLoader.logInvalidValue | ( | String | filename, |
EasyXMLElement | tag, | ||
String | value | ||
) |
Outputs error message invalid value on the application console.
void Dragengine.LoadSave.BaseXmlLoader.logLoadFileFailed | ( | EasyXMLElement | tag, |
String | filename | ||
) |
Outputs error message about a failure to load another file or resource.
void Dragengine.LoadSave.BaseXmlLoader.logLoadingFailed | ( | String | filename | ) |
Log loading file failed with error log.
void Dragengine.LoadSave.BaseXmlLoader.logLoadingFromFile | ( | String | filename | ) |
Log filename on the application console.
void Dragengine.LoadSave.BaseXmlLoader.logMissingAttribute | ( | EasyXMLElement | tag, |
String | attrName | ||
) |
Outputs error message missing attribute on the application console.
void Dragengine.LoadSave.BaseXmlLoader.logMissingCData | ( | EasyXMLElement | tag | ) |
Outputs error message missing attribute on the application console.
void Dragengine.LoadSave.BaseXmlLoader.logMissingTag | ( | String | tagName | ) |
Outputs error message missing tag on the application console.
void Dragengine.LoadSave.BaseXmlLoader.logNotSupported | ( | EasyXMLElement | tag, |
String | whatIsNotSupported | ||
) |
Outputs error message about a feature not being supported.
void Dragengine.LoadSave.BaseXmlLoader.logObjectExists | ( | EasyXMLElement | tag, |
String | object, | ||
String | value | ||
) |
Output error message value exists already on the application console.
void Dragengine.LoadSave.BaseXmlLoader.logParsingFailed | ( | String | errorLog | ) |
Log parsing failed with error log.
void Dragengine.LoadSave.BaseXmlLoader.logSavingFailed | ( | String | filename | ) |
Log saving to file failed with error log.
void Dragengine.LoadSave.BaseXmlLoader.logSavingFromFile | ( | String | filename | ) |
Log filename on the application console.
void Dragengine.LoadSave.BaseXmlLoader.logUnknownTag | ( | EasyXMLElement | tag | ) |
Outputs error message invalid axis on the application console.
void Dragengine.LoadSave.BaseXmlLoader.logUnknownTag | ( | String | filename, |
EasyXMLElement | tag | ||
) |
Outputs error message invalid axis on the application console.
BaseXmlLoader Dragengine.LoadSave.BaseXmlLoader.new | ( | Console | console, |
String | name | ||
) |
Creates a new base file loader.
Reimplemented in Dragengine.LoadSave.LoadSkinAnnotations, Dragengine.LoadSave.LoadWidgetDesigner, Dragengine.LoadSave.LoadSynthesizer, Dragengine.LoadSave.LoadStateMachine, Dragengine.LoadSave.LoadSpeechAnimation, Dragengine.LoadSave.LoadSky, Dragengine.LoadSave.LoadParticleEmitter, Dragengine.LoadSave.LoadParameterTree, Dragengine.LoadSave.LoadMousePointer, Dragengine.LoadSave.LoadGuiTheme, Dragengine.LoadSave.LoadElementClass, Dragengine.LoadSave.LoadDecoration, Dragengine.LoadSave.LoadConversation, Dragengine.LoadSave.LoadCanvasCreator, Dragengine.LoadSave.LoadCamera, Dragengine.LoadSave.LoadBorder, Dragengine.LoadSave.LoadBindings, Dragengine.LoadSave.LoadBehaviorTree, Dragengine.LoadSave.LoadAnimator, Dragengine.Audio.MaterialSounds.LoadImpactMaterialSound, Dragengine.Audio.DynamicMusic.LoadDynamicMusic, and Dragengine.Audio.Announcer.LoadAnnouncer.
void Dragengine.LoadSave.BaseXmlLoader.printOnConsole | ( | EasyXMLElement | tag, |
String | errorMessage | ||
) |
Outputs an error message on the application console.
void Dragengine.LoadSave.BaseXmlLoader.printOnConsole | ( | String | filename, |
EasyXMLElement | tag, | ||
String | message | ||
) |
Print message on console.
void Dragengine.LoadSave.BaseXmlLoader.printOnConsole | ( | String | filename, |
String | message | ||
) |
Print message on console.
void Dragengine.LoadSave.BaseXmlLoader.printOnConsole | ( | String | message | ) |
Outputs an error message on the application console.
BorderSize Dragengine.LoadSave.BaseXmlLoader.readBorderSize | ( | EasyXMLElement | root | ) |
Read border size area.
int Dragengine.LoadSave.BaseXmlLoader.readCDataHex | ( | EasyXMLElement | tag | ) |
Read CData as int where the value is stored hexadecial. If no CData is specified 0 is returned. The hexadecimal value is specified as a one or two character value. The characters have to be in the range from 0 to 9, a to f or A to F. No prefix is used. If more than two characters are specified only the first two are used.
Color Dragengine.LoadSave.BaseXmlLoader.readColor | ( | EasyXMLElement | root | ) |
Read color tag. The color components are defined using one or more child tags. One group of tags is red, green, blue and alpha to specify the color components in the range from 0 to 1. Another group of tags is intRed, intGreen, intBlue and intAlpha to specify the color components in the range from 0 to 255 where 0 equals to 0 intensity and 255 equals to full intensity. A third group of tags is hexRed, hexGreen, hexBlue and hexAlpha to specify the color components using a 1 or 2 digit hexadecimal number. The hexadecimal number can contain upper or lower case alphabetic characters. No prefix is required. If a component is not specified the default value is used which is 0 for red, green and blue and 1 for alpha.
Color Dragengine.LoadSave.BaseXmlLoader.readColor | ( | EasyXMLElement | root, |
Color | defaultColor | ||
) |
Read color tag. The color components are defined using one or more child tags. One group of tags is red, green, blue and alpha to specify the color components in the range from 0 to 1. Another group of tags is intRed, intGreen, intBlue and intAlpha to specify the color components in the range from 0 to 255 where 0 equals to 0 intensity and 255 equals to full intensity. A third group of tags is hexRed, hexGreen, hexBlue and hexAlpha to specify the color components using a 1 or 2 digit hexadecimal number. The hexadecimal number can contain upper or lower case alphabetic characters. No prefix is required. If a component is not specified the default value is used which is 0 for red, green and blue and 1 for alpha.
ColorMatrix Dragengine.LoadSave.BaseXmlLoader.readColorMatrix | ( | EasyXMLElement | root | ) |
Read color matrix.
CurveBezier Dragengine.LoadSave.BaseXmlLoader.readCurveBezier | ( | EasyXMLElement | root | ) |
Read curve tag.
void Dragengine.LoadSave.BaseXmlLoader.readCurveBezierPoint | ( | EasyXMLElement | root, |
CurveBezier | curve | ||
) |
Read curve point tag.
DVector Dragengine.LoadSave.BaseXmlLoader.readDVector | ( | EasyXMLElement | root | ) |
Read double vector tag.
FloatRectArea Dragengine.LoadSave.BaseXmlLoader.readFloatRectArea | ( | EasyXMLElement | root | ) |
Read floating point rectangular area.
Font Dragengine.LoadSave.BaseXmlLoader.readFont | ( | EasyXMLElement | root | ) |
Parse font tag.
The font properties are defined using child tags. The file tag defines the font file to use while the size tag defines the size of the font object. The size is given as the height of the font in pixels. Both tags are required. If one or both are missing a null font object is returned.
Font Dragengine.LoadSave.BaseXmlLoader.readFont | ( | EasyXMLElement | root, |
String | basePath | ||
) |
Parse font tag.
The font properties are defined using child tags. The file tag defines the font file to use while the size tag defines the size of the font object. The size is given as the height of the font in pixels. Both tags are required. If one or both are missing a null font object is returned.
String Dragengine.LoadSave.BaseXmlLoader.readMultilineString | ( | EasyXMLElement | root | ) |
Multi-line string or an empty string if absent.
Multi-line strings support br-tags to add line-breaks. Parsing stops if no more CDATA are present or a non-br tag is encountered.
Point Dragengine.LoadSave.BaseXmlLoader.readPoint | ( | EasyXMLElement | root | ) |
Read point tag.
Point3 Dragengine.LoadSave.BaseXmlLoader.readPoint3 | ( | EasyXMLElement | root | ) |
Read 3-component point tag.
RectArea Dragengine.LoadSave.BaseXmlLoader.readRectArea | ( | EasyXMLElement | root | ) |
Read rectangular area.
Vector Dragengine.LoadSave.BaseXmlLoader.readVector | ( | EasyXMLElement | root | ) |
Read vector tag.
Vector2 Dragengine.LoadSave.BaseXmlLoader.readVector2 | ( | EasyXMLElement | root | ) |
Read vector2 tag.
Vector2 Dragengine.LoadSave.BaseXmlLoader.readVector2UV | ( | EasyXMLElement | root | ) |
Read vector2 tag using the uv instead of xy notation.
Quaternion Dragengine.LoadSave.BaseXmlLoader.readVectorAsQuaternion | ( | EasyXMLElement | root | ) |
Read vector tag as quaternion.
void Dragengine.LoadSave.BaseXmlLoader.writeColor3 | ( | EasyXMLElement | root, |
String | name, | ||
Color | color | ||
) |
Write 3-component color tag using rgb attributes.
void Dragengine.LoadSave.BaseXmlLoader.writeColor4 | ( | EasyXMLElement | root, |
String | name, | ||
Color | color | ||
) |
Write 4-component color tag using rgba attributes.
void Dragengine.LoadSave.BaseXmlLoader.writeCurveBezier | ( | EasyXMLElement | root, |
String | name, | ||
CurveBezier | curve | ||
) |
Write bezier curve tag.
void Dragengine.LoadSave.BaseXmlLoader.writeCurveBezierPoint | ( | EasyXMLElement | root, |
String | name, | ||
CurveBezier | curve, | ||
int | point | ||
) |
Write bezier curve point tag.
void Dragengine.LoadSave.BaseXmlLoader.writeDVector | ( | EasyXMLElement | root, |
String | name, | ||
DVector | vector | ||
) |
Write vector tag.
void Dragengine.LoadSave.BaseXmlLoader.writePoint | ( | EasyXMLElement | root, |
String | name, | ||
Point | point | ||
) |
Write point tag.
void Dragengine.LoadSave.BaseXmlLoader.writePoint3 | ( | EasyXMLElement | root, |
String | name, | ||
Point3 | point | ||
) |
Write point3 tag.
void Dragengine.LoadSave.BaseXmlLoader.writeVector | ( | EasyXMLElement | root, |
String | name, | ||
Vector | vector | ||
) |
Write vector tag.
void Dragengine.LoadSave.BaseXmlLoader.writeVector2 | ( | EasyXMLElement | root, |
String | name, | ||
Vector2 | vector | ||
) |
Write vector2 tag.
Console Dragengine.LoadSave.BaseXmlLoader.pConsole |
String Dragengine.LoadSave.BaseXmlLoader.pLogFilename |
String Dragengine.LoadSave.BaseXmlLoader.pName |