This interface is used to interact with the virtual Gamepad device on the server.
More...
#include <gamepad.h>
This interface is used to interact with the virtual Gamepad device on the server.
◆ KeyType
The type of a general controller button.
| Enumerator |
|---|
| LS | The left stick.
|
| RS | The right stick.
|
| LT | The left trigger.
|
| RT | The right trigger.
|
◆ ConnectGamepad()
| virtual void ConnectGamepad |
( |
| ) |
const |
|
pure virtual |
Trigger the cloud machine to insert the virtual Gamepad.
◆ DisconnectGamepad()
| virtual void DisconnectGamepad |
( |
| ) |
const |
|
pure virtual |
Trigger the cloud machine to pull out the virtual Gamepad.
◆ OnGamepadKey()
| virtual void OnGamepadKey |
( |
int32_t |
keycode, |
|
|
bool |
down |
|
) |
| const |
|
pure virtual |
Trigger a key event of the cloud Gamepad.
- Parameters
-
| keycode | The keycode. |
| down | true if the button is pressed, false if the button is released. |
◆ OnGamepadStick()
| virtual void OnGamepadStick |
( |
const Gamepad::KeyType & |
type, |
|
|
int32_t |
x, |
|
|
int32_t |
y |
|
) |
| const |
|
pure virtual |
Trigger a stick event of the cloud Gamepad.
- Parameters
-
| type | The stick type. See { |
- See also
- KeyType::LS}, {
-
KeyType::RS}.
- Parameters
-
| x | The X coordinate of the stick |
| y | The Y coordinate of the stick |
◆ OnGamepadTrigger()
| virtual void OnGamepadTrigger |
( |
const Gamepad::KeyType & |
type, |
|
|
int32_t |
value, |
|
|
bool |
down |
|
) |
| const |
|
pure virtual |
Trigger a trigger event of the cloud Gamepad.
- Parameters
-
| type | The trigger type. See { |
- See also
- KeyType::LT}, {
-
KeyType::RT}.
- Parameters
-
| value | The absolute position of the trigger control. The value is normalized to a range from 0 (released) to 255 (fully pressed). |
| down | true if the trigger is pressed, false if the trigger is released. |
The documentation for this class was generated from the following file: