Drag[en]gine Script Module DragonScript Script API  1.0
CTRRBinding Class Reference

Rule for resolving a binding tag in actor speak action text. More...

Inheritance diagram for CTRRBinding:
ConversationTagResolverRule

Public Member Functions

void addText (StyledTextDefinition styledText, STDNText textNode, String text)
 Add span to text. More...
 
BindingManager getBindings ()
 Used bindings. More...
 
CommandManager getCommands ()
 Supported commands. More...
 
KeyStringConverter getKeyConverter ()
 Key converter. More...
 
STDStyle getStyle ()
 Style or null if not used. More...
 
CTRRBinding new (CommandManager commands, BindingManager bindings, KeyStringConverter keyConverter, STDStyle style)
 Create resolve tag rule. More...
 
void resolveTag (StyledTextDefinition styledText, STDNText textNode, String parameters)
 Resolve tag outputing result to styled text. More...
 
void setBindingManager (BindingManager bindings)
 Set used bindings. More...
 
void setCommands (CommandManager commands)
 Set supported commands. More...
 
void setKeyConverter (KeyStringConverter keyConverter)
 Set key converter. More...
 
void setStyle (STDStyle style)
 Set style or null if not used. More...
 

Detailed Description

Rule for resolving a binding tag in actor speak action text.

Resolves tags of the form {binding:command-name}. Looks up the matching command and outputs all bindings assinged to the command. Useful to output in conversation instructions to the player what input to press to trigger an action. The bindings are optionally output in a different font and/or color. Usually using a different color is recommended but using a different font can help to better recognize such output in a conversation.

Member Function Documentation

§ addText()

void addText ( StyledTextDefinition  styledText,
STDNText  textNode,
String  text 
)

Add span to text.

. Adds style if required and not existing already.

§ getBindings()

BindingManager getBindings ( )

Used bindings.

§ getCommands()

CommandManager getCommands ( )

Supported commands.

§ getKeyConverter()

KeyStringConverter getKeyConverter ( )

Key converter.

§ getStyle()

STDStyle getStyle ( )

Style or null if not used.

§ new()

CTRRBinding new ( CommandManager  commands,
BindingManager  bindings,
KeyStringConverter  keyConverter,
STDStyle  style 
)

Create resolve tag rule.

§ resolveTag()

void resolveTag ( StyledTextDefinition  styledText,
STDNText  textNode,
String  parameters 
)

Resolve tag outputing result to styled text.

Parameters
styledTextStyled text to add resolved text to.
textNodeText node to add text to.
parametersParameters inside tag.

Implements ConversationTagResolverRule.

§ setBindingManager()

void setBindingManager ( BindingManager  bindings)

Set used bindings.

§ setCommands()

void setCommands ( CommandManager  commands)

Set supported commands.

§ setKeyConverter()

void setKeyConverter ( KeyStringConverter  keyConverter)

Set key converter.

§ setStyle()

void setStyle ( STDStyle  style)

Set style or null if not used.


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