|
Drag[en]gine Script Module DragonScript 1.35
|
Command carrying out a specific task. More...
Public Member Functions | |
| void | analogAbsolute (Binding binding, float value) |
| Absolute input device axis position changed. | |
| void | analogAbsolute (float value) |
| Absolute input device axis position changed. | |
| void | analogRelative (Binding binding, float value) |
| Relative input device axis position changed. | |
| void | analogRelative (float value) |
| Relative input device axis position changed. | |
| void | approach () |
| User finger approached device button. | |
| void | approach (Binding binding) |
| User finger approached device button. | |
| String | getDescription () |
| Description. | |
| String | getDisplayName () |
| Display name or null. | |
| String | getName () |
| Unique name. | |
| String | getTranslateDescription () |
| Translation description or null. | |
| String | getTranslateDisplayName () |
| Translation display name or null. | |
| Command | new () |
| Create command. | |
| Command | new (String name, String description) |
| Create command. | |
| void | pulse () |
| Convenience method calling start() and stop() in succession. | |
| void | pulse (Binding binding) |
| Convenience method calling start() and stop() in succession. | |
| void | setDescription (String description) |
| Set description. | |
| void | setDisplayName (String displayName) |
| Set display name or null. | |
| void | setName (String name) |
| Set unique name of the command. | |
| void | setTranslateDescription (String translateName) |
| Set translate description or null. | |
| void | setTranslateDisplayName (String translateName) |
| Set translate display name or null. | |
| void | start () |
| Input device key or button has been pressed. | |
| void | start (Binding binding) |
| Input device key or button has been pressed. | |
| void | stop () |
| Input device key or button has been released. | |
| void | stop (Binding binding) |
| Input device key or button has been released. | |
| void | touch () |
| Input device button has been touched. | |
| void | touch (Binding binding) |
| Input device button has been touched. | |
| String | translateDescription () |
| Translated command description using default TranslationManager. | |
| String | translateDescription (TranslationManager translationManager) |
| Translated command description. | |
| String | translateDisplayName () |
| Translated display name using default TranslationManager. | |
| String | translateDisplayName (TranslationManager translationManager) |
| Translated display name. | |
| void | untouch () |
| Input device button has been untouched. | |
| void | untouch (Binding binding) |
| Input device button has been untouched. | |
| void | withdraw () |
| User finger withdrew from device button. | |
| void | withdraw (Binding binding) |
| User finger withdrew from device button. | |
Public Attributes | |
| String | pName |
Command carrying out a specific task.
Can be bound to player input events or used in widgets.
| void Dragengine.Commands.Command.analogAbsolute | ( | Binding | binding, |
| 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. |
| binding | Binding producing the event or null if unknown or generated. |
Reimplemented in Dragengine.Commands.CommandsBAAMovement.Base.
| 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.CommandsBAAMovement.Base, Dragengine.Commands.CommandsBAAVRGrab.Base, and Dragengine.Commands.CommandsBAAVRTriggerInput.TriggerAction.
References start().
Referenced by withdraw().
| void Dragengine.Commands.Command.analogRelative | ( | Binding | binding, |
| 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. |
| binding | Binding producing the event or null if unknown or generated. |
Reimplemented in Dragengine.Commands.CommandsBAAMovement.Base.
References translateDescription().
| 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.
Referenced by withdraw(), and withdraw().
| void Dragengine.Commands.Command.approach | ( | ) |
User finger approached device button.
Reimplemented in Dragengine.Commands.CommandsBAAVRTriggerInput.TriggerAction.
References start(), and stop().
Referenced by withdraw().
| void Dragengine.Commands.Command.approach | ( | Binding | binding | ) |
User finger approached device button.
| binding | Binding producing the event or null if unknown or generated. |
| String Dragengine.Commands.Command.getDescription | ( | ) |
Description.
Referenced by getTranslateDescription().
| 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.
References getTranslateDescription().
Referenced by getTranslateDisplayName().
| String Dragengine.Commands.Command.getName | ( | ) |
| 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.
References getDescription(), new(), and setDescription().
Referenced by getDisplayName().
| 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.
References getDisplayName().
Referenced by translateDisplayName().
| Command Dragengine.Commands.Command.new | ( | ) |
Create command.
Reimplemented in Dragengine.Commands.CommandQuitGame, and Dragengine.Commands.CommandToggleConsole.
Referenced by getTranslateDescription(), new(), and setDescription().
| Command Dragengine.Commands.Command.new | ( | String | name, |
| String | description ) |
Create command.
References setName().
| void Dragengine.Commands.Command.pulse | ( | ) |
Convenience method calling start() and stop() in succession.
Used for example to run the command for different reasons than input handling.
References translateDisplayName().
| void Dragengine.Commands.Command.pulse | ( | Binding | binding | ) |
Convenience method calling start() and stop() in succession.
| binding | Binding producing the event or null if unknown or generated. |
References translateDescription().
| void Dragengine.Commands.Command.setDescription | ( | String | description | ) |
Set description.
References new(), pName, and setName().
Referenced by getName(), getTranslateDescription(), Dragengine.Commands.CommandQuitGame.new(), and Dragengine.Commands.CommandToggleConsole.new().
| 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.
References setTranslateDescription().
Referenced by setTranslateDisplayName().
| void Dragengine.Commands.Command.setName | ( | String | name | ) |
Set unique name of the command.
Allowed are only upper and lower case letters, numbers and underscores.
References pName.
Referenced by new(), Dragengine.Commands.CommandQuitGame.new(), Dragengine.Commands.CommandToggleConsole.new(), and setDescription().
| 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.
Referenced by Dragengine.Commands.CommandsBAAMovement.AnalogLookUD.analogAbsolute(), Dragengine.Commands.CommandScreenshot.getScreenshotCreator(), Dragengine.Commands.CommandQuitGame.new(), Dragengine.Commands.CommandToggleConsole.new(), setDisplayName(), Dragengine.Commands.CommandsBAAMovement.ToggleCrouch.start(), and Dragengine.Commands.CommandsBAAMovement.ToggleRun.start().
| 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.
References setDisplayName().
Referenced by Dragengine.Commands.CommandsBAAMovement.AnalogLookUD.analogAbsolute(), Dragengine.Commands.CommandScreenshot.getScreenshotCreator(), Dragengine.Commands.CommandQuitGame.new(), Dragengine.Commands.CommandToggleConsole.new(), and translateDisplayName().
| void Dragengine.Commands.Command.start | ( | ) |
Input device key or button has been pressed.
Reimplemented in Dragengine.Commands.CommandsBAAVRGrab.Base, Dragengine.Commands.CommandsBAAVRHandLocomotion.HandLocomotionAction, Dragengine.Commands.CommandsBAAVRMenuInput.MenuAction, Dragengine.Commands.CommandsBAAVRTriggerInput.TriggerAction, and Dragengine.Commands.CommandScreenshot.
Referenced by analogAbsolute(), analogAbsolute(), approach(), and untouch().
| void Dragengine.Commands.Command.start | ( | Binding | binding | ) |
Input device key or button has been pressed.
| binding | Binding producing the event or null if unknown or generated. |
Reimplemented in Dragengine.Commands.CommandsBAAInteract.Base, and Dragengine.Commands.CommandsBAAMovement.Base.
| void Dragengine.Commands.Command.stop | ( | ) |
Input device key or button has been released.
Reimplemented in Dragengine.Commands.CommandQuitGame, Dragengine.Commands.CommandsBAAInteract.Base, Dragengine.Commands.CommandsBAAMovement.Base, Dragengine.Commands.CommandsBAAVRGrab.Base, Dragengine.Commands.CommandsBAAVRHandLocomotion.HandLocomotionAction, Dragengine.Commands.CommandsBAAVRMenuInput.MenuAction, Dragengine.Commands.CommandsBAAVRTriggerInput.TriggerAction, and Dragengine.Commands.CommandToggleConsole.
References pName.
Referenced by analogAbsolute(), approach(), touch(), touch(), and untouch().
| void Dragengine.Commands.Command.stop | ( | Binding | binding | ) |
Input device key or button has been released.
| binding | Binding producing the event or null if unknown or generated. |
Reimplemented in Dragengine.Commands.CommandsBAAInteract.Base, and Dragengine.Commands.CommandsBAAMovement.Base.
| void Dragengine.Commands.Command.touch | ( | ) |
Input device button has been touched.
Reimplemented in Dragengine.Commands.CommandsBAAVRMenuInput.MenuAction, and Dragengine.Commands.CommandsBAAVRTriggerInput.TriggerAction.
References stop().
Referenced by withdraw().
| void Dragengine.Commands.Command.touch | ( | Binding | binding | ) |
| String Dragengine.Commands.Command.translateDescription | ( | ) |
Translated command description using default TranslationManager.
Same as translateDescription(TranslationManager) using TranslationManager.get() .
References translateDisplayName().
| 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. |
Referenced by analogRelative(), and pulse().
| String Dragengine.Commands.Command.translateDisplayName | ( | ) |
Translated display name using default TranslationManager.
Same as translateDisplayName(TranslationManager) using TranslationManager.get() .
References setTranslateDisplayName().
| 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. |
References getTranslateDisplayName().
Referenced by pulse(), and translateDescription().
| void Dragengine.Commands.Command.untouch | ( | ) |
Input device button has been untouched.
Reimplemented in Dragengine.Commands.CommandsBAAVRMenuInput.MenuAction, and Dragengine.Commands.CommandsBAAVRTriggerInput.TriggerAction.
References pulse(), start(), and stop().
Referenced by withdraw().
| void Dragengine.Commands.Command.untouch | ( | Binding | binding | ) |
| void Dragengine.Commands.Command.withdraw | ( | ) |
User finger withdrew from device button.
Reimplemented in Dragengine.Commands.CommandsBAAVRTriggerInput.TriggerAction.
References analogRelative().
Referenced by withdraw().
| void Dragengine.Commands.Command.withdraw | ( | Binding | binding | ) |
User finger withdrew from device button.
| binding | Binding producing the event or null if unknown or generated. |
References analogAbsolute(), analogRelative(), approach(), touch(), untouch(), and withdraw().
| String Dragengine.Commands.Command.pName |
Referenced by new(), setDescription(), setName(), and stop().