Drag[en]gine Script Module DragonScript  1.21
Dragengine.Utils.StyledText.STDTRRStyle Class Reference

Rule for resolving a style tag in STDTagResolver. More...

Inheritance diagram for Dragengine.Utils.StyledText.STDTRRStyle:
Dragengine.Utils.StyledText.STDTagResolverRule Dragengine.Utils.StyledText.STDTRRBinding

Public Member Functions

STDStyle getStyle ()
 Style or null if not used. More...
 
String getStyleName ()
 Style name or null if not used. More...
 
STDTRRStyle new (STDStyle style)
 Create resolve tag rule. More...
 
STDTRRStyle new (String styleName)
 Create resolve tag rule. More...
 
void resolveTag (STDTagResolver resolver, STDNText target, STDNTextSpan source, bool first, String parameters)
 Resolve tag adding STDNTextSpan to STDNText. More...
 
void setStyle (STDStyle style)
 Set style or null if not used. More...
 
void setStyleName (String name)
 Set style or null if not used. More...
 

Detailed Description

Rule for resolving a style tag in STDTagResolver.

Version
1.16

Resolves tags of the form {stylename:text}. Formats text with a specific style instead of the default style. Useful to put emphasis on some words for example. Style can be a style name to resolve inside the styled text or an explicit style definition to use. If explicit style definition is used it is added to the styled text definition if absent.

Member Function Documentation

◆ getStyle()

STDStyle Dragengine.Utils.StyledText.STDTRRStyle.getStyle ( )

Style or null if not used.

◆ getStyleName()

String Dragengine.Utils.StyledText.STDTRRStyle.getStyleName ( )

Style name or null if not used.

◆ new() [1/2]

STDTRRStyle Dragengine.Utils.StyledText.STDTRRStyle.new ( STDStyle  style)

Create resolve tag rule.

Reimplemented in Dragengine.Utils.StyledText.STDTRRBinding.

◆ new() [2/2]

STDTRRStyle Dragengine.Utils.StyledText.STDTRRStyle.new ( String  styleName)

Create resolve tag rule.

Reimplemented in Dragengine.Utils.StyledText.STDTRRBinding.

◆ resolveTag()

void Dragengine.Utils.StyledText.STDTRRStyle.resolveTag ( STDTagResolver  resolver,
STDNText  target,
STDNTextSpan  source,
bool  first,
String  parameters 
)

Resolve tag adding STDNTextSpan to STDNText.

Parameters
resolverSTDTagResolver using the rule to resolve.
targetSTDNText to add resolved STDNTextSpan to.
sourceSTDNTextSpan containing the tag name to resolve.
firstFirst span to be added. Image of source should be set to first added span.
parametersContent of tag between curly brackets after ":" delimiter

Implements Dragengine.Utils.StyledText.STDTagResolverRule.

Reimplemented in Dragengine.Utils.StyledText.STDTRRBinding.

◆ setStyle()

void Dragengine.Utils.StyledText.STDTRRStyle.setStyle ( STDStyle  style)

Set style or null if not used.

◆ setStyleName()

void Dragengine.Utils.StyledText.STDTRRStyle.setStyleName ( String  name)

Set style or null if not used.


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