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
commit 59d6abacb5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 32 additions and 5 deletions

View File

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

View File

@ -2,15 +2,42 @@
// See the LICENCE file in the repository root for full licence text.
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
{
public class ShowcaseScreen : BeatmapInfoScreen
public class ShowcaseScreen : BeatmapInfoScreen // IProvideVideo
{
[BackgroundDependencyLoader]
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),
}
}
});
}
}
}