public class NiftyMouseImpl extends Object implements NiftyMouse
| Constructor and Description |
|---|
NiftyMouseImpl(RenderDevice renderDevice,
InputSystem inputSystem,
TimeProvider timeProvider) |
| Modifier and Type | Method and Description |
|---|---|
void |
enableMouseCursor(String id)
Enable the given MouseCursor.
|
String |
getCurrentId()
Get the current mouse cursor id or null if no mouse cursor is set.
|
long |
getNoMouseMovementTime()
This returns the time in ms that no mouse movement has occurred.
|
int |
getX()
Get the current mouse position x coordinate.
|
int |
getY()
Get the current mouse position y coordinate.
|
void |
registerMouseCursor(String id,
String filename,
int hotspotX,
int hotspotY)
Register, load and prepare the given file for use as a mouse cursor later.
|
void |
resetMouseCursor()
Reset the mouse cursor back to the native one.
|
void |
setMousePosition(int x,
int y)
Set the mouse position to the given x, y coordinate with (0,0) being the upper
left corner of the screen.
|
void |
unregisterAll()
This unregisters all mouse cursors and disposes all resources that might have been allocated.
|
void |
updateMousePosition(int x,
int y) |
public NiftyMouseImpl(RenderDevice renderDevice, InputSystem inputSystem, TimeProvider timeProvider)
public void registerMouseCursor(String id, String filename, int hotspotX, int hotspotY) throws IOException
NiftyMouseregisterMouseCursor in interface NiftyMouseid - id of mouse cursor for later referencefilename - the image to load.hotspotX - the hotspot x coordinate of the cursor image with 0 being lefthotspotY - the hotspot y coordinate of the cursor image with 0 being topIOExceptionpublic String getCurrentId()
NiftyMousegetCurrentId in interface NiftyMousepublic void unregisterAll()
NiftyMouseunregisterAll in interface NiftyMousepublic void resetMouseCursor()
NiftyMouseresetMouseCursor in interface NiftyMousepublic void enableMouseCursor(String id)
NiftyMouseenableMouseCursor in interface NiftyMouseid - the cursor id to enablepublic void setMousePosition(int x,
int y)
NiftyMousesetMousePosition in interface NiftyMousex - x coordinatey - y coordinagepublic int getX()
NiftyMousegetX in interface NiftyMousepublic int getY()
NiftyMousegetY in interface NiftyMousepublic long getNoMouseMovementTime()
NiftyMousegetNoMouseMovementTime in interface NiftyMousepublic void updateMousePosition(int x,
int y)
Copyright © 2013. All Rights Reserved.