1
0
mirror of https://github.com/ppy/osu.git synced 2024-12-16 06:45:37 +08:00

Merge remote-tracking branch 'refs/remotes/ppy/master' into user-cards-update

This commit is contained in:
Andrei Zavatski 2020-03-04 13:43:28 +03:00
commit 1bdbe7c823
22 changed files with 176 additions and 265 deletions

View File

@ -21,6 +21,7 @@ namespace osu.Game.Tournament.Tests.Screens
match.Team1.Value = Ladder.Teams.FirstOrDefault(t => t.Acronym.Value == "USA");
match.Team2.Value = Ladder.Teams.FirstOrDefault(t => t.Acronym.Value == "JPN");
match.Round.Value = Ladder.Rounds.FirstOrDefault(g => g.Name.Value == "Finals");
match.Completed.Value = true;
ladder.CurrentMatch.Value = match;
Add(new TeamWinScreen

View File

@ -5,7 +5,6 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osuTK;
using osuTK.Graphics;
@ -35,7 +34,7 @@ namespace osu.Game.Tournament.Components
RelativeSizeAxes = Axes.Both,
Colour = new Color4(54, 54, 54, 255)
},
new OsuSpriteText
new TournamentSpriteText
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,

View File

@ -9,7 +9,6 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.Textures;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Tournament.Models;
namespace osu.Game.Tournament.Components
@ -19,7 +18,7 @@ namespace osu.Game.Tournament.Components
public readonly TournamentTeam Team;
protected readonly Sprite Flag;
protected readonly OsuSpriteText AcronymText;
protected readonly TournamentSpriteText AcronymText;
[UsedImplicitly]
private Bindable<string> acronym;
@ -37,9 +36,9 @@ namespace osu.Game.Tournament.Components
FillMode = FillMode.Fit
};
AcronymText = new OsuSpriteText
AcronymText = new TournamentSpriteText
{
Font = OsuFont.GetFont(weight: FontWeight.Regular),
Font = OsuFont.Torus.With(weight: FontWeight.Regular),
};
}

View File

@ -13,7 +13,6 @@ using osu.Framework.Graphics.Sprites;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Legacy;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Rulesets;
using osu.Game.Screens.Menu;
using osuTK;
@ -262,7 +261,7 @@ namespace osu.Game.Tournament.Components
static void cp(SpriteText s, Color4 colour)
{
s.Colour = colour;
s.Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 15);
s.Font = OsuFont.Torus.With(weight: FontWeight.Bold, size: 15);
}
for (var i = 0; i < tuples.Length; i++)
@ -278,9 +277,9 @@ namespace osu.Game.Tournament.Components
});
}
AddText(new OsuSpriteText { Text = heading }, s => cp(s, OsuColour.Gray(0.33f)));
AddText(new TournamentSpriteText { Text = heading }, s => cp(s, OsuColour.Gray(0.33f)));
AddText(" ", s => cp(s, OsuColour.Gray(0.33f)));
AddText(new OsuSpriteText { Text = content }, s => cp(s, OsuColour.Gray(0.5f)));
AddText(new TournamentSpriteText { Text = content }, s => cp(s, OsuColour.Gray(0.5f)));
}
}
}

View File

