Clicks and animation updates are now handled internally within the DropdownMenu class, which should simplify usage a bit. Override menuClicked() and itemSelected() instead for event handling.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Using 'fa-chevron-down' and 'fa-chevron-right' icons from Font Awesome v4.4.0 (https://github.com/FortAwesome/Font-Awesome).
The dropdown menu is currently used only in the downloads menu to select servers.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This should be much more efficient when repeatedly rendering the same texture, as in these two cases.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This eliminates the game-wide lag (100-200ms on my computer) when switching song nodes. Attempted to mask the loading time with a fade-in effect.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
https://github.com/Tom94/AiModtpDifficultyCalculator
This might not be completely accurate as I wasn't able to get the original program to run, but it's probably close (note that hit object stacking isn't applied, though).
Since the computation is fairly expensive, they're currently done when selecting a beatmap set in the song menu (for all beatmaps in the set at once). The rating is displayed next to the beatmap difficulty settings (HP,CS,AR,OD) in the header. Also, since all the hit objects need to be loaded to perform the computation, the objects are later discarded (but not immediately) by a LRU cache to limit memory usage.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
If the check fails, use a LinearBezier instead. (e.g. in map 45471).
Moved slider time and curve calculations into HitObject so that they can be reused.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Unscaled coordinates will be used in a future commit (hopefully).
Added a normalize() method to Vec2f.
Throw RuntimeExceptions for any Curve initialization errors; the game would crash anyway, and this way the objects can be substituted for DummyObjects for a graceful failure.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Fixed hit object 'addition' field parsing. (Still not sure what the fields do, but the types should be correct now...)
- Fixed a careless error causing a potential null pointer exception. (blame: 0b33fed)
- Show an error if parseHitObjects() parses a different amount of objects than expected.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
Specifically, during OSZ unpacking and for file deletion through the song menu. Triggering the beatmap reload event in these scenarios would be redundant.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
If the number of bytes received is less than the reported content length (e.g. a network timeout), mark the download with the "error" status instead of "complete". Content-Length should be reliable if reported at all, so this should be a valid approach.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
The previous formulas were extremely close, so you shouldn't notice any gameplay differences at all.
Circle diameter:
- Previously: 104 - (CS * 8)
- Now: 108.848 - (CS * 8.9646)
Timing offsets: added 1.5ms to 300, 100, and 50 hit result offsets.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
- Removed "isImplemented" field from GameMod as all of the base mods have been implemented.
- Removed Utils.getBoundedValue() methods in preference for Utils.clamp().
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This introduces more accurate timing formulas associated with the "Hidden" mod (previously, in #115, these values were hardcoded). The values seem somewhat close to the values in osu!, but were not extensively tested.
Also set an upper bound on the fade in time for hit objects proportional to the approach time, or else the timing values in the "Hidden" mod would be too inconsistent.
Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>