From 58a0b4e19b2f5cfe29e9a98e3d33d314ffd9c277 Mon Sep 17 00:00:00 2001 From: Andrei Zavatski Date: Fri, 30 Aug 2019 23:19:55 +0300 Subject: [PATCH] Add basic layout for player --- osu.Game/Screens/Play/Player.cs | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index b487f3e61b..9ff52d8444 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -10,6 +10,7 @@ using osu.Framework.Audio.Sample; using osu.Framework.Bindables; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Video; using osu.Framework.Input.Events; using osu.Framework.Logging; using osu.Framework.Screens; @@ -81,6 +82,8 @@ namespace osu.Game.Screens.Play protected DimmableStoryboard DimmableStoryboard { get; private set; } + protected VideoSprite Video { get; private set; } + [Cached] [Cached(Type = typeof(IBindable>))] protected new readonly Bindable> Mods = new Bindable>(Array.Empty()); @@ -143,6 +146,14 @@ namespace osu.Game.Screens.Play private void addUnderlayComponents(Container target) { target.Add(DimmableStoryboard = new DimmableStoryboard(Beatmap.Value.Storyboard) { RelativeSizeAxes = Axes.Both }); + + var video = Beatmap.Value.Video; + + if (video != null) + { + target.Add(Video = video); + Video.RelativeSizeAxes = Axes.Both; + } } private void addGameplayComponents(Container target, WorkingBeatmap working)