@ -15,7 +15,6 @@ using osu.Framework.Localisation;
using osu.Game.Beatmaps;
using osu.Game.Beatmaps.Drawables;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Tournament.Models;
using osuTK;
using osuTK.Graphics;
@ -77,14 +76,14 @@ namespace osu.Game.Tournament.Components
Direction = FillDirection.Vertical,
Children = new Drawable[]
{
new OsuSpriteText
new TournamentSpriteText
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Text = new LocalisedString((
$"{Beatmap.Metadata.ArtistUnicode ?? Beatmap.Metadata.Artist} - {Beatmap.Metadata.TitleUnicode ?? Beatmap.Metadata.Title}",
$"{Beatmap.Metadata.Artist} - {Beatmap.Metadata.Title}")),
Font = OsuFont.GetFont(weight: FontWeight.Bold, italics: true),
Font = OsuFont.Torus.With(weight: FontWeight.Bold),
},
new FillFlowContainer
{
@ -95,28 +94,28 @@ namespace osu.Game.Tournament.Components
Direction = FillDirection.Horizontal,
Children = new Drawable[]
{
new OsuSpriteText
new TournamentSpriteText
{
Text = "mapper",
Padding = new MarginPadding { Right = 5 },
Font = OsuFont.GetFont(italics: true, weight: FontWeight.Regular, size: 14)
Font = OsuFont.Torus.With(weight: FontWeight.Regular, size: 14)
},
new OsuSpriteText
new TournamentSpriteText
{
Text = Beatmap.Metadata.AuthorString,
Padding = new MarginPadding { Right = 20 },
Font = OsuFont.GetFont(italics: true, weight: FontWeight.Bold, size: 14)
Font = OsuFont.Torus.With(weight: FontWeight.Bold, size: 14)
},
new OsuSpriteText
new TournamentSpriteText
{
Text = "difficulty",
Padding = new MarginPadding { Right = 5 },
Font = OsuFont.GetFont(italics: true, weight: FontWeight.Regular, size: 14)
Font = OsuFont.Torus.With(weight: FontWeight.Regular, size: 14)
},
new OsuSpriteText
new TournamentSpriteText
{
Text = Beatmap.Version,
Font = OsuFont.GetFont(italics: true, weight: FontWeight.Bold, size: 14)
Font = OsuFont.Torus.With(weight: FontWeight.Bold, size: 14)
},
}
}

View File

@ -8,7 +8,6 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Tournament.Components;
using osu.Game.Tournament.Models;
using osuTK;
@ -43,7 +42,7 @@ namespace osu.Game.Tournament.Screens.Drawings.Components
Colour = new Color4(54, 54, 54, 255)
},
// Group name
new OsuSpriteText
new TournamentSpriteText
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
@ -51,7 +50,7 @@ namespace osu.Game.Tournament.Screens.Drawings.Components
Position = new Vector2(0, 7f),
Text = $"GROUP {name.ToUpperInvariant()}",
Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 8),
Font = OsuFont.Torus.With(weight: FontWeight.Bold, size: 8),
Colour = new Color4(255, 204, 34, 255),
},
teams = new FillFlowContainer<GroupTeam>
@ -134,7 +133,7 @@ namespace osu.Game.Tournament.Screens.Drawings.Components
AcronymText.Anchor = Anchor.TopCentre;
AcronymText.Origin = Anchor.TopCentre;
AcronymText.Text = team.Acronym.Value.ToUpperInvariant();
AcronymText.Font = OsuFont.GetFont(weight: FontWeight.Bold, size: 10);
AcronymText.Font = OsuFont.Torus.With(weight: FontWeight.Bold, size: 10);
InternalChildren = new Drawable[]
{

View File

@ -14,7 +14,6 @@ using osu.Framework.Graphics.Textures;
using osu.Framework.Logging;
using osu.Framework.Platform;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Tournament.Components;
using osu.Game.Tournament.Models;
using osu.Game.Tournament.Screens.Drawings.Components;
@ -29,7 +28,7 @@ namespace osu.Game.Tournament.Screens.Drawings
private ScrollingTeamContainer teamsContainer;
private GroupContainer groupsContainer;
private OsuSpriteText fullTeamNameText;
private TournamentSpriteText fullTeamNameText;
private readonly List<TournamentTeam> allTeams = new List<TournamentTeam>();
@ -109,18 +108,18 @@ namespace osu.Game.Tournament.Screens.Drawings
RelativeSizeAxes = Axes.X,
},
// Scrolling team name
fullTeamNameText = new OsuSpriteText
fullTeamNameText = new TournamentSpriteText
{
Anchor = Anchor.Centre,
Origin = Anchor.TopCentre,
Position = new Vector2(0, 45f),
Colour = OsuColour.Gray(0.33f),
Colour = OsuColour.Gray(0.95f),
Alpha = 0,
Font = OsuFont.GetFont(weight: FontWeight.Light, size: 42),
Font = OsuFont.Torus.With(weight: FontWeight.Light, size: 42),
}
}
},

View File

