Handles mouse events for games.
More...
#include <GameClientMouse.h>
Handles mouse events for games.
Listens to mouse events and forwards them to the games (as game_input_event).
◆ CGameClientMouse()
Constructor registers for mouse events at CInputManager.
- Parameters
-
gameClient | The game client implementation. |
controllerId | The controller profile used for input |
dllStruct | The emulator or game to which the events are sent. |
inputProvider | The interface providing us with mouse input. |
◆ ~CGameClientMouse()
CGameClientMouse::~CGameClientMouse |
( |
| ) |
|
|
override |
◆ ClearSource()
void CGameClientMouse::ClearSource |
( |
| ) |
|
◆ ControllerID()
std::string CGameClientMouse::ControllerID |
( |
| ) |
const |
|
overridevirtual |
The controller profile for this mouse input handler.
- Returns
- The ID of the add-on extending kodi.game.controller
Implements KODI::MOUSE::IMouseInputHandler.
◆ GetActivation()
float CGameClientMouse::GetActivation |
( |
| ) |
const |
◆ GetControllerID()
const std::string & KODI::GAME::CGameClientMouse::GetControllerID |
( |
| ) |
const |
|
inline |
◆ GetSource()
◆ OnButtonPress()
bool CGameClientMouse::OnButtonPress |
( |
const std::string & | button | ) |
|
|
overridevirtual |
A mouse button has been pressed.
- Parameters
-
button | The name of the feature being pressed |
- Returns
- True if the event was handled, otherwise false
Implements KODI::MOUSE::IMouseInputHandler.
◆ OnButtonRelease()
void CGameClientMouse::OnButtonRelease |
( |
const std::string & | button | ) |
|
|
overridevirtual |
◆ OnInputFrame()
void CGameClientMouse::OnInputFrame |
( |
| ) |
|
|
overridevirtual |
Called at the end of the frame that provided input.
This can be as a result of a pointer update, a button press, or a button release. All three events will result in a call to OnInputFrame().
Implements KODI::MOUSE::IMouseInputHandler.
◆ OnMotion()
bool CGameClientMouse::OnMotion |
( |
const std::string & | relpointer, |
|
|
int | dx, |
|
|
int | dy ) |
|
overridevirtual |
A relative pointer has moved.
- Parameters
-
relpointer | The name of the relative pointer being moved |
dx | The relative x coordinate of motion |
dy | The relative y coordinate of motion |
The mouse uses a left-handed (graphics) cartesian coordinate system. Positive X is right, positive Y is down.
- Returns
- True if the event was handled, otherwise false
- Todo
- Allow mouse motion to activate controller This will follow a larger refactoring of the mouse input system
Implements KODI::MOUSE::IMouseInputHandler.
◆ SetSource()
The documentation for this class was generated from the following files: