Drag[en]gine Script Module DragonScript 1.35
Loading...
Searching...
No Matches
Dragengine.InputDeviceFeedback Class Reference

Input device feedback. More...

Inheritance diagram for Dragengine.InputDeviceFeedback:

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.

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

References getType().

Referenced by getDisplayIconCount().

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

References getDisplayImage().

Referenced by getDisplayText().

◆ getDisplayIconCount()

int Dragengine.InputDeviceFeedback.getDisplayIconCount ( )

Count of icons representing the feedback in bindings.

References getComponent().

Referenced by getLargestDisplayIconX().

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

Referenced by getDisplayIconAt().

◆ getDisplayText()

String Dragengine.InputDeviceFeedback.getDisplayText ( )

Text to display centered across display image or icon.

References getDisplayIconAt(), and getLargestDisplayIconX().

Referenced by getValue().

◆ getFeedbackIndex()

int Dragengine.InputDeviceFeedback.getFeedbackIndex ( )

Feedback index.

References getFeedbackIndex().

Referenced by getFeedbackIndex().

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

References getID().

Referenced by getID().

◆ getInputDevice()

InputDevice Dragengine.InputDeviceFeedback.getInputDevice ( )

Owner input device.

References getInputDevice().

Referenced by getInputDevice().

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

References getDisplayIconCount().

Referenced by getDisplayText().

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

Referenced by getValue().

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

Referenced by getType().

◆ getType()

InputDeviceFeedbackType Dragengine.InputDeviceFeedback.getType ( )

Feedback type.

References getName().

Referenced by getComponent().

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

References getDisplayText(), and getLargestDisplayIconY().

Referenced by setValue().

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


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