public interface Mouse extends InputDevicePointer, Updatable
Modifier and Type | Field and Description |
---|---|
static int |
LEFT
Left click.
|
static int |
MIDDLE
Middle click.
|
static int |
RIGHT
Right click.
|
Modifier and Type | Method and Description |
---|---|
void |
addActionPressed(int click,
EventAction action)
Add an action that will be triggered on pressed state.
|
void |
addActionReleased(int click,
EventAction action)
Add an action that will be triggered on released state.
|
void |
doClick(int click)
Perform a click.
|
void |
doClickAt(int click,
int x,
int y)
Perform a click at specified coordinate.
|
int |
getOnScreenX()
Get location on screen x.
|
int |
getOnScreenY()
Get location on screen y.
|
void |
lock()
Lock mouse at its center.
|
void |
lock(int x,
int y)
Lock mouse at specified location.
|
void |
setCenter(int x,
int y)
Set mouse center for lock operation.
|
getClick, getMoveX, getMoveY, getX, getY, hasClicked, hasClickedOnce, hasMoved
static final int LEFT
static final int MIDDLE
static final int RIGHT
void addActionPressed(int click, EventAction action)
Alternative usage with classic programming style can be achieved with InputDevicePointer.hasClicked(int)
or
InputDevicePointer.hasClickedOnce(int)
.
click
- The action key.action
- The action reference.void addActionReleased(int click, EventAction action)
Alternative usage with classic programming style can be achieved with InputDevicePointer.hasClicked(int)
or
InputDevicePointer.hasClickedOnce(int)
.
click
- The action key.action
- The action reference.void lock()
void lock(int x, int y)
x
- The location x.y
- The location y.void doClick(int click)
click
- The click to perform.void doClickAt(int click, int x, int y)
click
- The click to perform.x
- The location x.y
- The location y.void setCenter(int x, int y)
x
- The location x.y
- The location y.int getOnScreenX()
int getOnScreenY()
Copyright © 2016 Byron 3D Games Studio. All rights reserved.