mirror of
https://github.com/ppy/osu.git
synced 2025-02-15 06:52:56 +08:00
Merge branch 'master' into fix-catch-auto
This commit is contained in:
commit
13747966a0
@ -8,5 +8,6 @@ namespace osu.Game.Rulesets.Osu.Edit
|
||||
public class OsuEditPlayfield : OsuPlayfield
|
||||
{
|
||||
protected override bool ProxyApproachCircles => false;
|
||||
protected override bool DisplayJudgements => false;
|
||||
}
|
||||
}
|
||||
|
@ -24,6 +24,7 @@ namespace osu.Game.Rulesets.Osu.UI
|
||||
// Todo: This should not be a thing, but is currently required for the editor
|
||||
// https://github.com/ppy/osu-framework/issues/1283
|
||||
protected virtual bool ProxyApproachCircles => true;
|
||||
protected virtual bool DisplayJudgements => true;
|
||||
|
||||
public static readonly Vector2 BASE_SIZE = new Vector2(512, 384);
|
||||
|
||||
@ -73,7 +74,7 @@ namespace osu.Game.Rulesets.Osu.UI
|
||||
|
||||
private void onJudgement(DrawableHitObject judgedObject, Judgement judgement)
|
||||
{
|
||||
if (!judgedObject.DisplayJudgement)
|
||||
if (!judgedObject.DisplayJudgement || !DisplayJudgements)
|
||||
return;
|
||||
|
||||
DrawableOsuJudgement explosion = new DrawableOsuJudgement(judgement, judgedObject)
|
||||
|
@ -23,6 +23,8 @@ namespace osu.Game.Rulesets.Judgements
|
||||
{
|
||||
private const float judgement_size = 80;
|
||||
|
||||
private OsuColour colours;
|
||||
|
||||
protected readonly Judgement Judgement;
|
||||
|
||||
public readonly DrawableHitObject JudgedObject;
|
||||
@ -45,11 +47,13 @@ namespace osu.Game.Rulesets.Judgements
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
this.colours = colours;
|
||||
|
||||
Child = new SkinnableDrawable($"Play/{Judgement.Result}", _ => JudgementText = new OsuSpriteText
|
||||
{
|
||||
Text = Judgement.Result.GetDescription().ToUpper(),
|
||||
Font = @"Venera",
|
||||
Colour = Judgement.Result == HitResult.Miss ? colours.Red : Color4.White,
|
||||
Colour = judgementColour(Judgement.Result),
|
||||
Scale = new Vector2(0.85f, 1),
|
||||
TextSize = 12
|
||||
}, restrictSize: false);
|
||||
@ -84,5 +88,24 @@ namespace osu.Game.Rulesets.Judgements
|
||||
|
||||
Expire(true);
|
||||
}
|
||||
|
||||
private Color4 judgementColour(HitResult judgement)
|
||||
{
|
||||
switch (judgement)
|
||||
{
|
||||
case HitResult.Perfect:
|
||||
case HitResult.Great:
|
||||
return colours.Blue;
|
||||
case HitResult.Ok:
|
||||
case HitResult.Good:
|
||||
return colours.Green;
|
||||
case HitResult.Meh:
|
||||
return colours.Yellow;
|
||||
case HitResult.Miss:
|
||||
return colours.Red;
|
||||
}
|
||||
|
||||
return Color4.White;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user