|
||||||||||
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 NiftyMouse
id
- 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
IOException
public String getCurrentId()
NiftyMouse
getCurrentId
in interface NiftyMouse
public void unregisterAll()
NiftyMouse
unregisterAll
in interface NiftyMouse
public void resetMouseCursor()
NiftyMouse
resetMouseCursor
in interface NiftyMouse
public void enableMouseCursor(String id)
NiftyMouse
enableMouseCursor
in interface NiftyMouse
id
- the cursor id to enablepublic void setMousePosition(int x, int y)
NiftyMouse
setMousePosition
in interface NiftyMouse
x
- x coordinatey
- y coordinagepublic int getX()
NiftyMouse
getX
in interface NiftyMouse
public int getY()
NiftyMouse
getY
in interface NiftyMouse
public 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 |