opsu! will now check for updates upon launching, and will prompt the user to download and run a newer version, if available.
- The remote version file is just the filled "version" file, currently located in the gh-pages branch.
- The new version is downloaded to the working directory, and launched with ProcessBuilder.
Related changes:
- Added "file" property (containing the download URL) to "version" file.
- Added maven-artifact dependency for version comparisons.
- Added methods in Downloads class to retrieve the constructor parameters.
- Moved method for showing exit confirmation dialogs into UI.
- Moved method for reading from URLs into Utils.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Main menu:
-- 'd': opens downloads menu
-- 'r': plays random track
- Song menu:
-- SHIFT+DEL: opens beatmap deletion menu
Other changes:
- In the main menu, tracks now play from the beginning instead of the preview time.
- Fixed "next page" icon sometimes showing in the downloads menu when a next page didn't exist.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- F7: cycles through FPS settings.
- F10: toggles mouse enable/disable state during gameplay.
Also added bar notifications for saving/loading checkpoints.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Added draw(), update(), and enter() methods in UI to do all the necessary calls (instead of letting the states handle them).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This is currently being used for the logo/play/exit buttons in the main menu.
Also fixed bug where mod multipliers weren't being read.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- The MenuButton class now fully supports hover effects (scale, fade, rotate) for Animations.
- Used a fixed location for the selection buttons in the song menu (previously based on the "back" button width, which varies widely in different skins).
- Added hover effects for "retry" and "exit" buttons in the ranking screen.
- Changed animation speed of back/skip buttons.
- Fixed a bug where main menu showed the incorrect number of songs loaded during searches.
- Removed unneeded draw() methods in Utils for color filters (since 69f5aa5).
- Moved Utils.drawCentered(Image, ...) into the Image class.
- Added overwritten Image class to Maven excludes.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- The music position bar in the main menu is now clickable (changes track position).
- Fixed scroll bar height function, and merged all scroll bar drawing into a single Utils.drawScrollbar() method.
- Fixed the buggy song menu scroll bar.
- Scaled the sizes/positions of the main menu music icons (previously fixed/hardcoded).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Added score management menu for deleting individual scores.
- Store generated title string lists in the beatmap menus to prevent performance issues.
Allow using the right mouse button (as well as left mouse button) in all states.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
New menus: beatmap options (erase scores/delete), delete beatmaps (single/all), reload songs.
- Pressing F3 or right-clicking in the song menu state will open the beatmap options menu.
- Pressing F5 in the song menu now opens a confirmation menu before reloading beatmaps.
- Deleted MainMenuExit state, which is replaced by MenuState.EXIT in ButtonMenu.
- Decreased Utils.FONT_XLARGE size (to fit in buttons).
Note: as of 800014e, song directory deletion is broken.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Rotate slider ball image along the curve.
- Show download speed and time remaining when hovering over the download info button.
- Maintain aspect ratio of beatmap background image during gameplay.
- Clear beatmap background image cache after reaching OsuFile.MAX_CACHE_SIZE.
- Multiply hit circle size by OsuHitObject.getXMultiplier().
- Scale MENU_BUTTON_BG based on SongMenu.MAX_SONG_BUTTONS.
- Fixed download search TextField retaining focus even after leaving the downloads menu.
- Include Unicode title/artist strings in searches.
- Parse x,y beatmap coordinates as floats (instead of integers), and only read Kiai time if present.
- Added 1600x1200 resolution.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Updates:
- Added some buttons to downloads menu: clear inactive downloads, import beatmaps, reset search, and show/hide unranked maps.
- Small changes to OsuParser, OszUnpacker, and OsuGroupList (mostly adding return values) to allow parsing only newly unpacked beatmaps.
- Added alpha fade hover effect to MenuButton, as an alternative to expanding (used for 3-part menu buttons).
- Added text rendering fields to MenuButton (also for the 3-part menu buttons).
- Added sound effects to downloads menu.
Fixes:
- Check downloads for illegal filename characters, and remove them if necessary.
- The number of results and downloads shown now supports all resolutions.
- Confirmation dialog no longer appears when restarting the application (since downloads are static).
- Do not set a focus node immediately if the theme song will be played.
- Always play the theme song if no songs are loaded (even if disabled in settings).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
The downloads menu can be accessed through the button on the right side of the main menu. The downloader supports searching and concurrent downloads (NOTE: this is limited by the download server!). Double-click any search result to begin downloading it to the SongPacks directory; cancel the download by hitting the red 'x' in the upper-right corner. A confirmation will appear if trying to quit opsu! while downloads are running.
New classes:
- Download: represents an individual download from a remote address to a local path, and provides status and progress information; downloads files using Java NIO.
- DownloadNode: holds a Download object as well as additional beatmap fields, and handles drawing.
- DownloadList: manages the current list of downloads.
- DownloadsMenu: game state controller.
- DownloadServer: interface for a beatmap download server.
- BloodcatServer: implements DownloadServer using Bloodcat.
- ReadableByteChannelWrapper: wrapper for ReadableByteChannel that tracks progress.
Added images:
- "downloads" image by @kouyang.
- "search-background" image from "Minimalist Miku" skin (listed in credits).
- "delete" icon by Visual Pharm (https://www.iconfinder.com/icons/27842/) under CC BY-ND 3.0.
Other changes:
- Added up/down/left/right Expand directions to MenuButton class.
- Removed width/height parameters from OsuParser (leftovers).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Fixed a crash when closing the application in the ranking screen when viewing a score.
- Fixed a minor bug where OsuGroupList fields were not being erased upon restart.
- Dim the track volume by 50% when viewing a score.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Collapsed Javadoc comments for all fields.
- OsuFile now has proper Javadoc comments.
- Fixed various mistakes with comments.
Some changes with enums:
- Changed Class.values() calls to values().
- Changed size() calls to a SIZE field.
- Changed valuesReversed() calls to a VALUES_REVERSED field.
- Removed 'static' from enum declarations.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Renamed Options state into OptionsMenu, and created Options class for solely handling user options. Moved everything unrelated to the actual options menu into the static Options class.
- OptionsMenu no longer has static fields.
- Refactored option tabs into an enum, which makes the code much cleaner.
Also fixed a bug where global volume wasn't being used on container initialization.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Each song group references the same audio file probably 100% of the time, so don't create duplicate objects.
Also, follow-up to 3b13cc7: the up/down arrow keys now change global volume in the main menu and game states (in addition to the scroll wheel).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- All sounds are now multiplied by a master volume setting.
- Changed all default volume levels.
- Scrolling in the main menu and game states changes the master volume and displays a volume bar on the right side of the screen.
- "volume-bg.png" image by @kouyang.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Allows parsing only a subset of OsuFiles, in case parsing takes too long.
Other changes:
- Press 'ESC' three times to exit from the Splash state.
- Override Container.exit().
- Reset MusicController in closeRequested() to prevent an OpenAL error.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- FPS display is now much more subtle.
- A couple of main menu tweaks.
Other changes:
- Restore old alpha levels of Utils.COLOR_* constants when modifying them.
- Utils.loadFont() can load any font effect, not just a ColorEffect.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Minor typo in ErrorHandler.
- Prevent more than one music control button in the main menu from being hovered over at once.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Fixes an issue where the first few milliseconds of the theme song would always play at full volume, even if container is not focused.
- Allows easier application to any song.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Padded game score display, and always display 2 digits in front of the decimal (e.g. 00.00% instead of 0.00%).
- Keep map progress circle at a fixed location instead of basing it off the score length.
- Moved some track resets (pause + restart at preview) to trigger upon loading the song menu. Fixes weird behaviors when leaving the game state.
- Cleaned up trailing whitespace and added missing overrides.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
GitHub "mark" image is from: https://github.com/logos
Also changed default screen resolution to 1024x768 since it's more likely to be supported.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Specifically, the main menu background and pause/fail backgrounds now accept JPGs as well as PNGs.
Other changes:
- Don't draw the default pause/fail background if the buttons are skinned and the background is unskinned.
- Preload logo and main menu background.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- MusicController.getPosition() now returns time even when track is paused. (e.g. song progress bar in main menu won't reset when paused)
- Force unpause track when entering the song menu.
- Rewrote Game.RESTART_* constants as enums.
- Cleaned up logo play/exit button scaling.
- MainMenu.previous is now non-static.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Added enum classes SoundEffect and HitSound.
- Added a SoundComponent interface for sound effects and hit sounds, and extended playSound() and playHitSound() methods to play any SoundComponent.
- Moved features related to sample sets to the HitSound class, and rewrote sample sets as an internal enum class.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Pressing 'Esc' will now always enter the MainMenuExit state.
- Returning from MainMenuExit state does not reset button states: these must be manually reset by calling the reset() method.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
The class was originally named with the intent of adding many other GUI classes, but this never happened.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
When pressing the "next" button, songs will only be pushed when a new track plays. Fixes a potential null pointer crash.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Added hovering capabilities to GUIMenuButton. The max scale and direction to expand the image can be modified per object.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Plays a theme song when opsu! starts (can be disabled in options). The default song is "welcome to osu!" by nekodex, uploaded by CyberKitsune.
To change the song, place a new "theme.osu" in the skins folder and edit the file name, metadata, and song length (at minimum).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Fixed null pointer in "Main Menu" state if no tracks loaded. (since b0c0b44)
- Fixed "keyOsuLeft" and "keyOsuRight" writing KEY_NONE to configuration file on first run (instead of default values).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Parse and store the end time for every beatmap (i.e. end time of last hit object).
- Added a 'length' sorting tab.
- Added 'length' search condition.
- Removed 'getTrackLength()' and 'getTrackLengthString()' methods, as they are no longer needed.
- Added a loader spritesheet animation to render during MP3 conversions (in place of track length rendering upon completion).
Other changes:
- Added a yellow progress circle during lead-in time.
- Fixed sorting tab positioning.
- Slightly increased button animation speed in "Main Menu Exit" state.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Modified "LoadVerbose" option so that 'false' will display a progress bar (instead of nothing at all), and made this the default.
- Slowed down a few shifting animations.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Threaded OGG loading (in addition to MP3) to eliminate delays in song select menu. (reported by xasuma)
- Changed default OSZ unpacking location to a "SongPacks" directory to prevent unintended unpacking. (reported by Lanturn)
- Fixed a null pointer for a corner case in 'getRandomNode()'. (reported by @iceblade112)
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Makes clicking the logo more similar to the real osu! game, where the Play options show when you click the logo the second time (after it was clicked first).
- Overhauled OsuTimingPoint class: parsing is done in the constructor, and fields are no longer public.
- Improved consistency of static/non-static fields in a couple of classes.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- 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>
- Game now boots to splash screen, which displays parser progress.
- Added option "LoadVerbose" to disable rendering the progress text.
- Main Menu backgrounds now fade in regardless of DynamicBackground setting (as a transition from the splash screen).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Main Menu: "P" (play), "Q" (quit)
- Game: Ctrl + "R" (restart)
Other changes:
- Song Menu search textfield no longer retains focus in different states.
- Fixed Game not loading OsuFile for maps in a song group. (blame: 5612336)
- Implemented rotations for reverse arrows, and added a new one by Alic1a.
- "Auto" mod: pausing no longer requires click to unpause, and mod images are permanently drawn.
- Program now loads from Main Menu instead of Options (unnecessary complications for the sake of a transition).
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>