A mouse device.
More...
A mouse device.
The usual way to use the device is to create it, and update is before checking its state. Typical usage looks like :
◆ MouseDevice()
nkInputs::MouseDevice::MouseDevice |
( |
System * |
system | ) |
|
|
noexcept |
Constructor.
- Parameters
-
system | The system to create the device into. |
◆ ~MouseDevice()
virtual nkInputs::MouseDevice::~MouseDevice |
( |
| ) |
|
|
virtual |
◆ getSystem()
System* nkInputs::MouseDevice::getSystem |
( |
| ) |
const |
- Returns
- The System the device is in.
◆ getX()
virtual int nkInputs::MouseDevice::getX |
( |
| ) |
const |
|
pure virtual |
- Returns
- Current x coordinate on screen.
◆ getY()
virtual int nkInputs::MouseDevice::getY |
( |
| ) |
const |
|
pure virtual |
- Returns
- Current y coordinate on screen.
◆ getLastXMovement()
virtual long nkInputs::MouseDevice::getLastXMovement |
( |
| ) |
const |
|
pure virtual |
- Returns
- The last delta on the x axis.
◆ getLastYMovement()
virtual long nkInputs::MouseDevice::getLastYMovement |
( |
| ) |
const |
|
pure virtual |
- Returns
- The last delta on the y axis.
◆ getLastZMovement()
virtual long nkInputs::MouseDevice::getLastZMovement |
( |
| ) |
const |
|
pure virtual |
- Returns
- The last delta on the z axis (wheel).
◆ getLeftButton()
virtual bool nkInputs::MouseDevice::getLeftButton |
( |
| ) |
const |
|
pure virtual |
- Returns
- Whether the left button is down (true) or not (false).
◆ getRightButton()
virtual bool nkInputs::MouseDevice::getRightButton |
( |
| ) |
const |
|
pure virtual |
- Returns
- Whether the right button is down (true) or not (false).
◆ getCenterButton()
virtual bool nkInputs::MouseDevice::getCenterButton |
( |
| ) |
const |
|
pure virtual |
- Returns
- Whether the center button or wheel is down (true) or not (false).
◆ update()
virtual void nkInputs::MouseDevice::update |
( |
| ) |
|
|
pure virtual |
Updates the device's internal tracking memory.
◆ create()
Creates a standalone device, linking it to a system, but no manager. This method can be used to allocate a device and manually manage its lifetime.
- Parameters
-
system | The system to create the device into. If left to nullptr, then the Singleton instance will be used. |
- Returns
- The created device instance.
The documentation for this class was generated from the following file: