TouchControls - The Touch Gamepad Input
Shows a gamepad like touch controls for mobile users.
- Version: v1.0.0
- Available since: LIKO-12 v0.6.0
- Last updated in: LIKO-12 v0.8.0
Methods:
TouchControls.setInput
Turns on or off the touch controls.
- Available since: TouchControls: v1.0.0, LIKO-12: v0.6.0
- Last updated in: TouchControls: v1.0.0, LIKO-12: v0.8.0
TouchControls.setInput(bool)
Arguments:
- <bool> (boolean): Wheather the touch controls should be on
Events:
Please note that the example functions won't be called automatically, there must be some kind of an events handler for CPU.pullEvent, check if the LIKO-12 OS you're using has one.
touchcontrol
Triggered when the state of a virtual touch button has changed.
- Available since: TouchControls: v1.0.0, LIKO-12: v0.7.0
- Last updated in: TouchControls: v1.0.0, LIKO-12: v0.7.0
function _touchcontrol(state, button)
--Content run when the event is triggered
end
Arguments:
- state (boolean): The state of the button: True when pressed, False when released.
- button (number): The ID of the button: (1: Left, 2: Right, 3: Up, 4: Down, 5: A, 6: B, 6: Start).