Lua Player Plus Vita
Documentation of lpp-vita
|
Module that handles physical user input systems. More...
Enumerations | |
enum | DevType { UNPAIRED_DEV , VITA_DEV , VIRTUAL_DEV , DS3_DEV , DS4_DEV } |
Device types. More... | |
enum | Ctrl { SCE_CTRL_UP , SCE_CTRL_DOWN , SCE_CTRL_LEFT , SCE_CTRL_RIGHT , SCE_CTRL_CROSS , SCE_CTRL_CIRCLE , SCE_CTRL_SQUARE , SCE_CTRL_TRIANGLE , SCE_CTRL_LTRIGGER , SCE_CTRL_RTRIGGER , SCE_CTRL_START , SCE_CTRL_SELECT , SCE_CTRL_POWER , SCE_CTRL_VOLUP , SCE_CTRL_VOLDOWN , SCE_CTRL_PSBUTTON } |
Available controls value. More... | |
Functions | |
int | Controls::read (int port) |
Read pressed buttons. More... | |
int[] | Controls::readLeftAnalog (int port) |
Read left analog state. More... | |
int[] | Controls::readRightAnalog (int port) |
Read right analog state. More... | |
int[] | Controls::readTouch (void) |
Read touchscreen state. More... | |
int[] | Controls::readRetroTouch (void) |
Read rearpad state. More... | |
bool | Controls::check (int bitmask, Ctrl value) |
Check if a button is pressed. More... | |
void | Controls::rumble (int port, int small, int large) |
Changes vibration intensity for Dualshock devices. More... | |
void | Controls::setLightbar (int port, int color) |
Set lightbar color for Dualshock 4 devices. More... | |
void | Controls::lockHomeButton (void) |
Locks default PS button functionality. More... | |
void | Controls::unlockHomeButton (void) |
Unlocks default PS button functionality. More... | |
table | Controls::getDeviceInfo (void) |
Get info about controllers. More... | |
bool | Controls::headsetStatus (void) |
Check if an headset is plugged in. More... | |
Ctrl | Controls::getEnterButton (void) |
Return set controller enter button. More... | |
void | Controls::enableGyro (void) |
Enable gyroscope sensor. More... | |
void | Controls::enableAccel (void) |
Enable accelerometer sensor. More... | |
void | Controls::disableGyro (void) |
Disable gyroscope sensor. More... | |
void | Controls::disableAccel (void) |
Disable accelerometer sensor. More... | |
number[] | Controls::readGyro (void) |
Read gyroscope state. More... | |
number[] | Controls::readAccel (void) |
Read accelerometer state. More... | |
Module that handles physical user input systems.
enum DevType |
Device types.
Possible results of Controls.getDeviceInfo.
Enumerator | |
---|---|
UNPAIRED_DEV | Unpaired device. |
VITA_DEV | PSVITA controller device. |
VIRTUAL_DEV | Virtual controller device. |
DS3_DEV | Dualshock 3 device. |
DS4_DEV | Dualshock 4 device. |
enum Ctrl |
Available controls value.
int Controls::read | ( | int | port | ) |
Read pressed buttons.
port | - Device port to use (optional). |
int [] Controls::readLeftAnalog | ( | int | port | ) |
Read left analog state.
port | - Device port to use (optional). |
int [] Controls::readRightAnalog | ( | int | port | ) |
Read right analog state.
port | - Device port to use (optional). |
int [] Controls::readTouch | ( | void | ) |
Read touchscreen state.
int [] Controls::readRetroTouch | ( | void | ) |
Read rearpad state.
bool Controls::check | ( | int | bitmask, |
Ctrl | value | ||
) |
Check if a button is pressed.
bitmask | - A controls bitmask returned by Controls.read. |
value | - A control value to check. |
void Controls::rumble | ( | int | port, |
int | small, | ||
int | large | ||
) |
Changes vibration intensity for Dualshock devices.
port | - Device port to use. |
small | - Intensity for small sensor. |
large | - Intensity for large sensor. |
void Controls::setLightbar | ( | int | port, |
int | color | ||
) |
Set lightbar color for Dualshock 4 devices.
port | - Device port to use. |
color | - An RGBA color value (See Color). |
void Controls::lockHomeButton | ( | void | ) |
Locks default PS button functionality.
void Controls::unlockHomeButton | ( | void | ) |
Unlocks default PS button functionality.
table Controls::getDeviceInfo | ( | void | ) |
Get info about controllers.
bool Controls::headsetStatus | ( | void | ) |
Check if an headset is plugged in.
Ctrl Controls::getEnterButton | ( | void | ) |
Return set controller enter button.
void Controls::enableGyro | ( | void | ) |
Enable gyroscope sensor.
void Controls::enableAccel | ( | void | ) |
Enable accelerometer sensor.
void Controls::disableGyro | ( | void | ) |
Disable gyroscope sensor.
void Controls::disableAccel | ( | void | ) |
Disable accelerometer sensor.
number [] Controls::readGyro | ( | void | ) |
Read gyroscope state.
number [] Controls::readAccel | ( | void | ) |
Read accelerometer state.