Skin options: HitCircleOverlayAboveNumber, LayeredHitSounds.
Also includes a cursor fix: beatmap-skinned cursors are now always treated like new-style cursors (as in osu!), and no longer render cursormiddle unless also skinned. Signed-off-by: Jeffrey Han <itdelatrisu@gmail.com>
This commit is contained in:
parent
b804a4d154
commit
c1b38b2306
|
@ -227,10 +227,14 @@ public class UI {
|
|||
*/
|
||||
public static void drawCursor(int mouseX, int mouseY, boolean mousePressed) {
|
||||
// determine correct cursor image
|
||||
// TODO: most beatmaps don't skin CURSOR_MIDDLE, so how to determine style?
|
||||
Image cursor = null, cursorMiddle = null, cursorTrail = null;
|
||||
boolean skinned = GameImage.CURSOR.hasSkinImage();
|
||||
boolean newStyle = (skinned) ? true : Options.isNewCursorEnabled();
|
||||
boolean newStyle, hasMiddle;
|
||||
if (skinned) {
|
||||
newStyle = true; // osu! currently treats all beatmap cursors as new-style cursors
|
||||
hasMiddle = GameImage.CURSOR_MIDDLE.hasSkinImage();
|
||||
} else
|
||||
newStyle = hasMiddle = Options.isNewCursorEnabled();
|
||||
if (skinned || newStyle) {
|
||||
cursor = GameImage.CURSOR.getImage();
|
||||
cursorTrail = GameImage.CURSOR_TRAIL.getImage();
|
||||
|
@ -238,7 +242,7 @@ public class UI {
|
|||
cursor = GameImage.CURSOR_OLD.getImage();
|
||||
cursorTrail = GameImage.CURSOR_TRAIL_OLD.getImage();
|
||||
}
|
||||
if (newStyle)
|
||||
if (hasMiddle)
|
||||
cursorMiddle = GameImage.CURSOR_MIDDLE.getImage();
|
||||
|
||||
int removeCount = 0;
|
||||
|
@ -295,7 +299,7 @@ public class UI {
|
|||
if (mousePressed && skin.isCursorExpanded()) {
|
||||
final float scale = 1.25f;
|
||||
cursor = cursor.getScaledCopy(scale);
|
||||
if (newStyle)
|
||||
if (hasMiddle)
|
||||
cursorMiddle = cursorMiddle.getScaledCopy(scale);
|
||||
}
|
||||
|
||||
|
@ -303,7 +307,7 @@ public class UI {
|
|||
if (newStyle && skin.isCursorRotated())
|
||||
cursor.setRotation(cursorAngle);
|
||||
cursor.drawCentered(mouseX, mouseY);
|
||||
if (newStyle)
|
||||
if (hasMiddle)
|
||||
cursorMiddle.drawCentered(mouseX, mouseY);
|
||||
}
|
||||
|
||||
|
|
|
@ -279,9 +279,12 @@ public class SoundController {
|
|||
return;
|
||||
|
||||
// play all sounds
|
||||
if (hitSound == HitObject.SOUND_NORMAL || Options.getSkin().isLayeredHitSounds()) {
|
||||
HitSound.setSampleSet(sampleSet);
|
||||
playClip(HitSound.NORMAL.getClip(), volume, null);
|
||||
}
|
||||
|
||||
if (hitSound != HitObject.SOUND_NORMAL) {
|
||||
HitSound.setSampleSet(additionSampleSet);
|
||||
if ((hitSound & HitObject.SOUND_WHISTLE) > 0)
|
||||
playClip(HitSound.WHISTLE.getClip(), volume, null);
|
||||
|
@ -290,6 +293,7 @@ public class SoundController {
|
|||
if ((hitSound & HitObject.SOUND_CLAP) > 0)
|
||||
playClip(HitSound.CLAP.getClip(), volume, null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Plays a hit sound.
|
||||
|
|
|
@ -22,6 +22,7 @@ import itdelatrisu.opsu.GameData;
|
|||
import itdelatrisu.opsu.GameData.HitObjectType;
|
||||
import itdelatrisu.opsu.GameImage;
|
||||
import itdelatrisu.opsu.GameMod;
|
||||
import itdelatrisu.opsu.Options;
|
||||
import itdelatrisu.opsu.Utils;
|
||||
import itdelatrisu.opsu.beatmap.HitObject;
|
||||
import itdelatrisu.opsu.states.Game;
|
||||
|
@ -99,9 +100,13 @@ public class Circle implements GameObject {
|
|||
if (timeDiff >= 0)
|
||||
GameImage.APPROACHCIRCLE.getImage().getScaledCopy(approachScale).drawCentered(x, y, color);
|
||||
GameImage.HITCIRCLE.getImage().drawCentered(x, y, color);
|
||||
boolean overlayAboveNumber = Options.getSkin().isHitCircleOverlayAboveNumber();
|
||||
if (!overlayAboveNumber)
|
||||
GameImage.HITCIRCLE_OVERLAY.getImage().drawCentered(x, y, Utils.COLOR_WHITE_FADE);
|
||||
data.drawSymbolNumber(hitObject.getComboNumber(), x, y,
|
||||
GameImage.HITCIRCLE.getImage().getWidth() * 0.40f / data.getDefaultSymbolImage(0).getHeight(), alpha);
|
||||
if (overlayAboveNumber)
|
||||
GameImage.HITCIRCLE_OVERLAY.getImage().drawCentered(x, y, Utils.COLOR_WHITE_FADE);
|
||||
|
||||
Utils.COLOR_WHITE_FADE.a = oldAlpha;
|
||||
}
|
||||
|
|
|
@ -22,6 +22,7 @@ import itdelatrisu.opsu.GameData;
|
|||
import itdelatrisu.opsu.GameData.HitObjectType;
|
||||
import itdelatrisu.opsu.GameImage;
|
||||
import itdelatrisu.opsu.GameMod;
|
||||
import itdelatrisu.opsu.Options;
|
||||
import itdelatrisu.opsu.Utils;
|
||||
import itdelatrisu.opsu.beatmap.Beatmap;
|
||||
import itdelatrisu.opsu.beatmap.HitObject;
|
||||
|
@ -195,12 +196,16 @@ public class Slider implements GameObject {
|
|||
|
||||
// start circle
|
||||
hitCircle.drawCentered(x, y, color);
|
||||
boolean overlayAboveNumber = Options.getSkin().isHitCircleOverlayAboveNumber();
|
||||
if (!overlayAboveNumber)
|
||||
hitCircleOverlay.drawCentered(x, y, Utils.COLOR_WHITE_FADE);
|
||||
if (sliderClickedInitial)
|
||||
; // don't draw current combo number if already clicked
|
||||
else
|
||||
data.drawSymbolNumber(hitObject.getComboNumber(), x, y,
|
||||
hitCircle.getWidth() * 0.40f / data.getDefaultSymbolImage(0).getHeight(), alpha);
|
||||
if (overlayAboveNumber)
|
||||
hitCircleOverlay.drawCentered(x, y, Utils.COLOR_WHITE_FADE);
|
||||
|
||||
// repeats
|
||||
for (int tcurRepeat = currentRepeats; tcurRepeat <= currentRepeats + 1; tcurRepeat++) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user