Add mods to the match info

This commit is contained in:
smoogipoo
2018-12-12 14:38:03 +09:00
parent 6661b5870f
commit 170955110f
3 changed files with 32 additions and 5 deletions

View File

@ -20,6 +20,8 @@ namespace osu.Game.Screens.Play.HUD
{
private const int fade_duration = 1000;
public bool DisplayUnrankedText = true;
private readonly Bindable<IEnumerable<Mod>> mods = new Bindable<IEnumerable<Mod>>();
public Bindable<IEnumerable<Mod>> Current => mods;
@ -29,6 +31,8 @@ namespace osu.Game.Screens.Play.HUD
public ModDisplay()
{
AutoSizeAxes = Axes.Both;
Children = new Drawable[]
{
iconsContainer = new ReverseChildIDFillFlowContainer<ModIcon>
@ -41,7 +45,6 @@ namespace osu.Game.Screens.Play.HUD
},
unrankedText = new OsuSpriteText
{
AlwaysPresent = true,
Anchor = Anchor.BottomCentre,
Origin = Anchor.TopCentre,
Text = @"/ UNRANKED /",
@ -77,7 +80,7 @@ namespace osu.Game.Screens.Play.HUD
private void appearTransform()
{
if (mods.Value.Any(m => !m.Ranked))
if (DisplayUnrankedText && mods.Value.Any(m => !m.Ranked))
unrankedText.FadeInFromZero(fade_duration, Easing.OutQuint);
else
unrankedText.Hide();