Class TeaInputDevice
- java.lang.Object
-
- nl.colorize.multimedialib.renderer.teavm.TeaInputDevice
-
- All Implemented Interfaces:
InputDevice,Updatable
public class TeaInputDevice extends java.lang.Object implements InputDevice, Updatable
-
-
Constructor Summary
Constructors Constructor Description TeaInputDevice(Canvas canvas, nl.colorize.util.Platform.PlatformFamily platform)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PointgetPointer()booleanisKeyboardAvailable()booleanisKeyPressed(KeyCode keyCode)booleanisKeyReleased(KeyCode keyCode)booleanisPointerPressed()booleanisPointerReleased()java.lang.StringrequestTextInput(java.lang.String label, java.lang.String initialValue)Shows a dialog window requesting the user to enter text.voidupdate(float deltaTime)Updates this object for the current frame.
-
-
-
Constructor Detail
-
TeaInputDevice
public TeaInputDevice(Canvas canvas, nl.colorize.util.Platform.PlatformFamily platform)
-
-
Method Detail
-
update
public void update(float deltaTime)
Description copied from interface:UpdatableUpdates this object for the current frame.
-
getPointer
public Point getPointer()
- Specified by:
getPointerin interfaceInputDevice
-
isPointerPressed
public boolean isPointerPressed()
- Specified by:
isPointerPressedin interfaceInputDevice
-
isPointerReleased
public boolean isPointerReleased()
- Specified by:
isPointerReleasedin interfaceInputDevice
-
isKeyboardAvailable
public boolean isKeyboardAvailable()
- Specified by:
isKeyboardAvailablein interfaceInputDevice
-
isKeyPressed
public boolean isKeyPressed(KeyCode keyCode)
- Specified by:
isKeyPressedin interfaceInputDevice
-
isKeyReleased
public boolean isKeyReleased(KeyCode keyCode)
- Specified by:
isKeyReleasedin interfaceInputDevice
-
requestTextInput
public java.lang.String requestTextInput(java.lang.String label, java.lang.String initialValue)Description copied from interface:InputDeviceShows a dialog window requesting the user to enter text. This method exists only because text fields, unlike other input elements such as buttons, cannot be emulated by the renderer without losing common functionality such as copy/paste. Text input must therefore be delegated to the platform so that a native text field can be used.- Specified by:
requestTextInputin interfaceInputDevice
-
-