Class Input
- Namespace
- Lime
- Assembly
- Lime.dll
public class Input
- Inheritance
-
Input
- Inherited Members
Constructors
Input()
public Input()
Fields
KeyRepeatDelay
public float KeyRepeatDelay
Field Value
KeyRepeatInterval
public float KeyRepeatInterval
Field Value
MaxTouches
public const int MaxTouches = 4
Field Value
Simulator
public readonly Input.InputSimulator Simulator
Field Value
Properties
Acceleration
Gets the current acceleration in g-force units. This vector is specified in the current coordinate space, which takes into account any interface rotations in effect for the device. Therefore, the value of this property may change when the device rotates between portrait and landscape orientations.
public Vector3 Acceleration { get; }
Property Value
Changed
public bool Changed { get; }
Property Value
DesktopMousePosition
The current mouse position in desktop coordinates. (read only)
public Vector2 DesktopMousePosition { get; }
Property Value
NativeAcceleration
Gets the current acceleration in g-force units. This vector is based on the device in a "natural" orientation (portrait-up on iOS and device-specific on Android). The value is not changed when switching between orientations.
public Vector3 NativeAcceleration { get; }
Property Value
TextInput
public string TextInput { get; }
Property Value
WheelScrollAmount
Indicates how much the mouse wheel was moved
public float WheelScrollAmount { get; }
Property Value
Methods
ConsumeKey(Key)
public void ConsumeKey(Key key)
Parameters
key
Key
GetDesktopTouchPosition(int)
public Vector2 GetDesktopTouchPosition(int index)
Parameters
index
int
Returns
GetDoubleClickByIndex(int)
public static Key GetDoubleClickByIndex(int button)
Parameters
button
int
Returns
GetModifiers()
public Modifiers GetModifiers()
Returns
GetMouseButtonByIndex(int)
public static Key GetMouseButtonByIndex(int button)
Parameters
button
int
Returns
GetNumTouches()
public int GetNumTouches()
Returns
GetTouchByIndex(int)
public static Key GetTouchByIndex(int index)
Parameters
index
int
Returns
IsKeyPressed(Key)
Returns true while the user holds down the key identified by name. Think auto fire.
public bool IsKeyPressed(Key key)
Parameters
key
Key
Returns
IsMousePressed()
public bool IsMousePressed()
Returns
IsMousePressed(int)
public bool IsMousePressed(int button)
Parameters
button
int
Returns
IsTouching(int)
public bool IsTouching(int index)
Parameters
index
int
Returns
WasDoubleClickPressed(int)
public bool WasDoubleClickPressed(int buttonIndex)
Parameters
buttonIndex
int
Returns
WasKeyPressed(Key)
Returns true during the frame the user starts pressing down the key identified by name.
public bool WasKeyPressed(Key key)
Parameters
key
Key
Returns
WasKeyReleased(Key)
Returns true during the frame the user releases the key identified by name.
public bool WasKeyReleased(Key key)
Parameters
key
Key
Returns
WasKeyRepeated(Key)
Returns true during the frame the user starts pressing down the key identified by name or key event was repeated.
public bool WasKeyRepeated(Key key)
Parameters
key
Key
Returns
WasMousePressed()
public bool WasMousePressed()
Returns
WasMousePressed(int)
public bool WasMousePressed(int button)
Parameters
button
int
Returns
WasMouseReleased()
public bool WasMouseReleased()
Returns
WasMouseReleased(int)
public bool WasMouseReleased(int button)
Parameters
button
int
Returns
WasTouchBegan(int)
public bool WasTouchBegan(int index)
Parameters
index
int
Returns
WasTouchEnded(int)
public bool WasTouchEnded(int index)
Parameters
index
int