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:
@@ -407,6 +407,8 @@ public class Game extends BasicGameState {
|
||||
@Override
|
||||
public void update(GameContainer container, StateBasedGame game, int delta)
|
||||
throws SlickException {
|
||||
Utils.updateCursor(delta);
|
||||
|
||||
if (isLeadIn()) { // stop updating during song lead-in
|
||||
leadInTime -= delta;
|
||||
if (!isLeadIn())
|
||||
|
||||
@@ -97,7 +97,7 @@ public class GamePauseMenu extends BasicGameState {
|
||||
@Override
|
||||
public void update(GameContainer container, StateBasedGame game, int delta)
|
||||
throws SlickException {
|
||||
// empty
|
||||
Utils.updateCursor(delta);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -136,7 +136,7 @@ public class GameRanking extends BasicGameState {
|
||||
@Override
|
||||
public void update(GameContainer container, StateBasedGame game, int delta)
|
||||
throws SlickException {
|
||||
// empty
|
||||
Utils.updateCursor(delta);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -223,6 +223,8 @@ public class MainMenu extends BasicGameState {
|
||||
@Override
|
||||
public void update(GameContainer container, StateBasedGame game, int delta)
|
||||
throws SlickException {
|
||||
Utils.updateCursor(delta);
|
||||
|
||||
// fade in background
|
||||
if (bgAlpha < 0.9f) {
|
||||
bgAlpha += delta / 1000f;
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -496,7 +496,7 @@ public class Options extends BasicGameState {
|
||||
@Override
|
||||
public void update(GameContainer container, StateBasedGame game, int delta)
|
||||
throws SlickException {
|
||||
// empty
|
||||
Utils.updateCursor(delta);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -275,6 +275,8 @@ public class SongMenu extends BasicGameState {
|
||||
@Override
|
||||
public void update(GameContainer container, StateBasedGame game, int delta)
|
||||
throws SlickException {
|
||||
Utils.updateCursor(delta);
|
||||
|
||||
// search
|
||||
searchTimer += delta;
|
||||
if (searchTimer >= SEARCH_DELAY) {
|
||||
|
||||
Reference in New Issue
Block a user