1
0
mirror of https://github.com/ppy/osu.git synced 2024-09-22 00:47:24 +08:00

Icon and beatmap title visual pass

This commit is contained in:
Dean Herbert 2018-12-26 17:07:59 +09:00
parent c6c8c472bb
commit f442e59620
3 changed files with 13 additions and 7 deletions

View File

@ -13,10 +13,9 @@ namespace osu.Game.Online.Multiplayer.GameTypes
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Icon = FontAwesome.fa_clock_o,
X = -2, // The icon is off-centre
Size = new Vector2(size),
Colour = colours.Blue,
Shadow = false
};
}
}
}

View File

@ -4,7 +4,7 @@ using osu.Framework.Graphics.Shapes;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Online.Multiplayer
namespace osu.Game.Online.Multiplayer.GameTypes
{
public class VersusRow : FillFlowContainer
{

View File

@ -1,11 +1,13 @@
// Copyright (c) 2007-2018 ppy Pty Ltd <contact@ppy.sh>.
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
using osu.Framework.Allocation;
using osu.Framework.Configuration;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Localisation;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
using osu.Game.Online.Chat;
@ -23,14 +25,12 @@ namespace osu.Game.Screens.Multi.Components
AutoSizeAxes = Axes.Both;
InternalChild = textFlow = new LinkFlowContainer { AutoSizeAxes = Axes.Both };
Beatmap.BindValueChanged(v => updateText());
}
protected override void LoadComplete()
{
base.LoadComplete();
updateText();
Beatmap.BindValueChanged(v => updateText(), true);
}
private float textSize = OsuSpriteText.FONT_SIZE;
@ -48,6 +48,9 @@ namespace osu.Game.Screens.Multi.Components
}
}
[Resolved]
private OsuColour colours { get; set; }
private void updateText()
{
if (!IsLoaded)
@ -56,7 +59,11 @@ namespace osu.Game.Screens.Multi.Components
textFlow.Clear();
if (Beatmap.Value == null)
textFlow.AddText("Changing map", s => s.TextSize = TextSize);
textFlow.AddText("No beatmap selected", s =>
{
s.TextSize = TextSize;
s.Colour = colours.PinkLight;
});
else
{
textFlow.AddLink(new[]