Drag[en]gine Script Module DragonScript  1.23
Dragengine.ConversationSystem.CTRRBinding Class Reference

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

Inheritance diagram for Dragengine.ConversationSystem.CTRRBinding:
Dragengine.ConversationSystem.ConversationTagResolverRule

Public Member Functions

void addText (StyledTextDefinition styledText, STDNText textNode, String text, Image image)
 Add span to text. More...
 
BindingManager getBindings ()
 Used bindings. More...
 
CommandManager getCommands ()
 Supported commands. More...
 
STDStyle getStyle ()
 Style or null if not used. More...
 
CTRRBinding new (CommandManager commands, BindingManager bindings, 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 setStyle (STDStyle style)
 Set style or null if not used. More...
 

Protected Member Functions

String devicePrefix (InputDevice device)
 Get device prefix. 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 Dragengine.ConversationSystem.CTRRBinding.addText ( StyledTextDefinition  styledText,
STDNText  textNode,
String  text,
Image  image 
)

Add span to text.

. Adds style if required and not existing already.

◆ devicePrefix()

String Dragengine.ConversationSystem.CTRRBinding.devicePrefix ( InputDevice  device)
protected

Get device prefix.

◆ getBindings()

BindingManager Dragengine.ConversationSystem.CTRRBinding.getBindings ( )

Used bindings.

◆ getCommands()

CommandManager Dragengine.ConversationSystem.CTRRBinding.getCommands ( )

Supported commands.

◆ getStyle()

STDStyle Dragengine.ConversationSystem.CTRRBinding.getStyle ( )

Style or null if not used.

◆ new()

CTRRBinding Dragengine.ConversationSystem.CTRRBinding.new ( CommandManager  commands,
BindingManager  bindings,
STDStyle  style 
)

Create resolve tag rule.

◆ resolveTag()

void Dragengine.ConversationSystem.CTRRBinding.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 Dragengine.ConversationSystem.ConversationTagResolverRule.

◆ setBindingManager()

void Dragengine.ConversationSystem.CTRRBinding.setBindingManager ( BindingManager  bindings)

Set used bindings.

◆ setCommands()

void Dragengine.ConversationSystem.CTRRBinding.setCommands ( CommandManager  commands)

Set supported commands.

◆ setStyle()

void Dragengine.ConversationSystem.CTRRBinding.setStyle ( STDStyle  style)

Set style or null if not used.


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