org.newdawn.slick.gui
Interface GUIContext

All Known Implementing Classes:
AppGameContainer, AppletGameContainer.Container, GameContainer

public interface GUIContext

The context in which GUI components are created and rendered

Author:
kevin

Method Summary
 Font getDefaultFont()
          Get the default system font
 int getHeight()
          Get the height of the game canvas
 Input getInput()
          Get the input system
 int getScreenHeight()
          Get the height of the standard screen resolution
 int getScreenWidth()
          Get the width of the standard screen resolution
 long getTime()
          Get the accurate system time
 int getWidth()
          Get the width of the game canvas
 void setDefaultMouseCursor()
          Set the default mouse cursor - i.e.
 void setMouseCursor(org.lwjgl.input.Cursor cursor, int hotSpotX, int hotSpotY)
          Set the mouse cursor to be displayed - this is a hardware cursor and hence shouldn't have any impact on FPS.
 void setMouseCursor(ImageData data, int hotSpotX, int hotSpotY)
          Set the mouse cursor to be displayed - this is a hardware cursor and hence shouldn't have any impact on FPS.
 void setMouseCursor(java.lang.String ref, int hotSpotX, int hotSpotY)
          Set the mouse cursor to be displayed - this is a hardware cursor and hence shouldn't have any impact on FPS.
 

Method Detail

getInput

Input getInput()
Get the input system

Returns:
The input system available to this game container

getTime

long getTime()
Get the accurate system time

Returns:
The system time in milliseconds

getScreenWidth

int getScreenWidth()
Get the width of the standard screen resolution

Returns:
The screen width

getScreenHeight

int getScreenHeight()
Get the height of the standard screen resolution

Returns:
The screen height

getWidth

int getWidth()
Get the width of the game canvas

Returns:
The width of the game canvas

getHeight

int getHeight()
Get the height of the game canvas

Returns:
The height of the game canvas

getDefaultFont

Font getDefaultFont()
Get the default system font

Returns:
The default system font

setMouseCursor

void setMouseCursor(java.lang.String ref,
                    int hotSpotX,
                    int hotSpotY)
                    throws SlickException
Set the mouse cursor to be displayed - this is a hardware cursor and hence shouldn't have any impact on FPS.

Parameters:
ref - The location of the image to be loaded for the cursor
hotSpotX - The x coordinate of the hotspot within the cursor image
hotSpotY - The y coordinate of the hotspot within the cursor image
Throws:
SlickException - Indicates a failure to load the cursor image or create the hardware cursor

setMouseCursor

void setMouseCursor(ImageData data,
                    int hotSpotX,
                    int hotSpotY)
                    throws SlickException
Set the mouse cursor to be displayed - this is a hardware cursor and hence shouldn't have any impact on FPS.

Parameters:
data - The image data from which the cursor can be construted
hotSpotX - The x coordinate of the hotspot within the cursor image
hotSpotY - The y coordinate of the hotspot within the cursor image
Throws:
SlickException - Indicates a failure to load the cursor image or create the hardware cursor

setMouseCursor

void setMouseCursor(org.lwjgl.input.Cursor cursor,
                    int hotSpotX,
                    int hotSpotY)
                    throws SlickException
Set the mouse cursor to be displayed - this is a hardware cursor and hence shouldn't have any impact on FPS.

Parameters:
cursor - The cursor to use
hotSpotX - The x coordinate of the hotspot within the cursor image
hotSpotY - The y coordinate of the hotspot within the cursor image
Throws:
SlickException - Indicates a failure to load the cursor image or create the hardware cursor

setDefaultMouseCursor

void setDefaultMouseCursor()
Set the default mouse cursor - i.e. the original cursor before any native cursor was set



Copyright © 2006 New Dawn Software. All Rights Reserved.