|
Drag[en]gine Script Module DragonScript 1.32.1
|
Replace variables with resolved content. More...
Public Member Functions | |
| StyledTextDefinition | getDefinition () |
| Styled text definition to add the visited content to. | |
| STDVariableResolver | new (StyledTextDefinition definition) |
| Create converter. | |
| String | resolveVariable (String variableName) |
| Resolve variable returning the value to set in place of the variable. | |
| void | visitImage (STDNImage node) |
| Visit image node. | |
| void | visitNode (STDNode node) |
| Visit node. | |
| void | visitText (STDNText node) |
| Visit text node. | |
Protected Member Functions | |
| String | resolveVariables (String text) |
| Resolve variables. | |
Replace variables with resolved content.
Subclass and implement the resolvVariable method to return the requested values. The visited content is added to a new styled text definition to keep the original intact. Tokens are contained between curly brackets like "{binding quit}". The special token "{{" is converted to "{".
| StyledTextDefinition Dragengine.Utils.StyledText.STDVariableResolver.getDefinition | ( | ) |
Styled text definition to add the visited content to.
| STDVariableResolver Dragengine.Utils.StyledText.STDVariableResolver.new | ( | StyledTextDefinition | definition | ) |
Create converter.
| String Dragengine.Utils.StyledText.STDVariableResolver.resolveVariable | ( | String | variableName | ) |
Resolve variable returning the value to set in place of the variable.
The default implementation returns the variable name in curly brackets. This can be used as error fallback.
|
protected |
Resolve variables.
| void Dragengine.Utils.StyledText.STDVariableResolver.visitImage | ( | STDNImage | node | ) |
Visit image node.
| void Dragengine.Utils.StyledText.STDVariableResolver.visitNode | ( | STDNode | node | ) |
Visit node.
| void Dragengine.Utils.StyledText.STDVariableResolver.visitText | ( | STDNText | node | ) |
Visit text node.