@ -5,9 +5,9 @@ using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Tournament.Components;
using osu.Game.Tournament.Models;
@ -30,7 +30,7 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
new TournamentLogo(),
new RoundDisplay
{
Y = 10,
Y = 5,
Anchor = Anchor.BottomCentre,
Origin = Anchor.TopCentre,
},
@ -51,9 +51,6 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
{
private readonly TeamColour teamColour;
private readonly Color4 red = new Color4(129, 68, 65, 255);
private readonly Color4 blue = new Color4(41, 91, 97, 255);
private readonly Bindable<TournamentMatch> currentMatch = new Bindable<TournamentMatch>();
private readonly Bindable<TournamentTeam> currentTeam = new Bindable<TournamentTeam>();
private readonly Bindable<int?> currentTeamScore = new Bindable<int?>();
@ -106,7 +103,7 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
private void teamChanged(TournamentTeam team)
{
var colour = teamColour == TeamColour.Red ? red : blue;
var colour = teamColour == TeamColour.Red ? TournamentGame.COLOUR_RED : TournamentGame.COLOUR_BLUE;
var flip = teamColour != TeamColour.Red;
InternalChildren = new Drawable[]
@ -169,7 +166,7 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
Children = new Drawable[]
{
Flag,
new OsuSpriteText
new TournamentSpriteText
{
Text = team?.FullName.Value.ToUpper() ?? "???",
X = (flip ? -1 : 1) * 90,
@ -188,10 +185,31 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
{
private readonly Bindable<TournamentMatch> currentMatch = new Bindable<TournamentMatch>();
private readonly TournamentSpriteText text;
public RoundDisplay()
{
Width = 200;
Height = 20;
Masking = true;
CornerRadius = 10;
InternalChildren = new Drawable[]
{
new Box
{
Colour = OsuColour.Gray(0.18f),
RelativeSizeAxes = Axes.Both,
},
text = new TournamentSpriteText
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Colour = Color4.White,
Font = OsuFont.Torus.With(weight: FontWeight.Regular, size: 16),
},
};
}
[BackgroundDependencyLoader]
@ -201,20 +219,8 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
currentMatch.BindTo(ladder.CurrentMatch);
}
private void matchChanged(ValueChangedEvent<TournamentMatch> match)
{
InternalChildren = new Drawable[]
{
new OsuSpriteText
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Colour = Color4.White,
Text = match.NewValue.Round.Value?.Name.Value ?? "Unknown Round",
Font = OsuFont.Torus.With(weight: FontWeight.Regular, size: 18),
},
};
}
private void matchChanged(ValueChangedEvent<TournamentMatch> match) =>
text.Text = match.NewValue.Round.Value?.Name.Value ?? "Unknown Round";
}
}
}

View File

@ -11,7 +11,6 @@ using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.Events;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Tournament.Components;
using osu.Game.Tournament.Models;
@ -26,7 +25,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
{
private readonly TournamentMatch match;
private readonly bool losers;
private OsuSpriteText scoreText;
private TournamentSpriteText scoreText;
private Box background;
private readonly Bindable<int?> score = new Bindable<int?>();
@ -69,7 +68,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
AcronymText.Anchor = AcronymText.Origin = Anchor.CentreLeft;
AcronymText.Padding = new MarginPadding { Left = 50 };
AcronymText.Font = OsuFont.GetFont(size: 24);
AcronymText.Font = OsuFont.Torus.With(size: 24);
if (match != null)
{
@ -119,11 +118,11 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
Alpha = 0.8f,
RelativeSizeAxes = Axes.Both,
},
scoreText = new OsuSpriteText
scoreText = new TournamentSpriteText
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Font = OsuFont.GetFont(size: 20),
Font = OsuFont.Torus.With(size: 20),
}
}
}
@ -184,7 +183,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
background.FadeColour(winner ? colourWinner : colourNormal, winner ? 500 : 0, Easing.OutQuint);
scoreText.Font = AcronymText.Font = OsuFont.GetFont(weight: winner ? FontWeight.Bold : FontWeight.Regular);
scoreText.Font = AcronymText.Font = OsuFont.Torus.With(weight: winner ? FontWeight.Bold : FontWeight.Regular);
}
public MenuItem[] ContextMenuItems

