|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.lessvoid.nifty.render.NiftyMouseImpl
public class NiftyMouseImpl
| Constructor Summary | |
|---|---|
NiftyMouseImpl(RenderDevice renderDevice,
InputSystem inputSystem,
TimeProvider timeProvider)
|
|
| Method Summary | |
|---|---|
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)
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public NiftyMouseImpl(RenderDevice renderDevice,
InputSystem inputSystem,
TimeProvider timeProvider)
| Method Detail |
|---|
public void registerMouseCursor(String id,
String filename,
int hotspotX,
int hotspotY)
throws IOException
NiftyMouse
registerMouseCursor 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 top
IOExceptionpublic String getCurrentId()
NiftyMouse
getCurrentId in interface NiftyMousepublic void unregisterAll()
NiftyMouse
unregisterAll in interface NiftyMousepublic void resetMouseCursor()
NiftyMouse
resetMouseCursor in interface NiftyMousepublic void enableMouseCursor(String id)
NiftyMouse
enableMouseCursor in interface NiftyMouseid - the cursor id to enable
public void setMousePosition(int x,
int y)
NiftyMouse
setMousePosition in interface NiftyMousex - x coordinatey - y coordinagepublic int getX()
NiftyMouse
getX in interface NiftyMousepublic int getY()
NiftyMouse
getY in interface NiftyMousepublic long getNoMouseMovementTime()
NiftyMouse
getNoMouseMovementTime in interface NiftyMouse
public void updateMousePosition(int x,
int y)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||