Merge branch 'master' into editor-wheel-movement

This commit is contained in:
smoogipoo
2018-03-14 11:39:02 +09:00
22 changed files with 899 additions and 824 deletions

View File

@ -11,6 +11,8 @@ using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Rulesets.Objects.Drawables;
using osu.Game.Rulesets.Scoring;
using osu.Game.Skinning;
using OpenTK.Graphics;
namespace osu.Game.Rulesets.Judgements
{
@ -19,11 +21,13 @@ namespace osu.Game.Rulesets.Judgements
/// </summary>
public class DrawableJudgement : Container
{
private const float judgement_size = 80;
protected readonly Judgement Judgement;
public readonly DrawableHitObject JudgedObject;
protected readonly SpriteText JudgementText;
protected SpriteText JudgementText;
/// <summary>
/// Creates a drawable which visualises a <see cref="Judgements.Judgement"/>.
@ -34,31 +38,20 @@ namespace osu.Game.Rulesets.Judgements
Judgement = judgement;
JudgedObject = judgedObject;
AutoSizeAxes = Axes.Both;
Children = new[]
{
JudgementText = new OsuSpriteText
{
Origin = Anchor.Centre,
Anchor = Anchor.Centre,
Text = judgement.Result.GetDescription().ToUpper(),
Font = @"Venera",
Scale = new Vector2(0.85f, 1),
TextSize = 12
}
};
Size = new Vector2(judgement_size);
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
switch (Judgement.Result)
Child = new SkinnableDrawable($"Play/{Judgement.Result}", _ => JudgementText = new OsuSpriteText
{
case HitResult.Miss:
Colour = colours.Red;
break;
}
Text = Judgement.Result.GetDescription().ToUpper(),
Font = @"Venera",
Colour = Judgement.Result == HitResult.Miss ? colours.Red : Color4.White,
Scale = new Vector2(0.85f, 1),
TextSize = 12
}, restrictSize: false);
}
protected override void LoadComplete()