JTP
Class Highscores
java.lang.Object
JTP.Highscores
public class Highscores
- extends Object
Defines function and rendering of the highscore UI component
- Author:
- V.Termanis
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NONE
public static final int NONE
- See Also:
- Constant Field Values
CLOSE
public static final int CLOSE
- See Also:
- Constant Field Values
SINGLE
public static final int SINGLE
- See Also:
- Constant Field Values
COOP
public static final int COOP
- See Also:
- Constant Field Values
SCORE_SET
public static final int SCORE_SET
- See Also:
- Constant Field Values
NAME_CHANGED
public static final int NAME_CHANGED
- See Also:
- Constant Field Values
Highscores
public Highscores(Images imgData,
ScreenFrames frames,
TilePainter tilePainter,
Color buttonBorderColor,
float buttonBorderThickness,
int buttonSpacing,
int maxChars)
updateUI
public Rectangle updateUI(Point mouseLocation)
set2PTableAsActive
public void set2PTableAsActive(boolean b)
- Choose which highscore table should be shown
- Parameters:
b
- set to true
to show the two player table
clickResult
public int clickResult(Point mouseLocation)
mousePressed
public void mousePressed(int button,
Point mouseLocation)
keyResult
public int keyResult(int keyCode,
Component c)
keyTypedResult
public int keyTypedResult(char c)
- Used to process key events for entering highscore name
drawUpdate
public void drawUpdate(Graphics2D g)
dealWithScore
public void dealWithScore(boolean coop,
int score)
- Decide whether the given score needs to be enterd in the highscore table
- Parameters:
coop
- indicates whether the score is from cooperative mode or notscore
- number of points made
drawAll
public void drawAll(Graphics2D g)