public abstract class CustomCursor
extends java.lang.Object
implements org.mini2Dx.gdx.InputProcessor
InputProcessor that sets a custom mouse cursor image based on the mouse state.| Modifier and Type | Field and Description |
|---|---|
protected Pixmap |
downPixmap |
protected Pixmap |
upPixmap |
protected int |
xHotspot |
protected int |
yHotspot |
| Constructor and Description |
|---|
CustomCursor(Pixmap upPixmap,
Pixmap downPixmap,
int xHotspot,
int yHotspot)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
Pixmap |
getDownPixmap() |
Pixmap |
getUpPixmap() |
int |
getxHotspot() |
int |
getyHotspot() |
protected final Pixmap upPixmap
protected final Pixmap downPixmap
protected final int xHotspot
protected final int yHotspot
public CustomCursor(Pixmap upPixmap, Pixmap downPixmap, int xHotspot, int yHotspot)
upPixmap - The image to use in the mouse button up statedownPixmap - The image to use in the mouse button down statexHotspot - The x location of the hotspot pixel within the cursor image (origin top-left corner)yHotspot - The y location of the hotspot pixel within the cursor image (origin top-left corner)