Merge pull request #8859 from MiraiSubject/showcase-video

Add background video for the Showcase Scene to the tournament client
This commit is contained in:
Dean Herbert
2020-04-27 09:40:38 +09:00
committed by GitHub
2 changed files with 32 additions and 5 deletions

View File

@ -22,7 +22,7 @@ namespace osu.Game.Tournament.Components
{ {
private BeatmapInfo beatmap; private BeatmapInfo beatmap;
private const float height = 145; public const float HEIGHT = 145 / 2f;
[Resolved] [Resolved]
private IBindable<RulesetInfo> ruleset { get; set; } private IBindable<RulesetInfo> ruleset { get; set; }
@ -157,7 +157,7 @@ namespace osu.Game.Tournament.Components
new Container new Container
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Height = height / 2, Height = HEIGHT,
Width = 0.5f, Width = 0.5f,
Anchor = Anchor.BottomRight, Anchor = Anchor.BottomRight,
Origin = Anchor.BottomRight, Origin = Anchor.BottomRight,
@ -229,7 +229,7 @@ namespace osu.Game.Tournament.Components
{ {
RelativeSizeAxes = Axes.X, RelativeSizeAxes = Axes.X,
Width = 0.5f, Width = 0.5f,
Height = height / 2, Height = HEIGHT,
Anchor = Anchor.BottomRight, Anchor = Anchor.BottomRight,
Origin = Anchor.BottomRight, Origin = Anchor.BottomRight,
} }

View File

@ -2,15 +2,42 @@
// See the LICENCE file in the repository root for full licence text. // See the LICENCE file in the repository root for full licence text.
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Game.Tournament.Components;
using osu.Framework.Graphics.Shapes;
using osuTK.Graphics;
namespace osu.Game.Tournament.Screens.Showcase namespace osu.Game.Tournament.Screens.Showcase
{ {
public class ShowcaseScreen : BeatmapInfoScreen public class ShowcaseScreen : BeatmapInfoScreen // IProvideVideo
{ {
[BackgroundDependencyLoader] [BackgroundDependencyLoader]
private void load() private void load()
{ {
AddInternal(new TournamentLogo()); AddRangeInternal(new Drawable[]
{
new TournamentLogo(),
new TourneyVideo("showcase")
{
Loop = true,
RelativeSizeAxes = Axes.Both,
},
new Container
{
Padding = new MarginPadding { Bottom = SongBar.HEIGHT },
RelativeSizeAxes = Axes.Both,
Child = new Box
{
// chroma key area for stable gameplay
Name = "chroma",
Anchor = Anchor.TopCentre,
Origin = Anchor.TopCentre,
RelativeSizeAxes = Axes.Both,
Colour = new Color4(0, 255, 0, 255),
}
}
});
} }
} }
} }