diff --git a/src/itdelatrisu/opsu/states/ButtonMenu.java b/src/itdelatrisu/opsu/states/ButtonMenu.java index 7f31b3cb..08abdaea 100644 --- a/src/itdelatrisu/opsu/states/ButtonMenu.java +++ b/src/itdelatrisu/opsu/states/ButtonMenu.java @@ -51,10 +51,13 @@ import org.newdawn.slick.state.transition.FadeInTransition; /** * Generic button menu state. + *

+ * Displays a header and a set of defined options to the player. */ public class ButtonMenu extends BasicGameState { /** Menu states. */ public enum MenuState { + /** The exit confirmation screen. */ EXIT (new Button[] { Button.YES, Button.NO }) { @Override public String[] getTitle(GameContainer container, StateBasedGame game) { @@ -66,6 +69,7 @@ public class ButtonMenu extends BasicGameState { Button.NO.click(container, game); } }, + /** The initial beatmap management screen. */ BEATMAP (new Button[] { Button.CLEAR_SCORES, Button.DELETE, Button.CANCEL }) { @Override public String[] getTitle(GameContainer container, StateBasedGame game) { @@ -86,6 +90,7 @@ public class ButtonMenu extends BasicGameState { super.scroll(container, game, newValue); } }, + /** The beatmap deletion screen for a beatmap set with multiple beatmaps. */ BEATMAP_DELETE_SELECT (new Button[] { Button.DELETE_GROUP, Button.DELETE_SONG, Button.CANCEL_DELETE }) { @Override public String[] getTitle(GameContainer container, StateBasedGame game) { @@ -104,6 +109,7 @@ public class ButtonMenu extends BasicGameState { MenuState.BEATMAP.scroll(container, game, newValue); } }, + /** The beatmap deletion screen for a single beatmap. */ BEATMAP_DELETE_CONFIRM (new Button[] { Button.DELETE_CONFIRM, Button.CANCEL_DELETE }) { @Override public String[] getTitle(GameContainer container, StateBasedGame game) { @@ -120,6 +126,7 @@ public class ButtonMenu extends BasicGameState { MenuState.BEATMAP.scroll(container, game, newValue); } }, + /** The beatmap reloading confirmation screen. */ RELOAD (new Button[] { Button.RELOAD_CONFIRM, Button.RELOAD_CANCEL }) { @Override public String[] getTitle(GameContainer container, StateBasedGame game) { @@ -140,6 +147,7 @@ public class ButtonMenu extends BasicGameState { MenuState.BEATMAP.scroll(container, game, newValue); } }, + /** The score management screen. */ SCORE (new Button[] { Button.DELETE_SCORE, Button.CLOSE }) { @Override public String[] getTitle(GameContainer container, StateBasedGame game) { @@ -156,6 +164,7 @@ public class ButtonMenu extends BasicGameState { MenuState.BEATMAP.scroll(container, game, newValue); } }, + /** The game mod selection screen. */ MODS (new Button[] { Button.RESET_MODS, Button.CLOSE }) { @Override public String[] getTitle(GameContainer container, StateBasedGame game) { diff --git a/src/itdelatrisu/opsu/states/DownloadsMenu.java b/src/itdelatrisu/opsu/states/DownloadsMenu.java index 495d0dff..bf673441 100644 --- a/src/itdelatrisu/opsu/states/DownloadsMenu.java +++ b/src/itdelatrisu/opsu/states/DownloadsMenu.java @@ -68,6 +68,9 @@ import org.newdawn.slick.util.Log; /** * Downloads menu. + *

+ * Players are able to download beatmaps off of various servers and import them + * from this state. */ public class DownloadsMenu extends BasicGameState { /** Delay time, in milliseconds, between each search. */ diff --git a/src/itdelatrisu/opsu/states/GamePauseMenu.java b/src/itdelatrisu/opsu/states/GamePauseMenu.java index 35f943f8..6a10b965 100644 --- a/src/itdelatrisu/opsu/states/GamePauseMenu.java +++ b/src/itdelatrisu/opsu/states/GamePauseMenu.java @@ -42,11 +42,9 @@ import org.newdawn.slick.state.transition.FadeOutTransition; /** * "Game Pause/Fail" state. - *

+ *

+ * Players are able to continue the game (if applicable), retry the beatmap, + * or return to the song menu from this state. */ public class GamePauseMenu extends BasicGameState { /** Music fade-out time, in milliseconds. */ diff --git a/src/itdelatrisu/opsu/states/GameRanking.java b/src/itdelatrisu/opsu/states/GameRanking.java index 925f7f48..1a0ac8ac 100644 --- a/src/itdelatrisu/opsu/states/GameRanking.java +++ b/src/itdelatrisu/opsu/states/GameRanking.java @@ -50,10 +50,9 @@ import org.newdawn.slick.util.Log; /** * "Game Ranking" (score card) state. - *

*/ public class GameRanking extends BasicGameState { diff --git a/src/itdelatrisu/opsu/states/MainMenu.java b/src/itdelatrisu/opsu/states/MainMenu.java index f0901df8..ba110cee 100644 --- a/src/itdelatrisu/opsu/states/MainMenu.java +++ b/src/itdelatrisu/opsu/states/MainMenu.java @@ -58,10 +58,8 @@ import org.newdawn.slick.state.transition.FadeOutTransition; /** * "Main Menu" state. - * + *

+ * Players are able to enter the song menu or downloads menu from this state. */ public class MainMenu extends BasicGameState { /** Idle time, in milliseconds, before returning the logo to its original position. */ diff --git a/src/itdelatrisu/opsu/states/OptionsMenu.java b/src/itdelatrisu/opsu/states/OptionsMenu.java index c755bf66..4ceeaf33 100644 --- a/src/itdelatrisu/opsu/states/OptionsMenu.java +++ b/src/itdelatrisu/opsu/states/OptionsMenu.java @@ -47,6 +47,8 @@ import org.newdawn.slick.state.transition.FadeInTransition; /** * "Game Options" state. + *

+ * Players are able to view and change various game settings in this state. */ public class OptionsMenu extends BasicGameState { /** Option tabs. */ diff --git a/src/itdelatrisu/opsu/states/SongMenu.java b/src/itdelatrisu/opsu/states/SongMenu.java index 3a9fa21d..7523f793 100644 --- a/src/itdelatrisu/opsu/states/SongMenu.java +++ b/src/itdelatrisu/opsu/states/SongMenu.java @@ -78,10 +78,9 @@ import org.newdawn.slick.state.transition.FadeOutTransition; /** * "Song Selection" state. - *

+ *

+ * Players are able to select a beatmap to play, view previous scores, choose game mods, + * manage beatmaps, or change game options from this state. */ public class SongMenu extends BasicGameState { /** The max number of song buttons to be shown on each screen. */ @@ -263,7 +262,7 @@ public class SongMenu extends BasicGameState { private StarStream starStream; /** Whether the menu is currently scrolling to the focus node (blocks other actions). */ - private boolean isScrollingToFocus = false; + private boolean isScrollingToFocusNode = false; // game-related variables private GameContainer container; @@ -690,12 +689,12 @@ public class SongMenu extends BasicGameState { // scrolling songScrolling.update(delta); - if (isScrollingToFocus) { + if (isScrollingToFocusNode) { float distanceDiff = Math.abs(songScrolling.getPosition() - songScrolling.getTargetPosition()); if (distanceDiff <= buttonOffset / 8f) { // close enough, stop blocking input songScrolling.scrollToPosition(songScrolling.getTargetPosition()); songScrolling.setSpeedMultiplier(1f); - isScrollingToFocus = false; + isScrollingToFocusNode = false; } } updateDrawnSongPosition(); @@ -746,7 +745,7 @@ public class SongMenu extends BasicGameState { @Override public void mousePressed(int button, int x, int y) { - if (isScrollingToFocus) + if (isScrollingToFocusNode) return; songScrolling.pressed(); @@ -755,7 +754,7 @@ public class SongMenu extends BasicGameState { @Override public void mouseReleased(int button, int x, int y) { - if (isScrollingToFocus) + if (isScrollingToFocusNode) return; songScrolling.released(); @@ -888,7 +887,7 @@ public class SongMenu extends BasicGameState { @Override public void keyPressed(int key, char c) { // block input - if ((reloadThread != null && !(key == Input.KEY_ESCAPE || key == Input.KEY_F12)) || beatmapMenuTimer > -1 || isScrollingToFocus) + if ((reloadThread != null && !(key == Input.KEY_ESCAPE || key == Input.KEY_F12)) || beatmapMenuTimer > -1 || isScrollingToFocusNode) return; switch (key) { @@ -1101,7 +1100,7 @@ public class SongMenu extends BasicGameState { selectOptionsButton.resetHover(); hoverOffset.setTime(0); hoverIndex = null; - isScrollingToFocus = false; + isScrollingToFocusNode = false; songScrolling.released(); songScrolling.setSpeedMultiplier(1f); startScorePos.setPosition(0); @@ -1378,7 +1377,7 @@ public class SongMenu extends BasicGameState { if (startNode == null || game.getCurrentStateID() != Opsu.STATE_SONGMENU) songScrolling.setPosition((node.index - 1) * buttonOffset); else { - isScrollingToFocus = true; + isScrollingToFocusNode = true; songScrolling.setSpeedMultiplier(2f); songScrolling.released(); } @@ -1551,7 +1550,7 @@ public class SongMenu extends BasicGameState { * @return true if blocking input */ private boolean isInputBlocked() { - return (reloadThread != null || beatmapMenuTimer > -1 || isScrollingToFocus); + return (reloadThread != null || beatmapMenuTimer > -1 || isScrollingToFocusNode); } /**