View File

@ -6,7 +6,6 @@ using osu.Framework.Bindables;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Tournament.Models;
using osuTK.Graphics;
@ -22,8 +21,8 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
public DrawableTournamentRound(TournamentRound round, bool losers = false)
{
OsuSpriteText textName;
OsuSpriteText textDescription;
TournamentSpriteText textName;
TournamentSpriteText textDescription;
AutoSizeAxes = Axes.Both;
InternalChild = new FillFlowContainer
@ -32,15 +31,15 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
AutoSizeAxes = Axes.Both,
Children = new Drawable[]
{
textDescription = new OsuSpriteText
textDescription = new TournamentSpriteText
{
Colour = Color4.Black,
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre
},
textName = new OsuSpriteText
textName = new TournamentSpriteText
{
Font = OsuFont.GetFont(weight: FontWeight.Bold),
Font = OsuFont.Torus.With(weight: FontWeight.Bold),
Colour = Color4.Black,
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre

View File

@ -42,7 +42,7 @@ namespace osu.Game.Tournament.Screens.Ladder
RelativeSizeAxes = Axes.Both,
Children = new Drawable[]
{
new TourneyVideo(storage.GetStream(@"BG Side Logo - OWC.m4v"))
new TourneyVideo(storage.GetStream(@"videos/ladder.m4v"))
{
RelativeSizeAxes = Axes.Both,
Loop = true,

View File

@ -9,7 +9,6 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Input.Events;
using osu.Framework.Threading;
using osu.Game.Beatmaps;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Tournament.Components;
using osu.Game.Tournament.IPC;
@ -56,7 +55,7 @@ namespace osu.Game.Tournament.Screens.MapPool
{
Children = new Drawable[]
{
new OsuSpriteText
new TournamentSpriteText
{
Text = "Current Mode"
},

View File

@ -10,7 +10,6 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Platform;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Tournament.Components;
using osu.Game.Tournament.Models;
using osu.Game.Tournament.Screens.Ladder.Components;
@ -34,7 +33,7 @@ namespace osu.Game.Tournament.Screens.Schedule
InternalChildren = new Drawable[]
{
new TourneyVideo(storage.GetStream(@"BG Side Logo - OWC.m4v"))
new TourneyVideo(storage.GetStream(@"videos/schedule.m4v"))
{
RelativeSizeAxes = Axes.Both,
Loop = true,
@ -107,20 +106,20 @@ namespace osu.Game.Tournament.Screens.Schedule
Height = 0.25f,
Children = new Drawable[]
{
new OsuSpriteText
new TournamentSpriteText
{
Margin = new MarginPadding { Left = -10, Bottom = 10, Top = -5 },
Spacing = new Vector2(10, 0),
Text = match.NewValue.Round.Value?.Name.Value,
Colour = Color4.Black,
Font = OsuFont.GetFont(size: 20)
Font = OsuFont.Torus.With(size: 20)
},
new ScheduleMatch(match.NewValue, false),
new OsuSpriteText
new TournamentSpriteText
{
Text = "Start Time " + match.NewValue.Date.Value.ToUniversalTime().ToString("HH:mm UTC"),
Colour = Color4.Black,
Font = OsuFont.GetFont(size: 20)
Font = OsuFont.Torus.With(size: 20)
},
}
}
@ -150,7 +149,7 @@ namespace osu.Game.Tournament.Screens.Schedule
Alpha = conditional ? 0.6f : 1,
Margin = new MarginPadding { Horizontal = 10, Vertical = 5 },
});
AddInternal(new OsuSpriteText
AddInternal(new TournamentSpriteText
{
Anchor = Anchor.BottomRight,
Origin = Anchor.BottomLeft,
@ -174,13 +173,13 @@ namespace osu.Game.Tournament.Screens.Schedule
Padding = new MarginPadding { Left = 30, Top = 30 };
InternalChildren = new Drawable[]
{
new OsuSpriteText
new TournamentSpriteText
{
X = 30,
Text = title,
Colour = Color4.Black,
Spacing = new Vector2(10, 0),
Font = OsuFont.GetFont(size: 30)
Font = OsuFont.Torus.With(size: 30)
},
content = new FillFlowContainer
{

View File

@ -6,7 +6,6 @@ using System.Collections.Generic;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Graphics.Sprites;
using osu.Game.Graphics.UserInterface;
using osu.Game.Graphics.UserInterfaceV2;
using osu.Game.Online.API;
@ -147,7 +146,7 @@ namespace osu.Game.Tournament.Screens
public Action Action;
private OsuSpriteText valueText;
private TournamentSpriteText valueText;
protected override Drawable CreateComponent() => new Container
{
@ -155,7 +154,7 @@ namespace osu.Game.Tournament.Screens
RelativeSizeAxes = Axes.X,
Children = new Drawable[]
{
valueText = new OsuSpriteText
valueText = new TournamentSpriteText
{
Anchor = Anchor.CentreLeft,
Origin = Anchor.CentreLeft,

View File

@ -10,7 +10,7 @@ namespace osu.Game.Tournament.Screens.Showcase
[BackgroundDependencyLoader]
private void load()
{
AddInternal(new TournamentLogo(false));
AddInternal(new TournamentLogo());
}
}
}

View File

@ -11,20 +11,12 @@ namespace osu.Game.Tournament.Screens.Showcase
{
public class TournamentLogo : CompositeDrawable
{
public TournamentLogo(bool includeRoundBackground = true)
public TournamentLogo()
{
RelativeSizeAxes = Axes.X;
Margin = new MarginPadding { Vertical = 5 };
if (includeRoundBackground)
{
AutoSizeAxes = Axes.Y;
}
else
{
Masking = true;
Height = 100;
}
Height = 100;
}
[BackgroundDependencyLoader]
@ -32,9 +24,11 @@ namespace osu.Game.Tournament.Screens.Showcase
{
InternalChild = new Sprite
{
Texture = textures.Get("game-screen-logo"),
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
FillMode = FillMode.Fit,
RelativeSizeAxes = Axes.Both,
Texture = textures.Get("game-screen-logo"),
};
}
}

View File

@ -7,12 +7,9 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Platform;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Tournament.Components;
using osu.Game.Tournament.Models;
using osu.Game.Tournament.Screens.Showcase;
using osuTK;
using osuTK.Graphics;
namespace osu.Game.Tournament.Screens.TeamIntro
{
@ -29,12 +26,11 @@ namespace osu.Game.Tournament.Screens.TeamIntro
InternalChildren = new Drawable[]
{
new TourneyVideo(storage.GetStream(@"BG Team - Both OWC.m4v"))
new TourneyVideo(storage.GetStream(@"videos/teamintro.m4v"))
{
RelativeSizeAxes = Axes.Both,
Loop = true,
},
new TournamentLogo(false),
mainContainer = new Container
{
RelativeSizeAxes = Axes.Both,
@ -75,8 +71,9 @@ namespace osu.Game.Tournament.Screens.TeamIntro
{
RelativeSizeAxes = Axes.Both,
Height = 0.25f,
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Y = 180,
}
};
}
@ -85,8 +82,6 @@ namespace osu.Game.Tournament.Screens.TeamIntro
{
public RoundDisplay(TournamentMatch match)
{
var col = OsuColour.Gray(0.33f);
InternalChildren = new Drawable[]
{
new FillFlowContainer
@ -98,31 +93,13 @@ namespace osu.Game.Tournament.Screens.TeamIntro
Spacing = new Vector2(0, 10),
Children = new Drawable[]
{
new OsuSpriteText
new TournamentSpriteText
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Colour = col,
Text = "COMING UP NEXT",
Spacing = new Vector2(2, 0),
Font = OsuFont.GetFont(size: 15, weight: FontWeight.Black)
},
new OsuSpriteText
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Colour = col,
Colour = OsuColour.Gray(0.33f),
Text = match.Round.Value?.Name.Value ?? "Unknown Round",
Spacing = new Vector2(10, 0),
Font = OsuFont.GetFont(size: 50, weight: FontWeight.Light)
},
new OsuSpriteText
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Colour = col,
Text = match.Date.Value.ToUniversalTime().ToString("dd MMMM HH:mm UTC"),
Font = OsuFont.GetFont(size: 20)
Font = OsuFont.Torus.With(size: 26, weight: FontWeight.Light)
},
}
}
@ -132,21 +109,19 @@ namespace osu.Game.Tournament.Screens.TeamIntro
private class TeamWithPlayers : CompositeDrawable
{
private readonly Color4 red = new Color4(129, 68, 65, 255);
private readonly Color4 blue = new Color4(41, 91, 97, 255);
public TeamWithPlayers(TournamentTeam team, bool left = false)
{
FillFlowContainer players;
var colour = left ? red : blue;
var colour = left ? TournamentGame.COLOUR_RED : TournamentGame.COLOUR_BLUE;
InternalChildren = new Drawable[]
{
new TeamDisplay(team, left ? "Team Red" : "Team Blue", colour)
new TeamDisplay(team)
{
Anchor = left ? Anchor.CentreRight : Anchor.CentreLeft,
Origin = Anchor.Centre,
Origin = Anchor.TopCentre,
RelativePositionAxes = Axes.Both,
X = (left ? -1 : 1) * 0.36f,
X = (left ? -1 : 1) * 0.3145f,
Y = -0.077f,
},
players = new FillFlowContainer
{
@ -157,7 +132,7 @@ namespace osu.Game.Tournament.Screens.TeamIntro
Anchor = left ? Anchor.CentreRight : Anchor.CentreLeft,
Origin = left ? Anchor.CentreRight : Anchor.CentreLeft,
RelativePositionAxes = Axes.Both,
X = (left ? -1 : 1) * 0.66f,
X = (left ? -1 : 1) * 0.58f,
},
};
@ -165,10 +140,10 @@ namespace osu.Game.Tournament.Screens.TeamIntro
{
foreach (var p in team.Players)
{
players.Add(new OsuSpriteText
players.Add(new TournamentSpriteText
{
Text = p.Username,
Font = OsuFont.GetFont(size: 24),
Font = OsuFont.Torus.With(size: 24),
Colour = colour,
Anchor = left ? Anchor.CentreRight : Anchor.CentreLeft,
Origin = left ? Anchor.CentreRight : Anchor.CentreLeft,
@ -179,7 +154,7 @@ namespace osu.Game.Tournament.Screens.TeamIntro
private class TeamDisplay : DrawableTournamentTeam
{
public TeamDisplay(TournamentTeam team, string teamName, Color4 colour)
public TeamDisplay(TournamentTeam team)
: base(team)
{
AutoSizeAxes = Axes.Both;
@ -187,33 +162,24 @@ namespace osu.Game.Tournament.Screens.TeamIntro
Flag.Anchor = Flag.Origin = Anchor.TopCentre;
Flag.RelativeSizeAxes = Axes.None;
Flag.Size = new Vector2(300, 200);
Flag.Scale = new Vector2(0.4f);
Flag.Margin = new MarginPadding { Bottom = 20 };
Flag.Scale = new Vector2(0.32f);
InternalChild = new FillFlowContainer
{
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Vertical,
Spacing = new Vector2(0, 5),
Spacing = new Vector2(160),
Children = new Drawable[]
{
Flag,
new OsuSpriteText
new TournamentSpriteText
{
Text = team?.FullName.Value.ToUpper() ?? "???",
Font = OsuFont.Torus.With(size: 40, weight: FontWeight.Light),
Colour = Color4.Black,
Text = team?.FullName.Value ?? "???",
Font = OsuFont.Torus.With(size: 20, weight: FontWeight.Regular),
Colour = OsuColour.Gray(0.2f),
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre,
},
new OsuSpriteText
{
Text = teamName.ToUpper(),
Font = OsuFont.Torus.With(size: 20, weight: FontWeight.Regular),
Colour = colour,
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre,
}
}
};
}

View File

@ -7,10 +7,8 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Platform;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Tournament.Components;
using osu.Game.Tournament.Models;
using osu.Game.Tournament.Screens.Showcase;
using osuTK;
using osuTK.Graphics;
@ -33,22 +31,18 @@ namespace osu.Game.Tournament.Screens.TeamWin
InternalChildren = new Drawable[]
{
blueWinVideo = new TourneyVideo(storage.GetStream(@"BG Team - Win Blue.m4v"))
blueWinVideo = new TourneyVideo(storage.GetStream(@"videos/teamwin-blue.m4v"))
{
Alpha = 1,
RelativeSizeAxes = Axes.Both,
Loop = true,
},
redWinVideo = new TourneyVideo(storage.GetStream(@"BG Team - Win Red.m4v"))
redWinVideo = new TourneyVideo(storage.GetStream(@"videos/teamwin-red.m4v"))
{
Alpha = 0,
RelativeSizeAxes = Axes.Both,
Loop = true,
},
new TournamentLogo(false)
{
Y = 40,
},
mainContainer = new Container
{
RelativeSizeAxes = Axes.Both,
@ -85,141 +79,99 @@ namespace osu.Game.Tournament.Screens.TeamWin
mainContainer.Children = new Drawable[]
{
new TeamFlagDisplay(match.Winner)
{
Size = new Vector2(300, 200),
Scale = new Vector2(0.5f),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
X = -387,
},
new TournamentSpriteText
{
Anchor = Anchor.Centre,
Origin = Anchor.TopLeft,
Position = new Vector2(78, -70),
Colour = OsuColour.Gray(0.33f),
Text = match.Round.Value?.Name.Value ?? "Unknown Round",
Font = OsuFont.Torus.With(size: 30, weight: FontWeight.Regular)
},
new TeamWithPlayers(match.Winner, redWin)
{
RelativeSizeAxes = Axes.Both,
Width = 0.5f,
Height = 0.6f,
Anchor = Anchor.Centre,
Origin = Anchor.Centre
Origin = Anchor.TopLeft,
Position = new Vector2(78, 0),
},
new RoundDisplay(match)
{
RelativeSizeAxes = Axes.Both,
Height = 0.25f,
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
}
};
}
private class RoundDisplay : CompositeDrawable
{
public RoundDisplay(TournamentMatch match)
{
var col = OsuColour.Gray(0.33f);
InternalChildren = new Drawable[]
{
new FillFlowContainer
{
AutoSizeAxes = Axes.Both,
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Direction = FillDirection.Vertical,
Spacing = new Vector2(0, 10),
Children = new Drawable[]
{
new OsuSpriteText
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Colour = col,
Text = "WINNER",
Font = OsuFont.Torus.With(size: 15, weight: FontWeight.Regular),
},
new OsuSpriteText
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Colour = col,
Text = match.Round.Value?.Name.Value ?? "Unknown Round",
Font = OsuFont.Torus.With(size: 50, weight: FontWeight.Light),
Spacing = new Vector2(10, 0),
},
new OsuSpriteText
{
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
Colour = col,
Text = match.Date.Value.ToUniversalTime().ToString("dd MMMM HH:mm UTC"),
Font = OsuFont.Torus.With(size: 20, weight: FontWeight.Light),
},
}
}
};
}
}
private class TeamWithPlayers : CompositeDrawable
{
private readonly Color4 red = new Color4(129, 68, 65, 255);
private readonly Color4 blue = new Color4(41, 91, 97, 255);
public TeamWithPlayers(TournamentTeam team, bool left = false)
{
var colour = left ? red : blue;
FillFlowContainer players;
var colour = left ? TournamentGame.COLOUR_RED : TournamentGame.COLOUR_BLUE;
InternalChildren = new Drawable[]
{
new TeamDisplay(team, left ? "Team Red" : "Team Blue", colour)
{
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
},
new FillFlowContainer
{
Direction = FillDirection.Vertical,
AutoSizeAxes = Axes.Both,
Spacing = new Vector2(0, 5),
Padding = new MarginPadding(20),
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
RelativePositionAxes = Axes.Both,
},
};
}
private class TeamDisplay : DrawableTournamentTeam
{
public TeamDisplay(TournamentTeam team, string teamName, Color4 colour)
: base(team)
{
AutoSizeAxes = Axes.Both;
Flag.Anchor = Flag.Origin = Anchor.TopCentre;
Flag.RelativeSizeAxes = Axes.None;
Flag.Size = new Vector2(300, 200);
Flag.Scale = new Vector2(0.4f);
Flag.Margin = new MarginPadding { Bottom = 20 };
InternalChild = new FillFlowContainer
{
AutoSizeAxes = Axes.Both,
Direction = FillDirection.Vertical,
Spacing = new Vector2(0, 5),
Children = new Drawable[]
{
Flag,
new OsuSpriteText
new TournamentSpriteText
{
Text = team?.FullName.Value.ToUpper() ?? "???",
Font = OsuFont.Torus.With(size: 40, weight: FontWeight.Light),
Text = "WINNER",
Font = OsuFont.Torus.With(size: 24, weight: FontWeight.SemiBold),
Colour = Color4.Black,
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre,
},
new OsuSpriteText
new TournamentSpriteText
{
Text = teamName.ToUpper(),
Font = OsuFont.GetFont(size: 20),
Colour = colour,
Origin = Anchor.TopCentre,
Anchor = Anchor.TopCentre,
}
Text = team?.FullName.Value ?? "???",
Font = OsuFont.Torus.With(size: 30, weight: FontWeight.SemiBold),
Colour = Color4.Black,
},
players = new FillFlowContainer
{
Direction = FillDirection.Vertical,
AutoSizeAxes = Axes.Both,
Padding = new MarginPadding { Top = 10 },
},
}
};
},
};
if (team != null)
{
foreach (var p in team.Players)
{
players.Add(new TournamentSpriteText
{
Text = p.Username,
Font = OsuFont.Torus.With(size: 24),
Colour = colour,
Anchor = left ? Anchor.CentreRight : Anchor.CentreLeft,
Origin = left ? Anchor.CentreRight : Anchor.CentreLeft,
});
}
}
}
}
private class TeamFlagDisplay : DrawableTournamentTeam
{
public TeamFlagDisplay(TournamentTeam team)
: base(team)
{
InternalChildren = new Drawable[]
{
Flag
};
}
}
}
}

View File

@ -3,11 +3,15 @@
using osu.Framework.Graphics;
using osu.Game.Graphics.Cursor;
using osuTK.Graphics;
namespace osu.Game.Tournament
{
public class TournamentGame : TournamentGameBase
{
public static readonly Color4 COLOUR_RED = new Color4(144, 0, 0, 255);
public static readonly Color4 COLOUR_BLUE = new Color4(0, 84, 144, 255);
protected override void LoadComplete()
{
base.LoadComplete();

View File

@ -18,7 +18,6 @@ using osu.Framework.IO.Stores;
using osu.Framework.Platform;
using osu.Game.Beatmaps;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Online.API.Requests;
using osu.Game.Tournament.IPC;
using osu.Game.Tournament.Models;
@ -101,10 +100,10 @@ namespace osu.Game.Tournament
Colour = Color4.Red,
RelativeSizeAxes = Axes.Both,
},
new OsuSpriteText
new TournamentSpriteText
{
Text = "Please make the window wider",
Font = OsuFont.Default.With(weight: "bold"),
Font = OsuFont.Torus.With(weight: FontWeight.Bold),
Colour = Color4.White,
Padding = new MarginPadding(20)
}

View File

@ -61,7 +61,7 @@ namespace osu.Game.Tournament
//Masking = true,
Children = new Drawable[]
{
video = new TourneyVideo(storage.GetStream("BG Logoless - OWC.m4v"))
video = new TourneyVideo(storage.GetStream("videos/main.m4v"))
{
Loop = true,
RelativeSizeAxes = Axes.Both,

View File

@ -59,7 +59,7 @@ namespace osu.Game.Overlays.BeatmapSet
if (online.Ranked.HasValue)
{
fields.Add(new Field("ranked", online.Ranked.Value, OsuFont.GetFont(weight: FontWeight.Bold)));
fields.Add(new Field(online.Status.ToString().ToLowerInvariant(), online.Ranked.Value, OsuFont.GetFont(weight: FontWeight.Bold)));
}
else if (online.LastUpdated.HasValue)
{