|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.newdawn.slick.BasicGame
org.newdawn.slick.tests.TestBox
public class TestBox
A test box containing a bunch of tests that can be used for quickly sanity checking tests.
| Field Summary |
|---|
| Fields inherited from class org.newdawn.slick.BasicGame |
|---|
controllerButton, controllerDown, controllerLeft, controllerRight, controllerUp |
| Constructor Summary | |
|---|---|
TestBox()
Create a new box containing all the tests |
|
| Method Summary | |
|---|---|
void |
addGame(java.lang.Class game)
Add a game to the box |
void |
controllerButtonPressed(int controller,
int button)
Notification that a button control has been pressed on the controller. |
void |
controllerButtonReleased(int controller,
int button)
Notification that a button control has been released on the controller. |
void |
controllerDownPressed(int controller)
Notification that the down control has been pressed on the controller. |
void |
controllerDownReleased(int controller)
Notification that the down control has been released on the controller. |
void |
controllerLeftPressed(int controller)
Notification that the left control has been pressed on the controller. |
void |
controllerLeftReleased(int controller)
Notification that the left control has been released on the controller. |
void |
controllerRightPressed(int controller)
Notification that the right control has been pressed on the controller. |
void |
controllerRightReleased(int controller)
Notification that the right control has been released on the controller. |
void |
controllerUpPressed(int controller)
Notification that the up control has been pressed on the controller. |
void |
controllerUpReleased(int controller)
Notification that the up control has been released on the controller. |
void |
init(GameContainer c)
Initialise the game. |
void |
keyPressed(int key,
char c)
Notification that a key was pressed |
void |
keyReleased(int key,
char c)
Notification that a key was released |
static void |
main(java.lang.String[] argv)
Entry point to our test |
void |
mouseMoved(int oldx,
int oldy,
int newx,
int newy)
Notification that mouse cursor was moved |
void |
mousePressed(int button,
int x,
int y)
Notification that a mouse button was pressed |
void |
mouseReleased(int button,
int x,
int y)
Notification that a mouse button was released |
void |
mouseWheelMoved(int change)
Notification that the mouse wheel position was updated |
void |
render(GameContainer container,
Graphics g)
Render the game's screen here. |
void |
update(GameContainer container,
int delta)
Update the game logic here. |
| Methods inherited from class org.newdawn.slick.BasicGame |
|---|
closeRequested, getTitle, inputEnded, inputStarted, isAcceptingInput, mouseClicked, mouseDragged, setInput |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TestBox()
| Method Detail |
|---|
public void addGame(java.lang.Class game)
game - The game to add to the test box
public void init(GameContainer c)
throws SlickException
Game
init in interface Gameinit in class BasicGamec - The container holding the game
SlickException - Throw to indicate an internal errorBasicGame.init(org.newdawn.slick.GameContainer)
public void update(GameContainer container,
int delta)
throws SlickException
Game
update in interface Gameupdate in class BasicGamecontainer - The container holing this gamedelta - The amount of time thats passed since last update in milliseconds
SlickException - Throw to indicate an internal errorBasicGame.update(org.newdawn.slick.GameContainer, int)
public void render(GameContainer container,
Graphics g)
throws SlickException
Game
container - The container holing this gameg - The graphics context that can be used to render. However, normal rendering
routines can also be used.
SlickException - Throw to indicate a internal errorGame.render(org.newdawn.slick.GameContainer, org.newdawn.slick.Graphics)
public void controllerButtonPressed(int controller,
int button)
ControllerListener
controllerButtonPressed in interface ControllerListenercontrollerButtonPressed in class BasicGamecontroller - The index of the controller on which the control
was pressed.button - The index of the button pressed (starting at 1)BasicGame.controllerButtonPressed(int, int)
public void controllerButtonReleased(int controller,
int button)
ControllerListener
controllerButtonReleased in interface ControllerListenercontrollerButtonReleased in class BasicGamecontroller - The index of the controller on which the control
was released.button - The index of the button released (starting at 1)BasicGame.controllerButtonReleased(int, int)public void controllerDownPressed(int controller)
ControllerListener
controllerDownPressed in interface ControllerListenercontrollerDownPressed in class BasicGamecontroller - The index of the controller on which the control
was pressed.BasicGame.controllerDownPressed(int)public void controllerDownReleased(int controller)
ControllerListener
controllerDownReleased in interface ControllerListenercontrollerDownReleased in class BasicGamecontroller - The index of the controller on which the control
was released.BasicGame.controllerDownReleased(int)public void controllerLeftPressed(int controller)
ControllerListener
controllerLeftPressed in interface ControllerListenercontrollerLeftPressed in class BasicGamecontroller - The index of the controller on which the control
was pressed.BasicGame.controllerLeftPressed(int)public void controllerLeftReleased(int controller)
ControllerListener
controllerLeftReleased in interface ControllerListenercontrollerLeftReleased in class BasicGamecontroller - The index of the controller on which the control
was released.BasicGame.controllerLeftReleased(int)public void controllerRightPressed(int controller)
ControllerListener
controllerRightPressed in interface ControllerListenercontrollerRightPressed in class BasicGamecontroller - The index of the controller on which the control
was pressed.BasicGame.controllerRightPressed(int)public void controllerRightReleased(int controller)
ControllerListener
controllerRightReleased in interface ControllerListenercontrollerRightReleased in class BasicGamecontroller - The index of the controller on which the control
was released.BasicGame.controllerRightReleased(int)public void controllerUpPressed(int controller)
ControllerListener
controllerUpPressed in interface ControllerListenercontrollerUpPressed in class BasicGamecontroller - The index of the controller on which the control
was pressed.BasicGame.controllerUpPressed(int)public void controllerUpReleased(int controller)
ControllerListener
controllerUpReleased in interface ControllerListenercontrollerUpReleased in class BasicGamecontroller - The index of the controller on which the control
was released.BasicGame.controllerUpReleased(int)
public void keyPressed(int key,
char c)
KeyListener
keyPressed in interface KeyListenerkeyPressed in class BasicGamekey - The key code that was pressed (@see org.newdawn.slick.Input)c - The character of the key that was pressedBasicGame.keyPressed(int, char)
public void keyReleased(int key,
char c)
KeyListener
keyReleased in interface KeyListenerkeyReleased in class BasicGamekey - The key code that was released (@see org.newdawn.slick.Input)c - The character of the key that was releasedBasicGame.keyReleased(int, char)
public void mouseMoved(int oldx,
int oldy,
int newx,
int newy)
MouseListener
mouseMoved in interface MouseListenermouseMoved in class BasicGameoldx - The old x position of the mouseoldy - The old y position of the mousenewx - The new x position of the mousenewy - The new y position of the mouseBasicGame.mouseMoved(int, int, int, int)
public void mousePressed(int button,
int x,
int y)
MouseListener
mousePressed in interface MouseListenermousePressed in class BasicGamebutton - The index of the button (starting at 0)x - The x position of the mouse when the button was pressedy - The y position of the mouse when the button was pressedBasicGame.mousePressed(int, int, int)
public void mouseReleased(int button,
int x,
int y)
MouseListener
mouseReleased in interface MouseListenermouseReleased in class BasicGamebutton - The index of the button (starting at 0)x - The x position of the mouse when the button was releasedy - The y position of the mouse when the button was releasedBasicGame.mouseReleased(int, int, int)public void mouseWheelMoved(int change)
MouseListener
mouseWheelMoved in interface MouseListenermouseWheelMoved in class BasicGamechange - The amount of the wheel has movedBasicGame.mouseWheelMoved(int)public static void main(java.lang.String[] argv)
argv - The arguments to pass into the test
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||