1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-26 18:52:55 +08:00

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

View File

@ -3,6 +3,7 @@
using System.Linq; using System.Linq;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Tournament.Screens.TeamIntro; using osu.Game.Tournament.Screens.TeamIntro;
namespace osu.Game.Tournament.Tests namespace osu.Game.Tournament.Tests
@ -17,7 +18,11 @@ namespace osu.Game.Tournament.Tests
var round = Ladder.Groupings.First(g => g.Name == "Finals"); 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;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes; using osu.Framework.Graphics.Video;
using osu.Game.Graphics; using osu.Game.Graphics;
using osu.Game.Graphics.Sprites; using osu.Game.Graphics.Sprites;
using osu.Game.Screens; using osu.Game.Screens;
@ -22,15 +22,14 @@ namespace osu.Game.Tournament.Screens.TeamIntro
InternalChildren = new Drawable[] 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) new TeamWithPlayers(team1, true)
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Margin = new MarginPadding(40),
Width = 0.5f, Width = 0.5f,
Height = 0.6f, Height = 0.6f,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
@ -39,7 +38,6 @@ namespace osu.Game.Tournament.Screens.TeamIntro
new TeamWithPlayers(team2) new TeamWithPlayers(team2)
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Margin = new MarginPadding(40),
Width = 0.5f, Width = 0.5f,
Height = 0.6f, Height = 0.6f,
Anchor = Anchor.Centre, Anchor = Anchor.Centre,
@ -48,7 +46,7 @@ namespace osu.Game.Tournament.Screens.TeamIntro
new RoundDisplay(round) new RoundDisplay(round)
{ {
RelativeSizeAxes = Axes.Both, RelativeSizeAxes = Axes.Both,
Height = 0.3f, Height = 0.25f,
Anchor = Anchor.BottomCentre, Anchor = Anchor.BottomCentre,
Origin = Anchor.BottomCentre, Origin = Anchor.BottomCentre,
} }
@ -119,7 +117,9 @@ namespace osu.Game.Tournament.Screens.TeamIntro
new TeamDisplay(team, left ? "Team Red" : "Team Blue", colour) new TeamDisplay(team, left ? "Team Red" : "Team Blue", colour)
{ {
Anchor = left ? Anchor.CentreRight : Anchor.CentreLeft, 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 players = new FillFlowContainer
{ {

View File

@ -18,7 +18,7 @@
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.4" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="2.1.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.1.4" /> <PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite.Core" Version="2.1.4" />
<PackageReference Include="Newtonsoft.Json" Version="11.0.2" /> <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="SharpCompress" Version="0.22.0" />
<PackageReference Include="NUnit" Version="3.11.0" /> <PackageReference Include="NUnit" Version="3.11.0" />
<PackageReference Include="SharpRaven" Version="2.4.0" /> <PackageReference Include="SharpRaven" Version="2.4.0" />