|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.rico.engine.cursor.CursorManager
public class CursorManager
This class represents a cursor manager that provides the different cursors for the game. It implements the usual singleton pattern.
Method Summary | |
---|---|
void |
addCursor(GameCursor cursor)
Adds a new game cursor to the cursor pool with the specified parameters |
void |
draw(javax.media.opengl.GL gl,
int screenX,
int screenY)
Draws the current game cursor icon at the specified screen location. |
GameCursor |
getCurrCursor()
Returns the current game cursor |
java.lang.Enum |
getCurrCursorId()
Returns the enum cursor id of the current cursor. |
GameCursor |
getCursor(java.lang.Enum id)
Returns the cursor refering to the specified id enum. |
static CursorManager |
getInstance()
Returns the cursor manager's singleton instance. |
void |
setCursor(java.lang.Enum id)
Sets the mouse pointer to the specified cursor |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static CursorManager getInstance()
public void addCursor(GameCursor cursor)
cursor
- game cursor to add to the cursor poolpublic GameCursor getCursor(java.lang.Enum id)
id
- use an enum value from a custom enum class
public void setCursor(java.lang.Enum id)
id
- enum value refering to the cursorpublic GameCursor getCurrCursor()
public java.lang.Enum getCurrCursorId()
public void draw(javax.media.opengl.GL gl, int screenX, int screenY)
gl
- screenX
- screen x-coordinatescreenY
- screen y-coordinate
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |