#include <Input.h>
Public Member Functions | |
UINT | Init (void) |
Function to initialize the object Input. | |
void | Release (void) |
Function to finalize the object Input. | |
void | Update (void) |
Function to update the state of the input. | |
bool | GetKey (int key) const |
Function to ask if a key is pressed. | |
bool | KbHit (void) const |
Function to ask if the keyboard is pressed. | |
bool | EnableKeyRepeat (int delay, int interval) |
Function to activate the repetition of pulsations. | |
bool | DisableKeyRepeat (void) |
Function to deactivate the repetition of pulsations. | |
int | GetMouseX (void) const |
Function to obtain the coordinate X of the mouse. | |
int | GetMouseY (void) const |
Function to obtain the coordinate Y of the mouse. | |
int | GetMouseRelX (void) const |
Function to obtain the relative coordinate X of the mouse. | |
int | GetMouseRelY (void) const |
Function to obtain the relative coordinate Y of the mouse. | |
bool | MouseButton (int button) const |
Function to ask if a button of the mouse is pressed. | |
bool | LeftButton (void) const |
Function to ask if the left button of the mouse is pressed. | |
bool | MiddleButton (void) const |
Function to ask if the middle button of the mouse is pressed. | |
bool | RightButton (void) const |
Function to ask if the right button of the mouse is pressed. | |
bool | WheelUp (void) const |
Function to ask if the WheelUp of the mouse is pressed. | |
bool | WheelDown (void) const |
Function to ask if the WheelDown of the mouse is pressed. | |
bool | MouseInRect (Rect *rect) |
Function to ask if the mouse is inside a region. | |
Static Public Member Functions | |
static Input * | GetInstance (void) |
Function to obtain the instance of Input. |
The Input class manages the subjects related to the entrance system. These basically are, to handle and to control the keyboard and the mouse.
bool Yukino::Input::DisableKeyRepeat | ( | void | ) | [inline] |
Function to deactivate the repetition of pulsations.
This function serves to deactivate the repetition of pulsations.
bool Yukino::Input::EnableKeyRepeat | ( | int | delay, | |
int | interval | |||
) | [inline] |
Function to activate the repetition of pulsations.
This function serves to activate the repetition of pulsations.
delay | Time in ms of delay to begin the repetitions. | |
interval | Time in ms between repetition and repetition. |
Input * Yukino::Input::GetInstance | ( | void | ) | [static] |
Function to obtain the instance of Input.
This function creates an instance of Input, in case of not being created, and gives back a pointer of this if memory is successful requesting.
bool Yukino::Input::GetKey | ( | int | key | ) | const [inline] |
Function to ask if a key is pressed.
This function serves to ask if a key is pressed.
key | The key to ask. |
int Yukino::Input::GetMouseRelX | ( | void | ) | const [inline] |
Function to obtain the relative coordinate X of the mouse.
This function serves to obtain the relative coordinate X of the mouse.
int Yukino::Input::GetMouseRelY | ( | void | ) | const [inline] |
Function to obtain the relative coordinate Y of the mouse.
This function serves to obtain the relative coordinate Y of the mouse.
int Yukino::Input::GetMouseX | ( | void | ) | const [inline] |
Function to obtain the coordinate X of the mouse.
This function serves to obtain the coordinate X of the mouse.
int Yukino::Input::GetMouseY | ( | void | ) | const [inline] |
Function to obtain the coordinate Y of the mouse.
This function serves to obtain the coordinate Y of the mouse.
UINT Yukino::Input::Init | ( | void | ) |
bool Yukino::Input::KbHit | ( | void | ) | const |
Function to ask if the keyboard is pressed.
This function serves to ask if the keyboard is pressed.
bool Yukino::Input::LeftButton | ( | void | ) | const [inline] |
Function to ask if the left button of the mouse is pressed.
This function serves to ask if the left button of the mouse is pressed.
bool Yukino::Input::MiddleButton | ( | void | ) | const [inline] |
Function to ask if the middle button of the mouse is pressed.
This function serves to ask if the middle button of the mouse is pressed.
bool Yukino::Input::MouseButton | ( | int | button | ) | const [inline] |
Function to ask if a button of the mouse is pressed.
This function serves to ask if a button of the mouse is pressed.
button | The button to ask. |
bool Yukino::Input::MouseInRect | ( | Rect * | rect | ) | [inline] |
Function to ask if the mouse is inside a region.
This function serves to ask if the mouse is inside a region.
rect | The region to ask. |
void Yukino::Input::Release | ( | void | ) |
bool Yukino::Input::RightButton | ( | void | ) | const [inline] |
Function to ask if the right button of the mouse is pressed.
This function serves to ask if the right button of the mouse is pressed.
void Yukino::Input::Update | ( | void | ) |
Function to update the state of the input.
This function serves to update the state of the input.
bool Yukino::Input::WheelDown | ( | void | ) | const [inline] |
Function to ask if the WheelDown of the mouse is pressed.
This function serves to ask if the WheelDown of the mouse is pressed.
bool Yukino::Input::WheelUp | ( | void | ) | const [inline] |
Function to ask if the WheelUp of the mouse is pressed.
This function serves to ask if the WheelUp of the mouse is pressed.