Drag[en]gine Script Module DragonScript
1.23
|
Input device feedback. More...
Public Member Functions | |
Management | |
InputDevice | getInputDevice () |
Owner input device. More... | |
int | getFeedbackIndex () |
Feedback index. More... | |
Feedbacks | |
String | getID () |
Feedback identifier. More... | |
String | getName () |
Display name. More... | |
InputDeviceFeedbackType | getType () |
Feedback type. More... | |
String | getComponent () |
Identifier of component or empty string if standalone. More... | |
Image | getDisplayImage () |
Image to represent the feedback in 2D user interfaces or NULL if not set. More... | |
int | getDisplayIconCount () |
Count of icons representing the feedback in bindings. More... | |
Image | getDisplayIconAt (int index) |
Icon at index representing the feedback in bindings. More... | |
Image | getLargestDisplayIconX (int maxWidth) |
Largest icon not exceeding width representing the device in bindings. More... | |
Image | getLargestDisplayIconY (int maxHeight) |
Largest icon not exceeding height representing the device in bindings. More... | |
String | getDisplayText () |
Text to display centered across display image or icon. More... | |
float | getValue () |
Get current value. More... | |
void | setValue (float value) |
Set current value. More... | |
Input device feedback.
Wraps a input device feedback by feedback index.
Feedback provides support for games to give a feedback in the form of lights, vibration or other haptic feeling. The maximum is fixed to 1 to make it simpler for scripts to work with. The null point is 0 where the feedback is switched off. Using the input module the value of feedback can be requested to be changed. The input module itself decides if the request is honored or not. The current value of the feedback can be read any time.
This is a native class.
String Dragengine.InputDeviceFeedback.getComponent | ( | ) |
Identifier of component or empty string if standalone.
Image Dragengine.InputDeviceFeedback.getDisplayIconAt | ( | int | index | ) |
Icon at index representing the feedback in bindings.
Icon is of square size and typically has a size of 16, 24, 32 or 64.
int Dragengine.InputDeviceFeedback.getDisplayIconCount | ( | ) |
Count of icons representing the feedback in bindings.
Image Dragengine.InputDeviceFeedback.getDisplayImage | ( | ) |
Image to represent the feedback in 2D user interfaces or NULL if not set.
Large image of 128 pixels squared or larger.
String Dragengine.InputDeviceFeedback.getDisplayText | ( | ) |
Text to display centered across display image or icon.
int Dragengine.InputDeviceFeedback.getFeedbackIndex | ( | ) |
Feedback index.
String Dragengine.InputDeviceFeedback.getID | ( | ) |
Feedback identifier.
Unique identifier for the feedback identifying it inside the parent device. The prefix is a normalized string that contains only letters, numbers and underscores. It is suitable to be combined with the device identifier to store them in config files as key bindings.
InputDevice Dragengine.InputDeviceFeedback.getInputDevice | ( | ) |
Owner input device.
Image Dragengine.InputDeviceFeedback.getLargestDisplayIconX | ( | int | maxWidth | ) |
Largest icon not exceeding width representing the device in bindings.
Icon typically has a size of 16, 24, 32 or 64.
Image Dragengine.InputDeviceFeedback.getLargestDisplayIconY | ( | int | maxHeight | ) |
Largest icon not exceeding height representing the device in bindings.
Icon typically has a size of 16, 24, 32 or 64.
String Dragengine.InputDeviceFeedback.getName | ( | ) |
Display name.
Dispaly name is human readable like for example 'Feedback #1'. The name is unique but not guaranteed to stay the same across restarting the input module or game engine.
InputDeviceFeedbackType Dragengine.InputDeviceFeedback.getType | ( | ) |
Feedback type.
float Dragengine.InputDeviceFeedback.getValue | ( | ) |
Get current value.
Get current value from input module. If the device has been detached from the host platform in the mean time 0 is returned. In contrary to InputSystem.getFeedbackValue() no exception is thrown. This allows to keep a reference to this instance without worrying about the device being detached from the system. If reattached the device properly works again.
void Dragengine.InputDeviceFeedback.setValue | ( | float | value | ) |
Set current value.
Request input module to set current value of feedback. If the device has been detached from the host platform in the mean time nothing is done. In contrary to InputSystem.setFeedbackValue() no exception is thrown. This allows to keep a reference to this instance without worrying about the device being detached from the system. If reattached the device properly works again.