|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MouseInputListener
This interface is used to receive mouse events from MouseInput.update()
.
Method Summary | |
---|---|
void |
onButton(int button,
boolean pressed,
int x,
int y)
Called in KeyInput.update() whenever a mouse button is pressed or released. |
void |
onMove(int xDelta,
int yDelta,
int newX,
int newY)
Called in KeyInput.update() whenever the mouse is moved. |
void |
onWheel(int wheelDelta,
int x,
int y)
Called in KeyInput.update() whenever the mouse wheel is rotated. |
Method Detail |
---|
void onButton(int button, boolean pressed, int x, int y)
KeyInput.update()
whenever a mouse button is pressed or released.
button
- index of the mouse button that was pressed/releasedpressed
- true if button was pressed, false if releasedx
- x position of the mouse while button was pressed/releasedy
- y position of the mouse while button was pressed/releasedvoid onWheel(int wheelDelta, int x, int y)
KeyInput.update()
whenever the mouse wheel is rotated.
wheelDelta
- steps the wheel was rotatedx
- x position of the mouse while wheel was rotatedy
- y position of the mouse while wheel was rotatedvoid onMove(int xDelta, int yDelta, int newX, int newY)
KeyInput.update()
whenever the mouse is moved.
xDelta
- delta of the x coordinate since the last mouse movement eventyDelta
- delta of the y coordinate since the last mouse movement eventnewX
- x position of the mouse after the mouse was movednewY
- y position of the mouse after the mouse was moved
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |