|
Drag[en]gine Script Module DragonScript 1.35
|
Input device feedback. More...
Public Member Functions | |
Management | |
| InputDevice | getInputDevice () |
| Owner input device. | |
| int | getFeedbackIndex () |
| Feedback index. | |
Feedbacks | |
| String | getID () |
| Feedback identifier. | |
| String | getName () |
| Display name. | |
| InputDeviceFeedbackType | getType () |
| Feedback type. | |
| String | getComponent () |
| Identifier of component or empty string if standalone. | |
| Image | getDisplayImage () |
| Image to represent the feedback in 2D user interfaces or NULL if not set. | |
| int | getDisplayIconCount () |
| Count of icons representing the feedback in bindings. | |
| Image | getDisplayIconAt (int index) |
| Icon at index representing the feedback in bindings. | |
| Image | getLargestDisplayIconX (int maxWidth) |
| Largest icon not exceeding width representing the device in bindings. | |
| Image | getLargestDisplayIconY (int maxHeight) |
| Largest icon not exceeding height representing the device in bindings. | |
| String | getDisplayText () |
| Text to display centered across display image or icon. | |
| float | getValue () |
| Get current value. | |
| void | setValue (float value) |
| Set current value. | |
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.
References getType().
Referenced by getDisplayIconCount().
| 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.
References getDisplayImage().
Referenced by getDisplayText().
| int Dragengine.InputDeviceFeedback.getDisplayIconCount | ( | ) |
Count of icons representing the feedback in bindings.
References getComponent().
Referenced by getLargestDisplayIconX().
| 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.
Referenced by getDisplayIconAt().
| String Dragengine.InputDeviceFeedback.getDisplayText | ( | ) |
Text to display centered across display image or icon.
References getDisplayIconAt(), and getLargestDisplayIconX().
Referenced by getValue().
| int Dragengine.InputDeviceFeedback.getFeedbackIndex | ( | ) |
| 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.
References getID().
Referenced by getID().
| InputDevice Dragengine.InputDeviceFeedback.getInputDevice | ( | ) |
| 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.
References getDisplayIconCount().
Referenced by getDisplayText().
| 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.
Referenced by getValue().
| 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.
Referenced by getType().
| InputDeviceFeedbackType Dragengine.InputDeviceFeedback.getType | ( | ) |
| 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.
References getDisplayText(), and getLargestDisplayIconY().
Referenced by setValue().
| 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.
References getValue(), and setValue().
Referenced by setValue().