Scale and rotate the cursor.

- Cursor is now scaled based on window size.
- Cursor now rotates slowly (new style only).
- Cursor now expands upon mouse press.

Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
Jeffrey Han
2014-07-06 23:13:33 -04:00
parent 6d3c333a3f
commit a9cc7a3deb
8 changed files with 51 additions and 6 deletions

View File

@@ -51,6 +51,7 @@ public class MainMenuExit extends BasicGameState {
*/
private float centerOffset;
// game-related variables
private GameContainer container;
private StateBasedGame game;
private int state;
@@ -113,6 +114,8 @@ public class MainMenuExit extends BasicGameState {
@Override
public void update(GameContainer container, StateBasedGame game, int delta)
throws SlickException {
Utils.updateCursor(delta);
// move buttons to center
float yesX = yesButton.getX(), noX = noButton.getX();
float center = container.getWidth() / 2f;