Fixed crashes when importing beatmaps (due to more async issues).
Don't call MusicController.loopTrackIfEnded() if a beatmap reloading thread is running. Other changes: - Fixed issue where long download result text would be drawn outside the result area by adding a clip. - Changed default music offset from -150ms to -75ms. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
@@ -149,6 +149,14 @@ public class DownloadNode {
|
||||
(cy > buttonBaseY && cy < buttonBaseY + buttonOffset * maxResultsShown));
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets a clip to the download result button area.
|
||||
* @param g the graphics context
|
||||
*/
|
||||
public static void clipToResultArea(Graphics g) {
|
||||
g.setClip((int) buttonBaseX, (int) buttonBaseY, (int) buttonWidth, (int) (buttonOffset * maxResultsShown));
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if the coordinates are within the bounds of the
|
||||
* download information button at the given index.
|
||||
@@ -332,6 +340,7 @@ public class DownloadNode {
|
||||
textX += img.getWidth() + buttonWidth * 0.001f;
|
||||
|
||||
// text
|
||||
// TODO: if the title/artist line is too long, shorten it (e.g. add "...")
|
||||
if (Options.useUnicodeMetadata()) // load glyphs
|
||||
Utils.loadGlyphs(Utils.FONT_BOLD, getTitle(), getArtist());
|
||||
Utils.FONT_BOLD.drawString(
|
||||
|
||||
Reference in New Issue
Block a user