Class: EventCommandDisplayChoice

EventCommandDisplayChoice

An event command for displaying a choice

new EventCommandDisplayChoice (command)

Name Type Description
command Object Direct JSON command to parse
Properties:
Name Type Description
cancelAutoIndex SystemValue The cancel auto index value
choices Array.<SystemLang> The choiches content texts
windowChoices WindowChoices The window choices
showText boolean Indicate if there is also a show text command before this display choice

Extends

Methods

setShowText (showText)

Set the show text property
Name Type Description
showText boolean The show text value

initialize ()Object overrides

Initialize the current state
Returns:
Type Description
Object The current state

update (currentState, object, state)number overrides

Update and check if the event is finished
Name Type Description
currentState Object The current state of the event
object MapObject The current object reacting
state number The state ID
Returns:
Type Description
number The number of node to pass

goToNextCommand ()number

Returns the number of node to pass
Returns:
Type Description
number

onKeyPressed (currentState, key) overrides

First key press handle for the current stack
Name Type Description
currentState Object The current state of the event
key number The key ID pressed

onKeyPressedAndRepeat (currentState, key) overrides

Key pressed repeat handle for the current stack, but with a small wait after the first pressure (generally used for menus)
Name Type Description
currentState Object The current state of the event
key number The key ID pressed

drawHUD (currentState) overrides

Draw the HUD
Name Type Description
currentState Object The current state of the event

onKeyReleased (currentState, key) inherited overrides

First key release handle for the current stack
Name Type Description
currentState Object The current state of the event
key number The key ID pressed

onKeyPressedRepeat (currentState, key)boolean inherited overrides

Key pressed repeat handle for the current stack
Name Type Description
currentState Object The current state of the event
key number The key ID pressed
Returns:
Type Description
boolean