1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 16:12:54 +08:00

Tidy things up

This commit is contained in:
Dean Herbert 2024-01-25 21:17:29 +09:00
parent aeac0a2a9d
commit 50300adef8
No known key found for this signature in database

View File

@ -76,30 +76,10 @@ namespace osu.Game.Beatmaps.Drawables
Spacing = new Vector2(5), Spacing = new Vector2(5),
Children = new Drawable[] Children = new Drawable[]
{ {
circleSize = new OsuSpriteText circleSize = new OsuSpriteText { Font = OsuFont.GetFont(size: 14) },
{ drainRate = new OsuSpriteText { Font = OsuFont.GetFont(size: 14) },
Anchor = Anchor.Centre, approachRate = new OsuSpriteText { Font = OsuFont.GetFont(size: 14) },
Origin = Anchor.Centre, overallDifficulty = new OsuSpriteText { Font = OsuFont.GetFont(size: 14) }
Font = OsuFont.GetFont(size: 14)
},
drainRate = new OsuSpriteText
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Font = OsuFont.GetFont(size: 14)
},
approachRate = new OsuSpriteText
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Font = OsuFont.GetFont(size: 14)
},
overallDifficulty = new OsuSpriteText
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Font = OsuFont.GetFont(size: 14)
}
} }
}, },
miscFillFlowContainer = new FillFlowContainer miscFillFlowContainer = new FillFlowContainer
@ -112,18 +92,8 @@ namespace osu.Game.Beatmaps.Drawables
Spacing = new Vector2(5), Spacing = new Vector2(5),
Children = new Drawable[] Children = new Drawable[]
{ {
length = new OsuSpriteText length = new OsuSpriteText { Font = OsuFont.GetFont(size: 14) },
{ bpm = new OsuSpriteText { Font = OsuFont.GetFont(size: 14) },
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Font = OsuFont.GetFont(size: 14)
},
bpm = new OsuSpriteText
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Font = OsuFont.GetFont(size: 14)
},
} }
} }
} }
@ -168,10 +138,8 @@ namespace osu.Game.Beatmaps.Drawables
if (displayedContent.Mods != null) if (displayedContent.Mods != null)
{ {
foreach (var mod in displayedContent.Mods.OfType<IApplicableToDifficulty>()) foreach (var mod in displayedContent.Mods.OfType<IApplicableToDifficulty>())
{
mod.ApplyToDifficulty(originalDifficulty); mod.ApplyToDifficulty(originalDifficulty);
} }
}
Ruleset ruleset = displayedContent.Ruleset.CreateInstance(); Ruleset ruleset = displayedContent.Ruleset.CreateInstance();
BeatmapDifficulty adjustedDifficulty = ruleset.GetRateAdjustedDisplayDifficulty(originalDifficulty, rate); BeatmapDifficulty adjustedDifficulty = ruleset.GetRateAdjustedDisplayDifficulty(originalDifficulty, rate);