|
Drag[en]gine Script Module DragonScript 1.35
|
Input device button. More...
Public Member Functions | |
Management | |
| InputDevice | getInputDevice () |
| Owner input device. | |
| int | getButtonIndex () |
| Button index. | |
Buttons | |
| String | getID () |
| Button identifier. | |
| String | getName () |
| Display name. | |
| InputDeviceButtonType | getType () |
| Button type. | |
| String | getComponent () |
| Identifier of component or empty string if standalone. | |
| Image | getDisplayImage () |
| Image to represent the button in 2D user interfaces or NULL if not set. | |
| int | getDisplayIconCount () |
| Count of icons representing the button in bindings. | |
| Image | getDisplayIconAt (int index) |
| Icon at index representing the button 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. | |
| bool | getTouchable () |
| Button can send touch/untouch events. | |
| bool | getApproachable () |
| Button can send approach/withdraw events. | |
| bool | isPressed () |
| Get pressed state. | |
| bool | isTouched () |
| Get touched state. | |
| bool | isNear () |
| Get near state. | |
Input device button.
Wraps a input device button by button index.
Buttons can be anything a user can press. This can be a mouse button, buttons on keypads, keys on keyboards or touch fields on screens. Buttons have a pressed or not pressed state. Pressure sensitive input elements are handled as axes not buttons.
This is a native class.
| bool Dragengine.InputDeviceButton.getApproachable | ( | ) |
Button can send approach/withdraw events.
References getDisplayText(), and getLargestDisplayIconY().
Referenced by isTouched().
| int Dragengine.InputDeviceButton.getButtonIndex | ( | ) |
| String Dragengine.InputDeviceButton.getComponent | ( | ) |
Identifier of component or empty string if standalone.
References getType().
Referenced by getDisplayIconCount().
| Image Dragengine.InputDeviceButton.getDisplayIconAt | ( | int | index | ) |
Icon at index representing the button 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.InputDeviceButton.getDisplayIconCount | ( | ) |
Count of icons representing the button in bindings.
References getComponent().
Referenced by getLargestDisplayIconX().
| Image Dragengine.InputDeviceButton.getDisplayImage | ( | ) |
Image to represent the button in 2D user interfaces or NULL if not set.
Large image of 128 pixels squared or larger.
Referenced by getDisplayIconAt().
| String Dragengine.InputDeviceButton.getDisplayText | ( | ) |
Text to display centered across display image or icon.
References getDisplayIconAt().
Referenced by getApproachable().
| String Dragengine.InputDeviceButton.getID | ( | ) |
Button identifier.
Unique identifier for the button 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.InputDeviceButton.getInputDevice | ( | ) |
| Image Dragengine.InputDeviceButton.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 getTouchable().
| Image Dragengine.InputDeviceButton.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 getApproachable().
| String Dragengine.InputDeviceButton.getName | ( | ) |
| bool Dragengine.InputDeviceButton.getTouchable | ( | ) |
Button can send touch/untouch events.
References getLargestDisplayIconX().
Referenced by isPressed().
| InputDeviceButtonType Dragengine.InputDeviceButton.getType | ( | ) |
| bool Dragengine.InputDeviceButton.isNear | ( | ) |
Get near state.
This obtains the current near state from the input module. If the device has been detached from the host platform in the mean time false is returned. In contrary to InputSystem.getButtonNear() 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 isNear(), isPressed(), and isTouched().
Referenced by isNear().
| bool Dragengine.InputDeviceButton.isPressed | ( | ) |
Get pressed state.
This obtains the current pressed state from the input module. If the device has been detached from the host platform in the mean time false is returned. In contrary to InputSystem.getButtonPressed() 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 getTouchable().
Referenced by isNear().
| bool Dragengine.InputDeviceButton.isTouched | ( | ) |
Get touched state.
This obtains the current touched state from the input module. If the device has been detached from the host platform in the mean time false is returned. In contrary to InputSystem.getButtonTouched() 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 getApproachable().
Referenced by isNear().