mirror of
https://github.com/ppy/osu
synced 2024-12-14 10:57:41 +00:00
Icon and beatmap title visual pass
This commit is contained in:
parent
c6c8c472bb
commit
f442e59620
@ -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
|
||||
};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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
|
||||
{
|
@ -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[]
|
||||
|
Loading…
Reference in New Issue
Block a user