mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Add mods to the match info
This commit is contained in:
@ -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();
|
||||
|
Reference in New Issue
Block a user