Skip to content

InputLegacy

interludesoftware.tick

Interlude.Tick

InputLegacy Class

IInput implementation that reads from the legacy UnityEngine.Input API. Active when ENABLE_INPUT_SYSTEM is not defined.

public class InputLegacy : Interlude.Tick.IInput

Inheritance System.Object → InputLegacy

Implements IInput

Constructors

InputLegacy(bool) Constructor

Creates an input provider. Pass flipY true when the render target Y-axis runs top-to-bottom.

public InputLegacy(bool flipY=false);

Parameters

flipY System.Boolean

Methods

InputLegacy.CloseOnScreenKeyboard() Method

Dismisses the keyboard if one is open. Safe to call repeatedly.

public void CloseOnScreenKeyboard();

Implements CloseOnScreenKeyboard()

InputLegacy.GetLeftDoubleClick() Method

Returns true on the frame a left-button double-click is detected.

public bool GetLeftDoubleClick();

Implements GetLeftDoubleClick()

Returns

System.Boolean

InputLegacy.GetMousePosition() Method

Current mouse position in screen pixels.

public Vector2 GetMousePosition();

Implements GetMousePosition()

Returns

UnityEngine.Vector2

InputLegacy.GetMousePositionDelta() Method

Mouse position delta since last frame, in screen pixels.

public Vector2 GetMousePositionDelta();

Implements GetMousePositionDelta()

Returns

UnityEngine.Vector2

InputLegacy.GetOnScreenKeyboardState() Method

Snapshot of the open keyboard. Returns default when none is open.

public Interlude.Tick.OnScreenKeyboardState GetOnScreenKeyboardState();

Implements GetOnScreenKeyboardState()

Returns

OnScreenKeyboardState

InputLegacy.GetPointer(int) Method

Returns the pointer at index. Index 0 is the mouse; touches follow at 1..N. See Pointer for the per-pointer fields and the mouse-vs-touch coordinate convention.

public Interlude.Tick.Pointer GetPointer(int index);

Parameters

index System.Int32

Implements GetPointer(int)

Returns

Pointer

InputLegacy.OpenOnScreenKeyboard(string, OnScreenKeyboardConfig) Method

Asks the platform to show its on-screen keyboard with initialText. No-op if a keyboard is already open. Subsequent reads come from GetOnScreenKeyboardState().

public void OpenOnScreenKeyboard(string initialText, Interlude.Tick.OnScreenKeyboardConfig config);

Parameters

initialText System.String

config OnScreenKeyboardConfig

Implements OpenOnScreenKeyboard(string, OnScreenKeyboardConfig)

InputLegacy.Update() Method

Called once per frame to let the provider update its internal state.

public void Update();

Implements Update()