Drag[en]gine Script Module DragonScript  1.23
Dragengine.Commands.CommandToggleConsole Class Reference

Toggle console command. More...

Inheritance diagram for Dragengine.Commands.CommandToggleConsole:
Dragengine.Commands.Command

Public Member Functions

WindowConsole getWindow ()
 Console window to show and hide. More...
 
CommandToggleConsole new (WindowConsole window)
 Create command. More...
 
void setWindow (WindowConsole window)
 Set console window to show and hide. More...
 
void stop ()
 Input key or button has been released. More...
 
- Public Member Functions inherited from Dragengine.Commands.Command
void analogAbsolute (float value)
 Absolute input device axis position changed. More...
 
void analogRelative (float value)
 Relative input device axis position changed. More...
 
String getDescription ()
 Description. More...
 
String getDisplayName ()
 Display name or null. More...
 
String getName ()
 Unique name. More...
 
String getTranslateDescription ()
 Translation description or null. More...
 
String getTranslateDisplayName ()
 Translation display name or null. More...
 
Command new ()
 Create command. More...
 
Command new (String name, String description)
 Create command. More...
 
void pulse ()
 Convenience method calling start() and stop() in succession. More...
 
void setDescription (String description)
 Set description. More...
 
void setDisplayName (String displayName)
 Set display name or null. More...
 
void setName (String name)
 Set unique name of the command. More...
 
void setTranslateDescription (String translateName)
 Set translate description or null. More...
 
void setTranslateDisplayName (String translateName)
 Set translate display name or null. More...
 
void start ()
 Input device key or button has been pressed. More...
 
void touch ()
 Input device button has been touched. More...
 
String translateDescription ()
 Translated command description using default TranslationManager. More...
 
String translateDescription (TranslationManager translationManager)
 Translated command description. More...
 
String translateDisplayName ()
 Translated display name using default TranslationManager. More...
 
String translateDisplayName (TranslationManager translationManager)
 Translated display name. More...
 
void untouch ()
 Input device button has been untouched. More...
 

Detailed Description

Toggle console command.

Shows or hides a WindowConsole provided at construction time. The command is designed to be used with BaseGameApp and in-game situations using BindingInputProcessor since this command can be only triggered by a binding or the console window itself. If the window is shown BaseGameApp.setInputProcessDesktop() is called and the window raised to the top. If the window is hidden BaseGameApp.setInputProcessBindings() is called.

While creating the command registers itself with the console window as the command to run when the user tries to close the window by pressing Escape key.

Member Function Documentation

◆ getWindow()

WindowConsole Dragengine.Commands.CommandToggleConsole.getWindow ( )

Console window to show and hide.

◆ new()

CommandToggleConsole Dragengine.Commands.CommandToggleConsole.new ( WindowConsole  window)

Create command.

◆ setWindow()

void Dragengine.Commands.CommandToggleConsole.setWindow ( WindowConsole  window)

Set console window to show and hide.

◆ stop()

void Dragengine.Commands.CommandToggleConsole.stop ( )

Input key or button has been released.

Done during stop() not start() since showing the console activates a new input processor which would cause KEY_RELEASE to be send to the console causing an unwanted typing in the input field.

Reimplemented from Dragengine.Commands.Command.


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