WVR_GetInputTouchState¶
-
WVR_EXPORT bool WVR_GetInputTouchState(WVR_DeviceType type, WVR_InputId id) Function to get the touch state of a specific input id.
- Return
- bool, true for touched and false for untouched
- Version
- API Level 1
- Parameters
type: Indicates what device type. (refer to WVR_DeviceType)id: One of WVR_InputId, indicate which touch
How to use¶
Here is an example for the function:
#include <wvr/wvr_device.h>
WVR_DeviceType controllerArray[] = {WVR_DeviceType_Controller_Right, WVR_DeviceType_Controller_Left};
int controllerCount = sizeof(controllerArray)/sizeof(controllerArray[0]);
for (int idx = 0; idx < controllerCount; idx++) {
if (WVR_GetInputTouchState(controllerArray[idx], WVR_InputId_Alias1_Trigger)) {
LOGI("Controller trigger was touched");
}
-
enum
WVR_InputId¶ The input id of the device.
Values:
-
WVR_InputId_0= 0¶
-
WVR_InputId_1= 1¶
-
WVR_InputId_2= 2¶
-
WVR_InputId_3= 3¶
-
WVR_InputId_4= 4¶
-
WVR_InputId_5= 5¶
-
WVR_InputId_6= 6¶
-
WVR_InputId_7= 7¶
-
WVR_InputId_8= 8¶
-
WVR_InputId_9= 9¶
-
WVR_InputId_10= 10¶
-
WVR_InputId_11= 11¶
-
WVR_InputId_12= 12¶
-
WVR_InputId_13= 13¶
-
WVR_InputId_14= 14¶
-
WVR_InputId_15= 15¶
-
WVR_InputId_16= 16¶
-
WVR_InputId_17= 17¶
-
WVR_InputId_18= 18¶
-
WVR_InputId_19= 19¶
-
WVR_InputId_Alias1_System= WVR_InputId_0¶ System button.
-
WVR_InputId_Alias1_Menu= WVR_InputId_1¶ Menu button.
-
WVR_InputId_Alias1_Grip= WVR_InputId_2¶ Grip button.
-
WVR_InputId_Alias1_DPad_Left= WVR_InputId_3¶ A physical DPad_Left button, or simulated by pressing the left part of the touchpad.
-
WVR_InputId_Alias1_DPad_Up= WVR_InputId_4¶ A physical DPad_Up button, or simulated by pressing the top part of the touchpad.
-
WVR_InputId_Alias1_DPad_Right= WVR_InputId_5¶ A physical DPad_Right button, or simulated by pressing the right part of the touchpad.
-
WVR_InputId_Alias1_DPad_Down= WVR_InputId_6¶ A physical DPad_Down button, or simulated by pressing the bottom part of the touchpad.
-
WVR_InputId_Alias1_Volume_Up= WVR_InputId_7¶ Volume_Up button.
-
WVR_InputId_Alias1_Volume_Down= WVR_InputId_8¶ Volume_Down button.
-
WVR_InputId_Alias1_Bumper= WVR_InputId_9¶ Bumper button.
-
WVR_InputId_Alias1_A= WVR_InputId_10¶ A button.
-
WVR_InputId_Alias1_B= WVR_InputId_11¶ B button.
-
WVR_InputId_Alias1_X= WVR_InputId_12¶ X button.
-
WVR_InputId_Alias1_Y= WVR_InputId_13¶ Y button.
-
WVR_InputId_Alias1_Back= WVR_InputId_14¶ Hmd Back button
-
WVR_InputId_Alias1_Enter= WVR_InputId_15¶ Hmd Enter button
-
WVR_InputId_Alias1_Touchpad= WVR_InputId_16¶ Touchpad input device.
-
WVR_InputId_Alias1_Trigger= WVR_InputId_17¶ Trigger input device.
-
WVR_InputId_Alias1_Thumbstick= WVR_InputId_18¶ Thumbstick input device.
-
WVR_InputId_Alias1_Parking= WVR_InputId_19¶ Parking input device.
-
WVR_InputId_Max= 32¶
-