#include <Mouse.h>
Inherited by gedi::MouseState.
Inheritance diagram for gedi::Mouse:
Public Member Functions | |
Mouse (void) | |
~Mouse (void) | |
gedi::Error32 | Init (HWND hWindow) |
gedi::Error32 | Update (void) |
gedi::Bool32 | IsButtonDown (gedi::UInt32 iButton) |
gedi::Bool32 | IsButtonUp (gedi::UInt32 iButton) |
gedi::UInt32 | GetXAxis (void) |
gedi::UInt32 | GetYAxis (void) |
gedi::Error32 | Clear (void) |
Protected Attributes | |
LPDIRECTINPUTDEVICE8 | m_lpkDIDevice |
DIDEVICEOBJECTDATA | m_akDeviceData [MR_MOUSE_DATASIZ] |
gedi::Mouse::Mouse | ( | void | ) |
Constructor.
gedi::Mouse::~Mouse | ( | void | ) |
Destructor.
gedi::Error32 gedi::Mouse::Init | ( | HWND | hWindow | ) |
Initializes DirectX.
hWindow | Window instance. |
gedi::Error32 gedi::Mouse::Update | ( | void | ) |
Update the device state, called each cycle of game loop.
gedi::Bool32 gedi::Mouse::IsButtonDown | ( | gedi::UInt32 | iButton | ) |
Returns true if button is pressed down.
iButton | Button number (0-3), left button being 0. |
gedi::Bool32 gedi::Mouse::IsButtonUp | ( | gedi::UInt32 | iButton | ) |
Returns true if button is NOT pressed down.
iButton | Button number (0-3), left button being 0. |
gedi::UInt32 gedi::Mouse::GetXAxis | ( | void | ) |
Return the absolute X coordinate of mouse.
gedi::UInt32 gedi::Mouse::GetYAxis | ( | void | ) |
Return the absolute Y coordinate of mouse.
gedi::Error32 gedi::Mouse::Clear | ( | void | ) |
Clears the device data buffer.
LPDIRECTINPUTDEVICE8 gedi::Mouse::m_lpkDIDevice [protected] |
DirectInput object
DIDEVICEOBJECTDATA gedi::Mouse::m_akDeviceData[MR_MOUSE_DATASIZ] [protected] |
DirectInput input data