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

Input device feedback. More...

Inheritance diagram for Dragengine.InputDeviceFeedback:

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...
 

Detailed Description

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.

Member Function Documentation

◆ getComponent()

String Dragengine.InputDeviceFeedback.getComponent ( )

Identifier of component or empty string if standalone.

Version
1.6

◆ getDisplayIconAt()

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.

◆ getDisplayIconCount()

int Dragengine.InputDeviceFeedback.getDisplayIconCount ( )

Count of icons representing the feedback in bindings.

◆ getDisplayImage()

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.

◆ getDisplayText()

String Dragengine.InputDeviceFeedback.getDisplayText ( )

Text to display centered across display image or icon.

◆ getFeedbackIndex()

int Dragengine.InputDeviceFeedback.getFeedbackIndex ( )

Feedback index.

◆ getID()

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.

◆ getInputDevice()

InputDevice Dragengine.InputDeviceFeedback.getInputDevice ( )

Owner input device.

◆ getLargestDisplayIconX()

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.

◆ getLargestDisplayIconY()

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.

◆ getName()

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.

◆ getType()

InputDeviceFeedbackType Dragengine.InputDeviceFeedback.getType ( )

Feedback type.

◆ getValue()

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.

◆ 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.


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