Add test videos and adjust alignment to match

This commit is contained in:
Dean Herbert 2018-10-18 02:18:09 +09:00
parent 7a753ad9e2
commit 12c0b2c37d
4 changed files with 25 additions and 14 deletions

View File

@ -6,6 +6,7 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Video;
using osu.Game.Graphics.UserInterface;
using osu.Game.Tournament.Screens.Ladder;
using osu.Game.Tournament.Screens.TeamIntro;
@ -53,16 +54,18 @@ private void load()
new Container
{
RelativeSizeAxes = Axes.Both,
FillMode = FillMode.Fit,
FillAspectRatio = 16/9f,
Anchor = Anchor.TopRight,
Origin = Anchor.TopRight,
Size = new Vector2(0.8f),
Size = new Vector2(0.8f, 1),
Masking = true,
Children = new Drawable[]
{
new Box
new VideoSprite(@"C:\Users\Dean\BG Side Logo - OWC.m4v")
{
Colour = Color4.White,
RelativeSizeAxes = Axes.Both,
FillMode = FillMode.Fit,
},
screens = new Container
{
@ -71,12 +74,15 @@ private void load()
{
bracket = new LadderManager(Ladder),
mapPool = new MapPoolScreen(Ladder.Groupings.First(g => g.Name == "Finals")),
teamIntro = new TeamIntroScreen(Ladder.Teams.First(t => t.Acronym == "USA"), Ladder.Teams.First(t => t.Acronym == "JPN"), Ladder.Groupings.First(g => g.Name == "Finals"))
teamIntro = new TeamIntroScreen(Ladder.Teams.First(t => t.Acronym == "USA"), Ladder.Teams.First(t => t.Acronym == "JPN"),
Ladder.Groupings.First(g => g.Name == "Finals"))
}
},
}
},
};
setScreen(teamIntro);
}
private void setScreen(Drawable screen)

View File

@ -3,6 +3,7 @@
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Tournament.Screens.TeamIntro;
namespace osu.Game.Tournament.Tests
@ -17,7 +18,11 @@ private void load()
var round = Ladder.Groupings.First(g => g.Name == "Finals");
Add(new TeamIntroScreen(team1, team2, round));
Add(new TeamIntroScreen(team1, team2, round)
{
FillMode = FillMode.Fit,
FillAspectRatio = 16 / 9f
});
}
}
}

View File

@ -3,7 +3,7 @@
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Video;
using osu.Game.Graphics;
using osu.Game.Graphics.Sprites;
using osu.Game.Screens;
@ -22,15 +22,14 @@ public TeamIntroScreen(TournamentTeam team1, TournamentTeam team2, TournamentGro
InternalChildren = new Drawable[]
{
new Box
new VideoSprite(@"C:\Users\Dean\BG Team - Both OWC.m4v")
{
Colour = Color4.White,
RelativeSizeAxes = Axes.Both
RelativeSizeAxes = Axes.Both,
Loop = true,
},
new TeamWithPlayers(team1, true)
{
RelativeSizeAxes = Axes.Both,
Margin = new MarginPadding(40),
Width = 0.5f,
Height = 0.6f,
Anchor = Anchor.Centre,
@ -39,7 +38,6 @@ public TeamIntroScreen(TournamentTeam team1, TournamentTeam team2, TournamentGro
new TeamWithPlayers(team2)
{
RelativeSizeAxes = Axes.Both,
Margin = new MarginPadding(40),
Width = 0.5f,
Height = 0.6f,
Anchor = Anchor.Centre,
@ -48,7 +46,7 @@ public TeamIntroScreen(TournamentTeam team1, TournamentTeam team2, TournamentGro
new RoundDisplay(round)
{
RelativeSizeAxes = Axes.Both,
Height = 0.3f,
Height = 0.25f,
Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre,
}
@ -119,7 +117,9 @@ public TeamWithPlayers(TournamentTeam team, bool left = false)
new TeamDisplay(team, left ? "Team Red" : "Team Blue", colour)
{
Anchor = left ? Anchor.CentreRight : Anchor.CentreLeft,
Origin = left ? Anchor.CentreRight : Anchor.CentreLeft,
Origin = Anchor.Centre,
RelativePositionAxes = Axes.Both,
X = (left ? -1 : 1) * 0.36f,
},
players = new FillFlowContainer
{

View File

@ -18,7 +18,7 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.1.4" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" />
<PackageReference Include="ppy.osu.Framework" Version="2018.1012.0" />
<PackageReference Include="ppy.osu.Framework" Version="0.0.7422" />
<PackageReference Include="SharpCompress" Version="0.22.0" />
<PackageReference Include="NUnit" Version="3.11.0" />
<PackageReference Include="SharpRaven" Version="2.4.0" />