|
igraphic 0.2.0
Contrats graphiques chargeables : IGraphic2Module / IGraphic3Module
|
Mouse interface. More...
#include <IMouse.hpp>
Public Types | |
| enum | Buttons { BUTTON_LEFT , BUTTON_RIGHT , BUTTON_MIDDLE , EXTRA_BUTTON_1 , EXTRA_BUTTON_2 } |
Public Member Functions | |
| virtual | ~IMouse ()=default |
| Destroy the IMouse interface. | |
| virtual bool | isButtonPressed (Buttons key) const =0 |
| notice if a button is pressed | |
| virtual bool | isButtonDown (Buttons key) const =0 |
| notice if a button is down | |
| virtual bool | isButtonReleased (Buttons key) const =0 |
| notice if a button is released | |
| virtual bool | isButtonUp (Buttons key) const =0 |
| notice if a button is up | |
| virtual Vector2f | getPosition () const =0 |
| get the position of the mouse | |
| virtual void | setPosition (Vector2f position)=0 |
| set the position of the mouse | |
| virtual float | GetMouseWheelMove () const =0 |
| get the mouse wheel move | |
Mouse interface.
Same rules as IKeyboard : isButtonPressed / isButtonReleased are true for one frame, isButtonDown / isButtonUp for as long as it lasts, and all four are read anywhere in the frame, as is getPosition().
getPosition() rend des coordonnees RELATIVES A LA FENETRE, en pixels, origine en haut a gauche - jamais des coordonnees ecran, sinon aucun hit-test ecrit contre ce contrat ne serait portable.
|
virtualdefault |
Destroy the IMouse interface.
|
pure virtual |
get the mouse wheel move
|
pure virtual |
get the position of the mouse
|
pure virtual |
notice if a button is down
| key |
|
pure virtual |
notice if a button is pressed
| key |
|
pure virtual |
notice if a button is released
| key |
|
pure virtual |
notice if a button is up
| key |
|
pure virtual |
set the position of the mouse
| position |