|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.newdawn.slick.opengl.CursorLoader
public class CursorLoader
A utility to load cursors (thanks go to Kappa for the animated cursor loader)
Method Summary | |
---|---|
static CursorLoader |
get()
Retrieve the single instance of this loader - convinient huh? |
org.lwjgl.input.Cursor |
getAnimatedCursor(java.lang.String ref,
int x,
int y,
int width,
int height,
int[] cursorDelays)
Get a cursor based on a image reference on the classpath. |
org.lwjgl.input.Cursor |
getCursor(java.nio.ByteBuffer buf,
int x,
int y,
int width,
int height)
Get a cursor based on a set of image data |
org.lwjgl.input.Cursor |
getCursor(ImageData imageData,
int x,
int y)
Get a cursor based on a set of image data |
org.lwjgl.input.Cursor |
getCursor(java.lang.String ref,
int x,
int y)
Get a cursor based on a image reference on the classpath |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static CursorLoader get()
public org.lwjgl.input.Cursor getCursor(java.lang.String ref, int x, int y) throws java.io.IOException, org.lwjgl.LWJGLException
ref
- The reference to the image to be loadedx
- The x-coordinate of the cursor hotspot (left -> right)y
- The y-coordinate of the cursor hotspot (bottom -> top)
java.io.IOException
- Indicates a failure to load the image
org.lwjgl.LWJGLException
- Indicates a failure to create the hardware cursorpublic org.lwjgl.input.Cursor getCursor(java.nio.ByteBuffer buf, int x, int y, int width, int height) throws java.io.IOException, org.lwjgl.LWJGLException
buf
- The image data (stored in RGBA) to load the cursor fromx
- The x-coordinate of the cursor hotspot (left -> right)y
- The y-coordinate of the cursor hotspot (bottom -> top)width
- The width of the image data providedheight
- The height of the image data provided
java.io.IOException
- Indicates a failure to load the image
org.lwjgl.LWJGLException
- Indicates a failure to create the hardware cursorpublic org.lwjgl.input.Cursor getCursor(ImageData imageData, int x, int y) throws java.io.IOException, org.lwjgl.LWJGLException
imageData
- The data from which the cursor can read it's contentsx
- The x-coordinate of the cursor hotspot (left -> right)y
- The y-coordinate of the cursor hotspot (bottom -> top)
java.io.IOException
- Indicates a failure to load the image
org.lwjgl.LWJGLException
- Indicates a failure to create the hardware cursorpublic org.lwjgl.input.Cursor getAnimatedCursor(java.lang.String ref, int x, int y, int width, int height, int[] cursorDelays) throws java.io.IOException, org.lwjgl.LWJGLException
ref
- The reference to the image to be loadedx
- The x-coordinate of the cursor hotspot (left -> right)y
- The y-coordinate of the cursor hotspot (bottom -> top)width
- The x width of the cursorheight
- The y height of the cursorcursorDelays
- image delays between changing frames in animation
java.io.IOException
- Indicates a failure to load the image
org.lwjgl.LWJGLException
- Indicates a failure to create the hardware cursor
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |