mirror of https://github.com/ppy/osu
Initial pass of ladder screen design update
This commit is contained in:
parent
1c5d6e0cf4
commit
ba6c4abbe6
|
@ -27,12 +27,12 @@ public class DrawableMatchTeam : DrawableTournamentTeam, IHasContextMenu
|
|||
private readonly bool losers;
|
||||
private TournamentSpriteText scoreText;
|
||||
private Box background;
|
||||
private Box backgroundRight;
|
||||
|
||||
private readonly Bindable<int?> score = new Bindable<int?>();
|
||||
private readonly BindableBool completed = new BindableBool();
|
||||
|
||||
private Color4 colourWinner;
|
||||
private Color4 colourNormal;
|
||||
|
||||
private readonly Func<bool> isWinner;
|
||||
private LadderEditorScreen ladderEditor;
|
||||
|
@ -60,15 +60,12 @@ public DrawableMatchTeam(TournamentTeam team, TournamentMatch match, bool losers
|
|||
this.losers = losers;
|
||||
Size = new Vector2(150, 40);
|
||||
|
||||
Masking = true;
|
||||
CornerRadius = 5;
|
||||
|
||||
Flag.Scale = new Vector2(0.9f);
|
||||
Flag.Anchor = Flag.Origin = Anchor.CentreLeft;
|
||||
|
||||
AcronymText.Anchor = AcronymText.Origin = Anchor.CentreLeft;
|
||||
AcronymText.Padding = new MarginPadding { Left = 50 };
|
||||
AcronymText.Font = OsuFont.Torus.With(size: 24);
|
||||
AcronymText.Font = OsuFont.Torus.With(size: 22, weight: FontWeight.Bold);
|
||||
|
||||
if (match != null)
|
||||
{
|
||||
|
@ -85,8 +82,9 @@ private void load(OsuColour colours, LadderEditorScreen ladderEditor)
|
|||
{
|
||||
this.ladderEditor = ladderEditor;
|
||||
|
||||
colourWinner = losers ? colours.YellowDarker : colours.BlueDarker;
|
||||
colourNormal = OsuColour.Gray(0.2f);
|
||||
colourWinner = losers
|
||||
? OsuColour.FromHex("#8E7F48")
|
||||
: OsuColour.FromHex("#1462AA");
|
||||
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
|
@ -102,29 +100,28 @@ private void load(OsuColour colours, LadderEditorScreen ladderEditor)
|
|||
{
|
||||
AcronymText,
|
||||
Flag,
|
||||
new Container
|
||||
}
|
||||
},
|
||||
new Container
|
||||
{
|
||||
Masking = true,
|
||||
Width = 0.3f,
|
||||
Anchor = Anchor.CentreRight,
|
||||
Origin = Anchor.CentreRight,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
backgroundRight = new Box
|
||||
{
|
||||
Masking = true,
|
||||
CornerRadius = 5,
|
||||
Width = 0.3f,
|
||||
Anchor = Anchor.CentreRight,
|
||||
Origin = Anchor.CentreRight,
|
||||
Colour = OsuColour.Gray(0.1f),
|
||||
Alpha = 0.8f,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
{
|
||||
Colour = OsuColour.Gray(0.1f),
|
||||
Alpha = 0.8f,
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
},
|
||||
scoreText = new TournamentSpriteText
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Font = OsuFont.Torus.With(size: 20),
|
||||
}
|
||||
}
|
||||
},
|
||||
scoreText = new TournamentSpriteText
|
||||
{
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Font = OsuFont.Torus.With(size: 22),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -181,9 +178,12 @@ private void updateWinStyle()
|
|||
{
|
||||
bool winner = completed.Value && isWinner?.Invoke() == true;
|
||||
|
||||
background.FadeColour(winner ? colourWinner : colourNormal, winner ? 500 : 0, Easing.OutQuint);
|
||||
background.FadeColour(winner ? Color4.White : OsuColour.FromHex("#444"), winner ? 500 : 0, Easing.OutQuint);
|
||||
backgroundRight.FadeColour(winner ? colourWinner : OsuColour.FromHex("#333"), winner ? 500 : 0, Easing.OutQuint);
|
||||
|
||||
scoreText.Font = AcronymText.Font = OsuFont.Torus.With(weight: winner ? FontWeight.Bold : FontWeight.Regular);
|
||||
AcronymText.Colour = winner ? Color4.Black : Color4.White;
|
||||
|
||||
scoreText.Font = scoreText.Font.With(weight: winner ? FontWeight.Bold : FontWeight.Regular);
|
||||
}
|
||||
|
||||
public MenuItem[] ContextMenuItems
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Tournament.Models;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
@ -45,9 +46,7 @@ public DrawableTournamentMatch(TournamentMatch match, bool editor = false)
|
|||
{
|
||||
selectionBox = new Container
|
||||
{
|
||||
CornerRadius = 5,
|
||||
Masking = true,
|
||||
Scale = new Vector2(1.05f),
|
||||
Scale = new Vector2(1.1f),
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
|
@ -57,14 +56,12 @@ public DrawableTournamentMatch(TournamentMatch match, bool editor = false)
|
|||
},
|
||||
currentMatchSelectionBox = new Container
|
||||
{
|
||||
CornerRadius = 5,
|
||||
Masking = true,
|
||||
Scale = new Vector2(1.05f),
|
||||
Scale = new Vector2(1.1f),
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Anchor = Anchor.Centre,
|
||||
Origin = Anchor.Centre,
|
||||
Alpha = 0,
|
||||
Colour = Color4.OrangeRed,
|
||||
Colour = OsuColour.FromHex("#D24747"),
|
||||
Child = new Box { RelativeSizeAxes = Axes.Both }
|
||||
},
|
||||
Flow = new FillFlowContainer<DrawableMatchTeam>
|
||||
|
|
|
@ -7,7 +7,6 @@
|
|||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Tournament.Models;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Tournament.Screens.Ladder.Components
|
||||
{
|
||||
|
@ -33,14 +32,14 @@ public DrawableTournamentRound(TournamentRound round, bool losers = false)
|
|||
{
|
||||
textDescription = new TournamentSpriteText
|
||||
{
|
||||
Colour = Color4.Black,
|
||||
Colour = TournamentGame.TEXT_COLOUR,
|
||||
Origin = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre
|
||||
},
|
||||
textName = new TournamentSpriteText
|
||||
{
|
||||
Font = OsuFont.Torus.With(weight: FontWeight.Bold),
|
||||
Colour = Color4.Black,
|
||||
Colour = TournamentGame.TEXT_COLOUR,
|
||||
Origin = Anchor.TopCentre,
|
||||
Anchor = Anchor.TopCentre
|
||||
},
|
||||
|
|
|
@ -32,8 +32,8 @@ public class LadderScreen : TournamentScreen, IProvideVideo
|
|||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours, Storage storage)
|
||||
{
|
||||
normalPathColour = colours.BlueDarker.Darken(2);
|
||||
losersPathColour = colours.YellowDarker.Darken(2);
|
||||
normalPathColour = OsuColour.FromHex("#66D1FF");
|
||||
losersPathColour = OsuColour.FromHex("#FFC700");
|
||||
|
||||
RelativeSizeAxes = Axes.Both;
|
||||
|
||||
|
@ -47,6 +47,12 @@ private void load(OsuColour colours, Storage storage)
|
|||
RelativeSizeAxes = Axes.Both,
|
||||
Loop = true,
|
||||
},
|
||||
new DrawableTournamentTitleText
|
||||
{
|
||||
Y = 100,
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
},
|
||||
ScrollContent = new LadderDragContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
|
|
Loading…
Reference in New Issue