mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 05:33:07 +08:00
Merge remote-tracking branch 'refs/remotes/ppy/master' into user-cards-update
This commit is contained in:
commit
1bdbe7c823
@ -21,6 +21,7 @@ namespace osu.Game.Tournament.Tests.Screens
|
|||||||
match.Team1.Value = Ladder.Teams.FirstOrDefault(t => t.Acronym.Value == "USA");
|
match.Team1.Value = Ladder.Teams.FirstOrDefault(t => t.Acronym.Value == "USA");
|
||||||
match.Team2.Value = Ladder.Teams.FirstOrDefault(t => t.Acronym.Value == "JPN");
|
match.Team2.Value = Ladder.Teams.FirstOrDefault(t => t.Acronym.Value == "JPN");
|
||||||
match.Round.Value = Ladder.Rounds.FirstOrDefault(g => g.Name.Value == "Finals");
|
match.Round.Value = Ladder.Rounds.FirstOrDefault(g => g.Name.Value == "Finals");
|
||||||
|
match.Completed.Value = true;
|
||||||
ladder.CurrentMatch.Value = match;
|
ladder.CurrentMatch.Value = match;
|
||||||
|
|
||||||
Add(new TeamWinScreen
|
Add(new TeamWinScreen
|
||||||
|
@ -5,7 +5,6 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
@ -35,7 +34,7 @@ namespace osu.Game.Tournament.Components
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = new Color4(54, 54, 54, 255)
|
Colour = new Color4(54, 54, 54, 255)
|
||||||
},
|
},
|
||||||
new OsuSpriteText
|
new TournamentSpriteText
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
|
@ -9,7 +9,6 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.Textures;
|
using osu.Framework.Graphics.Textures;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
using osu.Game.Tournament.Models;
|
using osu.Game.Tournament.Models;
|
||||||
|
|
||||||
namespace osu.Game.Tournament.Components
|
namespace osu.Game.Tournament.Components
|
||||||
@ -19,7 +18,7 @@ namespace osu.Game.Tournament.Components
|
|||||||
public readonly TournamentTeam Team;
|
public readonly TournamentTeam Team;
|
||||||
|
|
||||||
protected readonly Sprite Flag;
|
protected readonly Sprite Flag;
|
||||||
protected readonly OsuSpriteText AcronymText;
|
protected readonly TournamentSpriteText AcronymText;
|
||||||
|
|
||||||
[UsedImplicitly]
|
[UsedImplicitly]
|
||||||
private Bindable<string> acronym;
|
private Bindable<string> acronym;
|
||||||
@ -37,9 +36,9 @@ namespace osu.Game.Tournament.Components
|
|||||||
FillMode = FillMode.Fit
|
FillMode = FillMode.Fit
|
||||||
};
|
};
|
||||||
|
|
||||||
AcronymText = new OsuSpriteText
|
AcronymText = new TournamentSpriteText
|
||||||
{
|
{
|
||||||
Font = OsuFont.GetFont(weight: FontWeight.Regular),
|
Font = OsuFont.Torus.With(weight: FontWeight.Regular),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,7 +13,6 @@ using osu.Framework.Graphics.Sprites;
|
|||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Beatmaps.Legacy;
|
using osu.Game.Beatmaps.Legacy;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
using osu.Game.Rulesets;
|
using osu.Game.Rulesets;
|
||||||
using osu.Game.Screens.Menu;
|
using osu.Game.Screens.Menu;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
@ -262,7 +261,7 @@ namespace osu.Game.Tournament.Components
|
|||||||
static void cp(SpriteText s, Color4 colour)
|
static void cp(SpriteText s, Color4 colour)
|
||||||
{
|
{
|
||||||
s.Colour = 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++)
|
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(" ", 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)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -15,7 +15,6 @@ using osu.Framework.Localisation;
|
|||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Beatmaps.Drawables;
|
using osu.Game.Beatmaps.Drawables;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
using osu.Game.Tournament.Models;
|
using osu.Game.Tournament.Models;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
@ -77,14 +76,14 @@ namespace osu.Game.Tournament.Components
|
|||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuSpriteText
|
new TournamentSpriteText
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Text = new LocalisedString((
|
Text = new LocalisedString((
|
||||||
$"{Beatmap.Metadata.ArtistUnicode ?? Beatmap.Metadata.Artist} - {Beatmap.Metadata.TitleUnicode ?? Beatmap.Metadata.Title}",
|
$"{Beatmap.Metadata.ArtistUnicode ?? Beatmap.Metadata.Artist} - {Beatmap.Metadata.TitleUnicode ?? Beatmap.Metadata.Title}",
|
||||||
$"{Beatmap.Metadata.Artist} - {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
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
@ -95,28 +94,28 @@ namespace osu.Game.Tournament.Components
|
|||||||
Direction = FillDirection.Horizontal,
|
Direction = FillDirection.Horizontal,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuSpriteText
|
new TournamentSpriteText
|
||||||
{
|
{
|
||||||
Text = "mapper",
|
Text = "mapper",
|
||||||
Padding = new MarginPadding { Right = 5 },
|
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,
|
Text = Beatmap.Metadata.AuthorString,
|
||||||
Padding = new MarginPadding { Right = 20 },
|
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",
|
Text = "difficulty",
|
||||||
Padding = new MarginPadding { Right = 5 },
|
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,
|
Text = Beatmap.Version,
|
||||||
Font = OsuFont.GetFont(italics: true, weight: FontWeight.Bold, size: 14)
|
Font = OsuFont.Torus.With(weight: FontWeight.Bold, size: 14)
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,7 +8,6 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
using osu.Game.Tournament.Components;
|
using osu.Game.Tournament.Components;
|
||||||
using osu.Game.Tournament.Models;
|
using osu.Game.Tournament.Models;
|
||||||
using osuTK;
|
using osuTK;
|
||||||
@ -43,7 +42,7 @@ namespace osu.Game.Tournament.Screens.Drawings.Components
|
|||||||
Colour = new Color4(54, 54, 54, 255)
|
Colour = new Color4(54, 54, 54, 255)
|
||||||
},
|
},
|
||||||
// Group name
|
// Group name
|
||||||
new OsuSpriteText
|
new TournamentSpriteText
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
@ -51,7 +50,7 @@ namespace osu.Game.Tournament.Screens.Drawings.Components
|
|||||||
Position = new Vector2(0, 7f),
|
Position = new Vector2(0, 7f),
|
||||||
|
|
||||||
Text = $"GROUP {name.ToUpperInvariant()}",
|
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),
|
Colour = new Color4(255, 204, 34, 255),
|
||||||
},
|
},
|
||||||
teams = new FillFlowContainer<GroupTeam>
|
teams = new FillFlowContainer<GroupTeam>
|
||||||
@ -134,7 +133,7 @@ namespace osu.Game.Tournament.Screens.Drawings.Components
|
|||||||
AcronymText.Anchor = Anchor.TopCentre;
|
AcronymText.Anchor = Anchor.TopCentre;
|
||||||
AcronymText.Origin = Anchor.TopCentre;
|
AcronymText.Origin = Anchor.TopCentre;
|
||||||
AcronymText.Text = team.Acronym.Value.ToUpperInvariant();
|
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[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,6 @@ using osu.Framework.Graphics.Textures;
|
|||||||
using osu.Framework.Logging;
|
using osu.Framework.Logging;
|
||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
using osu.Game.Tournament.Components;
|
using osu.Game.Tournament.Components;
|
||||||
using osu.Game.Tournament.Models;
|
using osu.Game.Tournament.Models;
|
||||||
using osu.Game.Tournament.Screens.Drawings.Components;
|
using osu.Game.Tournament.Screens.Drawings.Components;
|
||||||
@ -29,7 +28,7 @@ namespace osu.Game.Tournament.Screens.Drawings
|
|||||||
|
|
||||||
private ScrollingTeamContainer teamsContainer;
|
private ScrollingTeamContainer teamsContainer;
|
||||||
private GroupContainer groupsContainer;
|
private GroupContainer groupsContainer;
|
||||||
private OsuSpriteText fullTeamNameText;
|
private TournamentSpriteText fullTeamNameText;
|
||||||
|
|
||||||
private readonly List<TournamentTeam> allTeams = new List<TournamentTeam>();
|
private readonly List<TournamentTeam> allTeams = new List<TournamentTeam>();
|
||||||
|
|
||||||
@ -109,18 +108,18 @@ namespace osu.Game.Tournament.Screens.Drawings
|
|||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
},
|
},
|
||||||
// Scrolling team name
|
// Scrolling team name
|
||||||
fullTeamNameText = new OsuSpriteText
|
fullTeamNameText = new TournamentSpriteText
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
|
|
||||||
Position = new Vector2(0, 45f),
|
Position = new Vector2(0, 45f),
|
||||||
|
|
||||||
Colour = OsuColour.Gray(0.33f),
|
Colour = OsuColour.Gray(0.95f),
|
||||||
|
|
||||||
Alpha = 0,
|
Alpha = 0,
|
||||||
|
|
||||||
Font = OsuFont.GetFont(weight: FontWeight.Light, size: 42),
|
Font = OsuFont.Torus.With(weight: FontWeight.Light, size: 42),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -5,9 +5,9 @@ using osu.Framework.Allocation;
|
|||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Tournament.Components;
|
using osu.Game.Tournament.Components;
|
||||||
using osu.Game.Tournament.Models;
|
using osu.Game.Tournament.Models;
|
||||||
@ -30,7 +30,7 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
|
|||||||
new TournamentLogo(),
|
new TournamentLogo(),
|
||||||
new RoundDisplay
|
new RoundDisplay
|
||||||
{
|
{
|
||||||
Y = 10,
|
Y = 5,
|
||||||
Anchor = Anchor.BottomCentre,
|
Anchor = Anchor.BottomCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
},
|
},
|
||||||
@ -51,9 +51,6 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
|
|||||||
{
|
{
|
||||||
private readonly TeamColour teamColour;
|
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<TournamentMatch> currentMatch = new Bindable<TournamentMatch>();
|
||||||
private readonly Bindable<TournamentTeam> currentTeam = new Bindable<TournamentTeam>();
|
private readonly Bindable<TournamentTeam> currentTeam = new Bindable<TournamentTeam>();
|
||||||
private readonly Bindable<int?> currentTeamScore = new Bindable<int?>();
|
private readonly Bindable<int?> currentTeamScore = new Bindable<int?>();
|
||||||
@ -106,7 +103,7 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
|
|||||||
|
|
||||||
private void teamChanged(TournamentTeam team)
|
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;
|
var flip = teamColour != TeamColour.Red;
|
||||||
|
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
@ -169,7 +166,7 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
|
|||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
Flag,
|
Flag,
|
||||||
new OsuSpriteText
|
new TournamentSpriteText
|
||||||
{
|
{
|
||||||
Text = team?.FullName.Value.ToUpper() ?? "???",
|
Text = team?.FullName.Value.ToUpper() ?? "???",
|
||||||
X = (flip ? -1 : 1) * 90,
|
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 Bindable<TournamentMatch> currentMatch = new Bindable<TournamentMatch>();
|
||||||
|
|
||||||
|
private readonly TournamentSpriteText text;
|
||||||
|
|
||||||
public RoundDisplay()
|
public RoundDisplay()
|
||||||
{
|
{
|
||||||
Width = 200;
|
Width = 200;
|
||||||
Height = 20;
|
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]
|
[BackgroundDependencyLoader]
|
||||||
@ -201,20 +219,8 @@ namespace osu.Game.Tournament.Screens.Gameplay.Components
|
|||||||
currentMatch.BindTo(ladder.CurrentMatch);
|
currentMatch.BindTo(ladder.CurrentMatch);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void matchChanged(ValueChangedEvent<TournamentMatch> match)
|
private void matchChanged(ValueChangedEvent<TournamentMatch> match) =>
|
||||||
{
|
text.Text = match.NewValue.Round.Value?.Name.Value ?? "Unknown Round";
|
||||||
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),
|
|
||||||
},
|
|
||||||
};
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,7 +11,6 @@ using osu.Framework.Graphics.Shapes;
|
|||||||
using osu.Framework.Graphics.UserInterface;
|
using osu.Framework.Graphics.UserInterface;
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Tournament.Components;
|
using osu.Game.Tournament.Components;
|
||||||
using osu.Game.Tournament.Models;
|
using osu.Game.Tournament.Models;
|
||||||
@ -26,7 +25,7 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
|||||||
{
|
{
|
||||||
private readonly TournamentMatch match;
|
private readonly TournamentMatch match;
|
||||||
private readonly bool losers;
|
private readonly bool losers;
|
||||||
private OsuSpriteText scoreText;
|
private TournamentSpriteText scoreText;
|
||||||
private Box background;
|
private Box background;
|
||||||
|
|
||||||
private readonly Bindable<int?> score = new Bindable<int?>();
|
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.Anchor = AcronymText.Origin = Anchor.CentreLeft;
|
||||||
AcronymText.Padding = new MarginPadding { Left = 50 };
|
AcronymText.Padding = new MarginPadding { Left = 50 };
|
||||||
AcronymText.Font = OsuFont.GetFont(size: 24);
|
AcronymText.Font = OsuFont.Torus.With(size: 24);
|
||||||
|
|
||||||
if (match != null)
|
if (match != null)
|
||||||
{
|
{
|
||||||
@ -119,11 +118,11 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
|||||||
Alpha = 0.8f,
|
Alpha = 0.8f,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
},
|
},
|
||||||
scoreText = new OsuSpriteText
|
scoreText = new TournamentSpriteText
|
||||||
{
|
{
|
||||||
Anchor = Anchor.Centre,
|
Anchor = Anchor.Centre,
|
||||||
Origin = 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);
|
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
|
public MenuItem[] ContextMenuItems
|
||||||
|
@ -6,7 +6,6 @@ using osu.Framework.Bindables;
|
|||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
using osu.Game.Tournament.Models;
|
using osu.Game.Tournament.Models;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
@ -22,8 +21,8 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
|||||||
|
|
||||||
public DrawableTournamentRound(TournamentRound round, bool losers = false)
|
public DrawableTournamentRound(TournamentRound round, bool losers = false)
|
||||||
{
|
{
|
||||||
OsuSpriteText textName;
|
TournamentSpriteText textName;
|
||||||
OsuSpriteText textDescription;
|
TournamentSpriteText textDescription;
|
||||||
|
|
||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
InternalChild = new FillFlowContainer
|
InternalChild = new FillFlowContainer
|
||||||
@ -32,15 +31,15 @@ namespace osu.Game.Tournament.Screens.Ladder.Components
|
|||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
textDescription = new OsuSpriteText
|
textDescription = new TournamentSpriteText
|
||||||
{
|
{
|
||||||
Colour = Color4.Black,
|
Colour = Color4.Black,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Anchor = 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,
|
Colour = Color4.Black,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Anchor = Anchor.TopCentre
|
Anchor = Anchor.TopCentre
|
||||||
|
@ -42,7 +42,7 @@ namespace osu.Game.Tournament.Screens.Ladder
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new TourneyVideo(storage.GetStream(@"BG Side Logo - OWC.m4v"))
|
new TourneyVideo(storage.GetStream(@"videos/ladder.m4v"))
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Loop = true,
|
Loop = true,
|
||||||
|
@ -9,7 +9,6 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Framework.Threading;
|
using osu.Framework.Threading;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Tournament.Components;
|
using osu.Game.Tournament.Components;
|
||||||
using osu.Game.Tournament.IPC;
|
using osu.Game.Tournament.IPC;
|
||||||
@ -56,7 +55,7 @@ namespace osu.Game.Tournament.Screens.MapPool
|
|||||||
{
|
{
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuSpriteText
|
new TournamentSpriteText
|
||||||
{
|
{
|
||||||
Text = "Current Mode"
|
Text = "Current Mode"
|
||||||
},
|
},
|
||||||
|
@ -10,7 +10,6 @@ using osu.Framework.Graphics.Containers;
|
|||||||
using osu.Framework.Graphics.Shapes;
|
using osu.Framework.Graphics.Shapes;
|
||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
using osu.Game.Tournament.Components;
|
using osu.Game.Tournament.Components;
|
||||||
using osu.Game.Tournament.Models;
|
using osu.Game.Tournament.Models;
|
||||||
using osu.Game.Tournament.Screens.Ladder.Components;
|
using osu.Game.Tournament.Screens.Ladder.Components;
|
||||||
@ -34,7 +33,7 @@ namespace osu.Game.Tournament.Screens.Schedule
|
|||||||
|
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
new TourneyVideo(storage.GetStream(@"BG Side Logo - OWC.m4v"))
|
new TourneyVideo(storage.GetStream(@"videos/schedule.m4v"))
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Loop = true,
|
Loop = true,
|
||||||
@ -107,20 +106,20 @@ namespace osu.Game.Tournament.Screens.Schedule
|
|||||||
Height = 0.25f,
|
Height = 0.25f,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuSpriteText
|
new TournamentSpriteText
|
||||||
{
|
{
|
||||||
Margin = new MarginPadding { Left = -10, Bottom = 10, Top = -5 },
|
Margin = new MarginPadding { Left = -10, Bottom = 10, Top = -5 },
|
||||||
Spacing = new Vector2(10, 0),
|
Spacing = new Vector2(10, 0),
|
||||||
Text = match.NewValue.Round.Value?.Name.Value,
|
Text = match.NewValue.Round.Value?.Name.Value,
|
||||||
Colour = Color4.Black,
|
Colour = Color4.Black,
|
||||||
Font = OsuFont.GetFont(size: 20)
|
Font = OsuFont.Torus.With(size: 20)
|
||||||
},
|
},
|
||||||
new ScheduleMatch(match.NewValue, false),
|
new ScheduleMatch(match.NewValue, false),
|
||||||
new OsuSpriteText
|
new TournamentSpriteText
|
||||||
{
|
{
|
||||||
Text = "Start Time " + match.NewValue.Date.Value.ToUniversalTime().ToString("HH:mm UTC"),
|
Text = "Start Time " + match.NewValue.Date.Value.ToUniversalTime().ToString("HH:mm UTC"),
|
||||||
Colour = Color4.Black,
|
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,
|
Alpha = conditional ? 0.6f : 1,
|
||||||
Margin = new MarginPadding { Horizontal = 10, Vertical = 5 },
|
Margin = new MarginPadding { Horizontal = 10, Vertical = 5 },
|
||||||
});
|
});
|
||||||
AddInternal(new OsuSpriteText
|
AddInternal(new TournamentSpriteText
|
||||||
{
|
{
|
||||||
Anchor = Anchor.BottomRight,
|
Anchor = Anchor.BottomRight,
|
||||||
Origin = Anchor.BottomLeft,
|
Origin = Anchor.BottomLeft,
|
||||||
@ -174,13 +173,13 @@ namespace osu.Game.Tournament.Screens.Schedule
|
|||||||
Padding = new MarginPadding { Left = 30, Top = 30 };
|
Padding = new MarginPadding { Left = 30, Top = 30 };
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuSpriteText
|
new TournamentSpriteText
|
||||||
{
|
{
|
||||||
X = 30,
|
X = 30,
|
||||||
Text = title,
|
Text = title,
|
||||||
Colour = Color4.Black,
|
Colour = Color4.Black,
|
||||||
Spacing = new Vector2(10, 0),
|
Spacing = new Vector2(10, 0),
|
||||||
Font = OsuFont.GetFont(size: 30)
|
Font = OsuFont.Torus.With(size: 30)
|
||||||
},
|
},
|
||||||
content = new FillFlowContainer
|
content = new FillFlowContainer
|
||||||
{
|
{
|
||||||
|
@ -6,7 +6,6 @@ using System.Collections.Generic;
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
using osu.Game.Graphics.UserInterface;
|
using osu.Game.Graphics.UserInterface;
|
||||||
using osu.Game.Graphics.UserInterfaceV2;
|
using osu.Game.Graphics.UserInterfaceV2;
|
||||||
using osu.Game.Online.API;
|
using osu.Game.Online.API;
|
||||||
@ -147,7 +146,7 @@ namespace osu.Game.Tournament.Screens
|
|||||||
|
|
||||||
public Action Action;
|
public Action Action;
|
||||||
|
|
||||||
private OsuSpriteText valueText;
|
private TournamentSpriteText valueText;
|
||||||
|
|
||||||
protected override Drawable CreateComponent() => new Container
|
protected override Drawable CreateComponent() => new Container
|
||||||
{
|
{
|
||||||
@ -155,7 +154,7 @@ namespace osu.Game.Tournament.Screens
|
|||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
valueText = new OsuSpriteText
|
valueText = new TournamentSpriteText
|
||||||
{
|
{
|
||||||
Anchor = Anchor.CentreLeft,
|
Anchor = Anchor.CentreLeft,
|
||||||
Origin = Anchor.CentreLeft,
|
Origin = Anchor.CentreLeft,
|
||||||
|
@ -10,7 +10,7 @@ namespace osu.Game.Tournament.Screens.Showcase
|
|||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
private void load()
|
private void load()
|
||||||
{
|
{
|
||||||
AddInternal(new TournamentLogo(false));
|
AddInternal(new TournamentLogo());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -11,20 +11,12 @@ namespace osu.Game.Tournament.Screens.Showcase
|
|||||||
{
|
{
|
||||||
public class TournamentLogo : CompositeDrawable
|
public class TournamentLogo : CompositeDrawable
|
||||||
{
|
{
|
||||||
public TournamentLogo(bool includeRoundBackground = true)
|
public TournamentLogo()
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X;
|
RelativeSizeAxes = Axes.X;
|
||||||
Margin = new MarginPadding { Vertical = 5 };
|
Margin = new MarginPadding { Vertical = 5 };
|
||||||
|
|
||||||
if (includeRoundBackground)
|
Height = 100;
|
||||||
{
|
|
||||||
AutoSizeAxes = Axes.Y;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Masking = true;
|
|
||||||
Height = 100;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
[BackgroundDependencyLoader]
|
||||||
@ -32,9 +24,11 @@ namespace osu.Game.Tournament.Screens.Showcase
|
|||||||
{
|
{
|
||||||
InternalChild = new Sprite
|
InternalChild = new Sprite
|
||||||
{
|
{
|
||||||
Texture = textures.Get("game-screen-logo"),
|
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
|
FillMode = FillMode.Fit,
|
||||||
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
Texture = textures.Get("game-screen-logo"),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,12 +7,9 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
using osu.Game.Tournament.Components;
|
using osu.Game.Tournament.Components;
|
||||||
using osu.Game.Tournament.Models;
|
using osu.Game.Tournament.Models;
|
||||||
using osu.Game.Tournament.Screens.Showcase;
|
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
|
||||||
|
|
||||||
namespace osu.Game.Tournament.Screens.TeamIntro
|
namespace osu.Game.Tournament.Screens.TeamIntro
|
||||||
{
|
{
|
||||||
@ -29,12 +26,11 @@ namespace osu.Game.Tournament.Screens.TeamIntro
|
|||||||
|
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
new TourneyVideo(storage.GetStream(@"BG Team - Both OWC.m4v"))
|
new TourneyVideo(storage.GetStream(@"videos/teamintro.m4v"))
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Loop = true,
|
Loop = true,
|
||||||
},
|
},
|
||||||
new TournamentLogo(false),
|
|
||||||
mainContainer = new Container
|
mainContainer = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
@ -75,8 +71,9 @@ namespace osu.Game.Tournament.Screens.TeamIntro
|
|||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Height = 0.25f,
|
Height = 0.25f,
|
||||||
Anchor = Anchor.BottomCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.BottomCentre,
|
Origin = Anchor.TopCentre,
|
||||||
|
Y = 180,
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@ -85,8 +82,6 @@ namespace osu.Game.Tournament.Screens.TeamIntro
|
|||||||
{
|
{
|
||||||
public RoundDisplay(TournamentMatch match)
|
public RoundDisplay(TournamentMatch match)
|
||||||
{
|
{
|
||||||
var col = OsuColour.Gray(0.33f);
|
|
||||||
|
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
new FillFlowContainer
|
new FillFlowContainer
|
||||||
@ -98,31 +93,13 @@ namespace osu.Game.Tournament.Screens.TeamIntro
|
|||||||
Spacing = new Vector2(0, 10),
|
Spacing = new Vector2(0, 10),
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new OsuSpriteText
|
new TournamentSpriteText
|
||||||
{
|
{
|
||||||
Anchor = Anchor.TopCentre,
|
Anchor = Anchor.TopCentre,
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Colour = col,
|
Colour = OsuColour.Gray(0.33f),
|
||||||
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,
|
|
||||||
Text = match.Round.Value?.Name.Value ?? "Unknown Round",
|
Text = match.Round.Value?.Name.Value ?? "Unknown Round",
|
||||||
Spacing = new Vector2(10, 0),
|
Font = OsuFont.Torus.With(size: 26, weight: FontWeight.Light)
|
||||||
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)
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -132,21 +109,19 @@ namespace osu.Game.Tournament.Screens.TeamIntro
|
|||||||
|
|
||||||
private class TeamWithPlayers : CompositeDrawable
|
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)
|
public TeamWithPlayers(TournamentTeam team, bool left = false)
|
||||||
{
|
{
|
||||||
FillFlowContainer players;
|
FillFlowContainer players;
|
||||||
var colour = left ? red : blue;
|
var colour = left ? TournamentGame.COLOUR_RED : TournamentGame.COLOUR_BLUE;
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
new TeamDisplay(team, left ? "Team Red" : "Team Blue", colour)
|
new TeamDisplay(team)
|
||||||
{
|
{
|
||||||
Anchor = left ? Anchor.CentreRight : Anchor.CentreLeft,
|
Anchor = left ? Anchor.CentreRight : Anchor.CentreLeft,
|
||||||
Origin = Anchor.Centre,
|
Origin = Anchor.TopCentre,
|
||||||
RelativePositionAxes = Axes.Both,
|
RelativePositionAxes = Axes.Both,
|
||||||
X = (left ? -1 : 1) * 0.36f,
|
X = (left ? -1 : 1) * 0.3145f,
|
||||||
|
Y = -0.077f,
|
||||||
},
|
},
|
||||||
players = new FillFlowContainer
|
players = new FillFlowContainer
|
||||||
{
|
{
|
||||||
@ -157,7 +132,7 @@ namespace osu.Game.Tournament.Screens.TeamIntro
|
|||||||
Anchor = left ? Anchor.CentreRight : Anchor.CentreLeft,
|
Anchor = left ? Anchor.CentreRight : Anchor.CentreLeft,
|
||||||
Origin = left ? Anchor.CentreRight : Anchor.CentreLeft,
|
Origin = left ? Anchor.CentreRight : Anchor.CentreLeft,
|
||||||
RelativePositionAxes = Axes.Both,
|
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)
|
foreach (var p in team.Players)
|
||||||
{
|
{
|
||||||
players.Add(new OsuSpriteText
|
players.Add(new TournamentSpriteText
|
||||||
{
|
{
|
||||||
Text = p.Username,
|
Text = p.Username,
|
||||||
Font = OsuFont.GetFont(size: 24),
|
Font = OsuFont.Torus.With(size: 24),
|
||||||
Colour = colour,
|
Colour = colour,
|
||||||
Anchor = left ? Anchor.CentreRight : Anchor.CentreLeft,
|
Anchor = left ? Anchor.CentreRight : Anchor.CentreLeft,
|
||||||
Origin = 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
|
private class TeamDisplay : DrawableTournamentTeam
|
||||||
{
|
{
|
||||||
public TeamDisplay(TournamentTeam team, string teamName, Color4 colour)
|
public TeamDisplay(TournamentTeam team)
|
||||||
: base(team)
|
: base(team)
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both;
|
AutoSizeAxes = Axes.Both;
|
||||||
@ -187,33 +162,24 @@ namespace osu.Game.Tournament.Screens.TeamIntro
|
|||||||
Flag.Anchor = Flag.Origin = Anchor.TopCentre;
|
Flag.Anchor = Flag.Origin = Anchor.TopCentre;
|
||||||
Flag.RelativeSizeAxes = Axes.None;
|
Flag.RelativeSizeAxes = Axes.None;
|
||||||
Flag.Size = new Vector2(300, 200);
|
Flag.Size = new Vector2(300, 200);
|
||||||
Flag.Scale = new Vector2(0.4f);
|
Flag.Scale = new Vector2(0.32f);
|
||||||
Flag.Margin = new MarginPadding { Bottom = 20 };
|
|
||||||
|
|
||||||
InternalChild = new FillFlowContainer
|
InternalChild = new FillFlowContainer
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Both,
|
AutoSizeAxes = Axes.Both,
|
||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
Spacing = new Vector2(0, 5),
|
Spacing = new Vector2(160),
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
Flag,
|
Flag,
|
||||||
new OsuSpriteText
|
new TournamentSpriteText
|
||||||
{
|
{
|
||||||
Text = team?.FullName.Value.ToUpper() ?? "???",
|
Text = team?.FullName.Value ?? "???",
|
||||||
Font = OsuFont.Torus.With(size: 40, weight: FontWeight.Light),
|
Font = OsuFont.Torus.With(size: 20, weight: FontWeight.Regular),
|
||||||
Colour = Color4.Black,
|
Colour = OsuColour.Gray(0.2f),
|
||||||
Origin = Anchor.TopCentre,
|
Origin = Anchor.TopCentre,
|
||||||
Anchor = 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,
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -7,10 +7,8 @@ using osu.Framework.Graphics;
|
|||||||
using osu.Framework.Graphics.Containers;
|
using osu.Framework.Graphics.Containers;
|
||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
using osu.Game.Tournament.Components;
|
using osu.Game.Tournament.Components;
|
||||||
using osu.Game.Tournament.Models;
|
using osu.Game.Tournament.Models;
|
||||||
using osu.Game.Tournament.Screens.Showcase;
|
|
||||||
using osuTK;
|
using osuTK;
|
||||||
using osuTK.Graphics;
|
using osuTK.Graphics;
|
||||||
|
|
||||||
@ -33,22 +31,18 @@ namespace osu.Game.Tournament.Screens.TeamWin
|
|||||||
|
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
blueWinVideo = new TourneyVideo(storage.GetStream(@"BG Team - Win Blue.m4v"))
|
blueWinVideo = new TourneyVideo(storage.GetStream(@"videos/teamwin-blue.m4v"))
|
||||||
{
|
{
|
||||||
Alpha = 1,
|
Alpha = 1,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Loop = true,
|
Loop = true,
|
||||||
},
|
},
|
||||||
redWinVideo = new TourneyVideo(storage.GetStream(@"BG Team - Win Red.m4v"))
|
redWinVideo = new TourneyVideo(storage.GetStream(@"videos/teamwin-red.m4v"))
|
||||||
{
|
{
|
||||||
Alpha = 0,
|
Alpha = 0,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Loop = true,
|
Loop = true,
|
||||||
},
|
},
|
||||||
new TournamentLogo(false)
|
|
||||||
{
|
|
||||||
Y = 40,
|
|
||||||
},
|
|
||||||
mainContainer = new Container
|
mainContainer = new Container
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
@ -85,141 +79,99 @@ namespace osu.Game.Tournament.Screens.TeamWin
|
|||||||
|
|
||||||
mainContainer.Children = new Drawable[]
|
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)
|
new TeamWithPlayers(match.Winner, redWin)
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Width = 0.5f,
|
Width = 0.5f,
|
||||||
Height = 0.6f,
|
Height = 0.6f,
|
||||||
Anchor = Anchor.Centre,
|
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 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)
|
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[]
|
InternalChildren = new Drawable[]
|
||||||
{
|
{
|
||||||
new TeamDisplay(team, left ? "Team Red" : "Team Blue", colour)
|
|
||||||
{
|
|
||||||
Anchor = Anchor.Centre,
|
|
||||||
Origin = Anchor.Centre,
|
|
||||||
},
|
|
||||||
new FillFlowContainer
|
new FillFlowContainer
|
||||||
{
|
{
|
||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
AutoSizeAxes = Axes.Both,
|
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[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
Flag,
|
new TournamentSpriteText
|
||||||
new OsuSpriteText
|
|
||||||
{
|
{
|
||||||
Text = team?.FullName.Value.ToUpper() ?? "???",
|
Text = "WINNER",
|
||||||
Font = OsuFont.Torus.With(size: 40, weight: FontWeight.Light),
|
Font = OsuFont.Torus.With(size: 24, weight: FontWeight.SemiBold),
|
||||||
Colour = Color4.Black,
|
Colour = Color4.Black,
|
||||||
Origin = Anchor.TopCentre,
|
|
||||||
Anchor = Anchor.TopCentre,
|
|
||||||
},
|
},
|
||||||
new OsuSpriteText
|
new TournamentSpriteText
|
||||||
{
|
{
|
||||||
Text = teamName.ToUpper(),
|
Text = team?.FullName.Value ?? "???",
|
||||||
Font = OsuFont.GetFont(size: 20),
|
Font = OsuFont.Torus.With(size: 30, weight: FontWeight.SemiBold),
|
||||||
Colour = colour,
|
Colour = Color4.Black,
|
||||||
Origin = Anchor.TopCentre,
|
},
|
||||||
Anchor = Anchor.TopCentre,
|
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
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -3,11 +3,15 @@
|
|||||||
|
|
||||||
using osu.Framework.Graphics;
|
using osu.Framework.Graphics;
|
||||||
using osu.Game.Graphics.Cursor;
|
using osu.Game.Graphics.Cursor;
|
||||||
|
using osuTK.Graphics;
|
||||||
|
|
||||||
namespace osu.Game.Tournament
|
namespace osu.Game.Tournament
|
||||||
{
|
{
|
||||||
public class TournamentGame : TournamentGameBase
|
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()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.LoadComplete();
|
base.LoadComplete();
|
||||||
|
@ -18,7 +18,6 @@ using osu.Framework.IO.Stores;
|
|||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
using osu.Game.Beatmaps;
|
using osu.Game.Beatmaps;
|
||||||
using osu.Game.Graphics;
|
using osu.Game.Graphics;
|
||||||
using osu.Game.Graphics.Sprites;
|
|
||||||
using osu.Game.Online.API.Requests;
|
using osu.Game.Online.API.Requests;
|
||||||
using osu.Game.Tournament.IPC;
|
using osu.Game.Tournament.IPC;
|
||||||
using osu.Game.Tournament.Models;
|
using osu.Game.Tournament.Models;
|
||||||
@ -101,10 +100,10 @@ namespace osu.Game.Tournament
|
|||||||
Colour = Color4.Red,
|
Colour = Color4.Red,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
},
|
},
|
||||||
new OsuSpriteText
|
new TournamentSpriteText
|
||||||
{
|
{
|
||||||
Text = "Please make the window wider",
|
Text = "Please make the window wider",
|
||||||
Font = OsuFont.Default.With(weight: "bold"),
|
Font = OsuFont.Torus.With(weight: FontWeight.Bold),
|
||||||
Colour = Color4.White,
|
Colour = Color4.White,
|
||||||
Padding = new MarginPadding(20)
|
Padding = new MarginPadding(20)
|
||||||
}
|
}
|
||||||
|
@ -61,7 +61,7 @@ namespace osu.Game.Tournament
|
|||||||
//Masking = true,
|
//Masking = true,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
video = new TourneyVideo(storage.GetStream("BG Logoless - OWC.m4v"))
|
video = new TourneyVideo(storage.GetStream("videos/main.m4v"))
|
||||||
{
|
{
|
||||||
Loop = true,
|
Loop = true,
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
|
@ -59,7 +59,7 @@ namespace osu.Game.Overlays.BeatmapSet
|
|||||||
|
|
||||||
if (online.Ranked.HasValue)
|
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)
|
else if (online.LastUpdated.HasValue)
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user