Drag[en]gine Script Module DragonScript
1.21
|
Command carrying out a specific task. More...
Public Member Functions | |
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 | stop () |
Input device key or button has been released. 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... | |
Command carrying out a specific task.
Can be bound to player input events or used in widgets.
void Dragengine.Commands.Command.analogAbsolute | ( | float | value | ) |
Absolute input device axis position changed.
Axis keeps position until next event. Gamepad events typically send this method when the stick is pushed to a new position.
value | New axis position in the range -1 to 1. |
Reimplemented in Dragengine.Commands.CommandsBAAVRTriggerInput.TriggerAction, Dragengine.Commands.CommandsBAAVRGrab.Base, and Dragengine.Commands.CommandsBAAMovement.Base.
void Dragengine.Commands.Command.analogRelative | ( | float | value | ) |
Relative input device axis position changed.
Value is the change in the relative axis. It is reset to 0 right after sending the event. No event is sent for the reset. A typical device is mouse movement resulting in this method to be called.
value | Relative axis position change in axis units. Caller is responsible to adjust the range to make different input devices match in magnitude. |
Reimplemented in Dragengine.Commands.CommandsBAAMovement.Base.
String Dragengine.Commands.Command.getDescription | ( | ) |
Description.
String Dragengine.Commands.Command.getDisplayName | ( | ) |
Display name or null.
Display name is used for EditBindingsPanel and other placers where commands have to be shown to the user in a UI. If null getName() has to be used.
String Dragengine.Commands.Command.getName | ( | ) |
Unique name.
String Dragengine.Commands.Command.getTranslateDescription | ( | ) |
Translation description or null.
If not null use TranslationManager to get description. If null or no translation can be found getDescription() has to be used.
String Dragengine.Commands.Command.getTranslateDisplayName | ( | ) |
Translation display name or null.
If not null use TranslationManager to get display name. If null or no translation can be found getDisplayName() has to be used.
Command Dragengine.Commands.Command.new | ( | ) |
Create command.
Reimplemented in Dragengine.Commands.CommandQuitGame.
Command Dragengine.Commands.Command.new | ( | String | name, |
String | description | ||
) |
Create command.
void Dragengine.Commands.Command.pulse | ( | ) |
void Dragengine.Commands.Command.setDescription | ( | String | description | ) |
Set description.
void Dragengine.Commands.Command.setDisplayName | ( | String | displayName | ) |
Set display name or null.
Display name is used for EditBindingsPanel and other placers where commands have to be shown to the user in a UI. If null getName() has to be used.
void Dragengine.Commands.Command.setName | ( | String | name | ) |
Set unique name of the command.
Allowed are only upper and lower case letters, numbers and underscores.
void Dragengine.Commands.Command.setTranslateDescription | ( | String | translateName | ) |
Set translate description or null.
If not null use TranslationManager to get display name. If null or no translation can be found getDescription() has to be used.
void Dragengine.Commands.Command.setTranslateDisplayName | ( | String | translateName | ) |
Set translate display name or null.
If not null use TranslationManager to get display name. If null or no translation can be found getDisplayName() has to be used.
void Dragengine.Commands.Command.start | ( | ) |
Input device key or button has been pressed.
Reimplemented in Dragengine.Commands.CommandScreenshot, Dragengine.Commands.CommandsBAAVRTriggerInput.TriggerAction, Dragengine.Commands.CommandsBAAVRMenuInput.MenuAction, Dragengine.Commands.CommandsBAAVRGrab.Base, Dragengine.Commands.CommandsBAAMovement.Base, and Dragengine.Commands.CommandsBAAInteract.Base.
void Dragengine.Commands.Command.stop | ( | ) |
Input device key or button has been released.
Reimplemented in Dragengine.Commands.CommandToggleConsole, Dragengine.Commands.CommandsBAAVRTriggerInput.TriggerAction, Dragengine.Commands.CommandsBAAVRMenuInput.MenuAction, Dragengine.Commands.CommandsBAAVRGrab.Base, Dragengine.Commands.CommandsBAAMovement.Base, Dragengine.Commands.CommandsBAAInteract.Base, and Dragengine.Commands.CommandQuitGame.
void Dragengine.Commands.Command.touch | ( | ) |
Input device button has been touched.
Reimplemented in Dragengine.Commands.CommandsBAAVRTriggerInput.TriggerAction, and Dragengine.Commands.CommandsBAAVRMenuInput.MenuAction.
String Dragengine.Commands.Command.translateDescription | ( | ) |
Translated command description using default TranslationManager.
Same as translateDescription(TranslationManager) using TranslationManager.get() .
String Dragengine.Commands.Command.translateDescription | ( | TranslationManager | translationManager | ) |
Translated command description.
Tries first to translate using translationManager. If translationManager is null or no translation is found tries translate using EngineTranslations. If no translation is found returns getDescription().
Returns UTF-8 string.
translationManager | TranslationManager to use or null. |
String Dragengine.Commands.Command.translateDisplayName | ( | ) |
Translated display name using default TranslationManager.
Same as translateDisplayName(TranslationManager) using TranslationManager.get() .
String Dragengine.Commands.Command.translateDisplayName | ( | TranslationManager | translationManager | ) |
Translated display name.
Tries first to translate using translationManager. If translationManager is null or the transation can not be found tries translate using EngineTranslations. If this does not provide a translation returns getDisplayName(). If getDisplayName() is null returns getName().
Returns UTF-8 string.
translationManager | TranslationManager to use or null. |
void Dragengine.Commands.Command.untouch | ( | ) |
Input device button has been untouched.
Reimplemented in Dragengine.Commands.CommandsBAAVRTriggerInput.TriggerAction, and Dragengine.Commands.CommandsBAAVRMenuInput.MenuAction.