From aef0eb49a125d43b7b07e51a53b7c79805d7d412 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 22 Feb 2017 21:43:29 +0900 Subject: [PATCH 1/7] Add loading screen. --- .../Tests/TestCasePlayer.cs | 5 +- .../Backgrounds/BackgroundScreenBeatmap.cs | 4 +- osu.Game/Screens/Play/Player.cs | 11 +- osu.Game/Screens/Play/PlayerLoader.cs | 211 ++++++++++++++++++ osu.Game/Screens/Select/Footer.cs | 4 +- osu.Game/Screens/Select/PlaySongSelect.cs | 45 ++-- osu.Game/osu.Game.csproj | 1 + 7 files changed, 247 insertions(+), 34 deletions(-) create mode 100644 osu.Game/Screens/Play/PlayerLoader.cs diff --git a/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs b/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs index 2f8c37f1bb..ef8758a22f 100644 --- a/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs +++ b/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs @@ -74,10 +74,13 @@ namespace osu.Desktop.VisualTests.Tests Colour = Color4.Black, }); - Add(new Player + Add(new PlayerLoader(new Player { PreferredPlayMode = PlayMode.Osu, Beatmap = beatmap + }) + { + Beatmap = beatmap }); } } diff --git a/osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs b/osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs index a003fa2d57..f0c5c47797 100644 --- a/osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs +++ b/osu.Game/Screens/Backgrounds/BackgroundScreenBeatmap.cs @@ -60,9 +60,9 @@ namespace osu.Game.Screens.Backgrounds Beatmap = beatmap; } - public void BlurTo(Vector2 sigma, double duration) + public void BlurTo(Vector2 sigma, double duration, EasingTypes easing = EasingTypes.None) { - background?.BlurTo(sigma, duration, EasingTypes.OutExpo); + background?.BlurTo(sigma, duration, easing); blurTarget = sigma; } diff --git a/osu.Game/Screens/Play/Player.cs b/osu.Game/Screens/Play/Player.cs index 3d21e9cd40..2359dcdcfa 100644 --- a/osu.Game/Screens/Play/Player.cs +++ b/osu.Game/Screens/Play/Player.cs @@ -23,6 +23,7 @@ using System.Linq; using osu.Game.Beatmaps; using OpenTK.Graphics; using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Transformations; using osu.Framework.Logging; namespace osu.Game.Screens.Play @@ -270,15 +271,19 @@ namespace osu.Game.Screens.Play { base.OnEntering(last); - (Background as BackgroundScreenBeatmap)?.BlurTo(Vector2.Zero, 1000); - Background?.FadeTo((100f - dimLevel) / 100, 1000); + (Background as BackgroundScreenBeatmap)?.BlurTo(Vector2.Zero, 1500, EasingTypes.OutQuint); + Background?.FadeTo((100f - dimLevel) / 100, 1500, EasingTypes.OutQuint); Content.Alpha = 0; dimLevel.ValueChanged += dimChanged; + Content.ScaleTo(0.7f); + Content.Delay(250); Content.FadeIn(250); + Content.ScaleTo(1, 750, EasingTypes.OutQuint); + Delay(750); Schedule(() => { @@ -290,6 +295,8 @@ namespace osu.Game.Screens.Play protected override void OnSuspending(Screen next) { Content.FadeOut(350); + Content.ScaleTo(0.7f, 750, EasingTypes.InQuint); + base.OnSuspending(next); } diff --git a/osu.Game/Screens/Play/PlayerLoader.cs b/osu.Game/Screens/Play/PlayerLoader.cs new file mode 100644 index 0000000000..294eecd5fa --- /dev/null +++ b/osu.Game/Screens/Play/PlayerLoader.cs @@ -0,0 +1,211 @@ +// Copyright (c) 2007-2017 ppy Pty Ltd . +// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using osu.Framework.Allocation; +using osu.Framework.Graphics; +using osu.Framework.Graphics.Containers; +using osu.Framework.Graphics.Primitives; +using osu.Framework.Graphics.Sprites; +using osu.Framework.Graphics.Transformations; +using osu.Framework.Screens; +using osu.Game.Beatmaps; +using osu.Game.Database; +using osu.Game.Graphics; +using osu.Game.Graphics.Sprites; +using osu.Game.Screens.Backgrounds; +using osu.Game.Screens.Menu; +using OpenTK; + +namespace osu.Game.Screens.Play +{ + public class PlayerLoader : OsuScreen + { + private readonly Player player; + private OsuLogo logo; + private BeatmapMetadataDisplay info; + + protected override BackgroundScreen CreateBackground() => new BackgroundScreenBeatmap(Beatmap); + + public PlayerLoader(Player player) + { + ValidForResume = false; + this.player = player; + + Children = new Drawable[] + { + logo = new OsuLogo + { + Scale = new Vector2(0.15f), + Interactive = false, + }, + }; + + } + + [BackgroundDependencyLoader] + private void load() + { + Add(info = new BeatmapMetadataDisplay(Beatmap) + { + Alpha = 0, + Anchor = Anchor.Centre, + Origin = Anchor.Centre, + }); + + player.Preload(Game); + } + + protected override void OnEntering(Screen last) + { + base.OnEntering(last); + + Background.FadeTo(0.4f, 250); + + Content.ScaleTo(0.7f); + Content.ScaleTo(1, 750, EasingTypes.OutQuint); + Content.FadeInFromZero(500); + + Delay(1000, true); + + logo.MoveToOffset(new Vector2(0, -180), 500, EasingTypes.InOutExpo); + Delay(250, true); + + info.FadeIn(500); + + Delay(2000, true); + + Content.ScaleTo(0.7f, 300, EasingTypes.InQuint); + Content.FadeOut(250); + + Delay(250); + + Schedule(() => + { + if (!Push(player)) + Exit(); + }); + } + + protected override bool OnExiting(Screen next) + { + Content.ScaleTo(0.7f, 150, EasingTypes.InQuint); + FadeOut(150); + return base.OnExiting(next); + } + + class BeatmapMetadataDisplay : Container + { + class MetadataLine : Container + { + public MetadataLine(string left, string right) + { + AutoSizeAxes = Axes.Both; + Children = new Drawable[] + { + new OsuSpriteText + { + Anchor = Anchor.TopCentre, + Origin = Anchor.TopRight, + Margin = new MarginPadding { Right = 5 }, + Colour = OsuColour.Gray(0.5f), + Text = left, + }, + new OsuSpriteText + { + Anchor = Anchor.TopCentre, + Origin = Anchor.TopLeft, + Margin = new MarginPadding { Left = 5 }, + Text = string.IsNullOrEmpty(right) ? @"-" : right, + } + }; + } + + } + + public BeatmapMetadataDisplay(WorkingBeatmap beatmap) + { + AutoSizeAxes = Axes.Both; + Children = new Drawable[] + { + new FlowContainer() + { + AutoSizeAxes = Axes.Both, + Origin = Anchor.TopCentre, + Anchor = Anchor.TopCentre, + Direction = FlowDirections.Vertical, + Children = new Drawable[] + { + new OsuSpriteText + { + Text = beatmap.BeatmapInfo.Metadata.Title, + TextSize = 36, + Font = @"Exo2.0-MediumItalic", + Origin = Anchor.TopCentre, + Anchor = Anchor.TopCentre, + }, + new OsuSpriteText + { + Text = beatmap.BeatmapInfo.Metadata.Artist, + TextSize = 26, + Font = @"Exo2.0-MediumItalic", + Origin = Anchor.TopCentre, + Anchor = Anchor.TopCentre, + }, + new Container + { + Size = new Vector2(300, 60), + Margin = new MarginPadding(10), + Origin = Anchor.TopCentre, + Anchor = Anchor.TopCentre, + CornerRadius = 10, + Masking = true, + Children = new[] + { + new Sprite + { + Texture = beatmap.Background, + Origin = Anchor.Centre, + Anchor = Anchor.Centre, + FillMode = FillMode.Fill, + }, + } + }, + new OsuSpriteText + { + Text = beatmap.BeatmapInfo.Version, + TextSize = 26, + Font = @"Exo2.0-MediumItalic", + Origin = Anchor.TopCentre, + Anchor = Anchor.TopCentre, + Margin = new MarginPadding + { + Bottom = 40 + }, + }, + new MetadataLine("Source", beatmap.BeatmapInfo.Metadata.Source) + { + Origin = Anchor.TopCentre, + Anchor = Anchor.TopCentre, + }, + new MetadataLine("Composer", string.Empty) + { + Origin = Anchor.TopCentre, + Anchor = Anchor.TopCentre, + }, + new MetadataLine("Mapper", beatmap.BeatmapInfo.Metadata.Author) + { + Origin = Anchor.TopCentre, + Anchor = Anchor.TopCentre, + }, + }, + } + }; + } + } + } +} diff --git a/osu.Game/Screens/Select/Footer.cs b/osu.Game/Screens/Select/Footer.cs index df926c0778..8cde771b50 100644 --- a/osu.Game/Screens/Select/Footer.cs +++ b/osu.Game/Screens/Select/Footer.cs @@ -32,6 +32,8 @@ namespace osu.Game.Screens.Select private FlowContainer buttons; + public OsuLogo StartButton; + public void AddButton(string text, Color4 colour, Action action) { var button = new FooterButton @@ -76,7 +78,7 @@ namespace osu.Game.Screens.Select Height = 3, Position = new Vector2(0, -3), }, - new OsuLogo() + StartButton = new OsuLogo { Anchor = Anchor.BottomRight, Scale = new Vector2(0.4f), diff --git a/osu.Game/Screens/Select/PlaySongSelect.cs b/osu.Game/Screens/Select/PlaySongSelect.cs index 2dcd957950..474406eb86 100644 --- a/osu.Game/Screens/Select/PlaySongSelect.cs +++ b/osu.Game/Screens/Select/PlaySongSelect.cs @@ -54,32 +54,10 @@ namespace osu.Game.Screens.Select private Footer footer; - Player player; + OsuScreen player; + FilterControl filter; - private void start() - { - if (player != null || Beatmap == null) - return; - - //in the future we may want to move this logic to a PlayerLoader gamemode or similar, so we can rely on the SongSelect transition - //and provide a better loading experience (at the moment song select is still accepting input during preload). - player = new Player - { - BeatmapInfo = carousel.SelectedGroup.SelectedPanel.Beatmap, - PreferredPlayMode = playMode.Value - }; - - player.Preload(Game, delegate - { - if (!Push(player)) - { - player = null; - //error occured? - } - }); - } - [BackgroundDependencyLoader(permitNulls: true)] private void load(BeatmapDatabase beatmaps, AudioManager audio, BaseGame game, OsuGame osuGame, OsuColour colours) @@ -132,10 +110,20 @@ namespace osu.Game.Screens.Select Right = 20, }, }, - footer = new Footer() + footer = new Footer { OnBack = Exit, - OnStart = start, + OnStart = () => + { + if (player != null || Beatmap == null) + return; + + (player = new PlayerLoader(new Player + { + BeatmapInfo = carousel.SelectedGroup.SelectedPanel.Beatmap, + PreferredPlayMode = playMode.Value + })).Preload(Game, l => Push(player)); + } } }; @@ -276,6 +264,7 @@ namespace osu.Game.Screens.Select { backgroundModeBeatmap.Beatmap = beatmap; backgroundModeBeatmap.BlurTo(background_blur, 1000); + backgroundModeBeatmap.FadeTo(1, 250); } if (beatmap != null) @@ -346,7 +335,7 @@ namespace osu.Game.Screens.Select var group = new BeatmapGroup(beatmap) { SelectionChanged = selectionChanged, - StartRequested = b => start() + StartRequested = b => footer.StartButton.TriggerClick() }; //for the time being, let's completely load the difficulty panels in the background. @@ -382,7 +371,7 @@ namespace osu.Game.Screens.Select switch (args.Key) { case Key.Enter: - start(); + footer.StartButton.TriggerClick(); return true; } diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 790cd0d348..a336f54227 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -147,6 +147,7 @@ + From d19a7813f3dafd6ee9c1f27695221213741b48f0 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Wed, 22 Feb 2017 23:27:29 +0900 Subject: [PATCH 2/7] Fix TestCasePlayer regression. --- osu.Desktop.VisualTests/Tests/TestCasePlayer.cs | 13 +++++++++++-- osu.Game/Beatmaps/WorkingBeatmap.cs | 2 ++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs b/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs index ef8758a22f..8ad1ca5143 100644 --- a/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs +++ b/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs @@ -38,7 +38,7 @@ namespace osu.Desktop.VisualTests.Tests { base.Reset(); - if (beatmap?.Track == null) + //if (beatmap?.Track == null) { var objects = new List(); @@ -60,7 +60,16 @@ namespace osu.Desktop.VisualTests.Tests Beatmap b = new Beatmap { - HitObjects = objects + HitObjects = objects, + BeatmapInfo = new BeatmapInfo + { + Metadata = new BeatmapMetadata + { + Artist = @"Unknown", + Title = @"Sample Beatmap", + Author = @"peppy", + } + } }; decoder.Process(b); diff --git a/osu.Game/Beatmaps/WorkingBeatmap.cs b/osu.Game/Beatmaps/WorkingBeatmap.cs index 28c2c5f0e2..c6bc4eeeb8 100644 --- a/osu.Game/Beatmaps/WorkingBeatmap.cs +++ b/osu.Game/Beatmaps/WorkingBeatmap.cs @@ -113,6 +113,8 @@ namespace osu.Game.Beatmaps public WorkingBeatmap(Beatmap beatmap) { this.beatmap = beatmap; + BeatmapInfo = beatmap.BeatmapInfo; + BeatmapSetInfo = beatmap.BeatmapInfo.BeatmapSet; } public WorkingBeatmap(BeatmapInfo beatmapInfo, BeatmapSetInfo beatmapSetInfo, BeatmapDatabase database, bool withStoryboard = false) From da2bfe6d3c477682d0617ee26efb0ae2f5008e45 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 23 Feb 2017 15:38:17 +0900 Subject: [PATCH 3/7] Framework updates. --- osu-framework | 2 +- osu.Desktop.VisualTests/Benchmark.cs | 2 +- osu.Desktop.VisualTests/Program.cs | 2 +- osu.Desktop/OsuGameDesktop.cs | 2 +- osu.Desktop/Program.cs | 8 +------- osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs | 2 +- osu.Game/Beatmaps/IO/ArchiveReader.cs | 6 +++--- osu.Game/Configuration/OsuConfigManager.cs | 2 +- osu.Game/Database/BeatmapDatabase.cs | 4 ++-- osu.Game/IPC/BeatmapImporter.cs | 2 +- osu.Game/OsuGameBase.cs | 4 ++-- osu.Game/Overlays/MusicController.cs | 4 ++-- .../Overlays/Options/Sections/General/UpdateOptions.cs | 2 +- osu.Game/Screens/BackgroundScreen.cs | 4 ++-- osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs | 2 +- osu.Game/Screens/Play/PlayerInputManager.cs | 2 +- osu.Game/Screens/Select/PlaySongSelect.cs | 6 +++--- 17 files changed, 25 insertions(+), 31 deletions(-) diff --git a/osu-framework b/osu-framework index de1568254c..6e1f811d9d 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit de1568254c4c9a4ea540ccad94700c5c51f70dc2 +Subproject commit 6e1f811d9d6e45a3a4b8c270b8c8cf10297dc3d7 diff --git a/osu.Desktop.VisualTests/Benchmark.cs b/osu.Desktop.VisualTests/Benchmark.cs index 9584dc52a4..eaceea02b1 100644 --- a/osu.Desktop.VisualTests/Benchmark.cs +++ b/osu.Desktop.VisualTests/Benchmark.cs @@ -24,7 +24,7 @@ namespace osu.Desktop.VisualTests private double timePerTest = 200; [BackgroundDependencyLoader] - private void load(BaseGame game) + private void load(Framework.Game game) { Host.MaximumDrawHz = int.MaxValue; Host.MaximumUpdateHz = int.MaxValue; diff --git a/osu.Desktop.VisualTests/Program.cs b/osu.Desktop.VisualTests/Program.cs index b89c6bcf4d..0532049690 100644 --- a/osu.Desktop.VisualTests/Program.cs +++ b/osu.Desktop.VisualTests/Program.cs @@ -20,7 +20,7 @@ namespace osu.Desktop.VisualTests { bool benchmark = args.Length > 0 && args[0] == @"-benchmark"; - using (BasicGameHost host = Host.GetSuitableHost(@"osu")) + using (GameHost host = Host.GetSuitableHost(@"osu")) { Ruleset.Register(new OsuRuleset()); Ruleset.Register(new TaikoRuleset()); diff --git a/osu.Desktop/OsuGameDesktop.cs b/osu.Desktop/OsuGameDesktop.cs index 3111d72662..c3adb8f81f 100644 --- a/osu.Desktop/OsuGameDesktop.cs +++ b/osu.Desktop/OsuGameDesktop.cs @@ -42,7 +42,7 @@ namespace osu.Desktop }; } - public override void SetHost(BasicGameHost host) + public override void SetHost(GameHost host) { base.SetHost(host); var desktopWindow = host.Window as DesktopGameWindow; diff --git a/osu.Desktop/Program.cs b/osu.Desktop/Program.cs index f9a4c94b8d..3023cbfc39 100644 --- a/osu.Desktop/Program.cs +++ b/osu.Desktop/Program.cs @@ -3,14 +3,9 @@ using System; using System.IO; -using System.Linq; -using System.Threading; using osu.Desktop.Beatmaps.IO; -using osu.Framework; using osu.Framework.Desktop; using osu.Framework.Desktop.Platform; -using osu.Framework.Platform; -using osu.Game; using osu.Game.IPC; using osu.Game.Modes; using osu.Game.Modes.Catch; @@ -51,8 +46,7 @@ namespace osu.Desktop Ruleset.Register(new ManiaRuleset()); Ruleset.Register(new CatchRuleset()); - BaseGame osu = new OsuGameDesktop(args); - host.Add(osu); + host.Add(new OsuGameDesktop(args)); host.Run(); } return 0; diff --git a/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs b/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs index 6a162a4ab9..8c892c0725 100644 --- a/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs +++ b/osu.Game.Tests/Beatmaps/IO/ImportBeatmapTest.cs @@ -65,7 +65,7 @@ namespace osu.Game.Tests.Beatmaps.IO } } - private OsuGameBase loadOsu(BasicGameHost host) + private OsuGameBase loadOsu(GameHost host) { var osu = new OsuGameBase(); host.Add(osu); diff --git a/osu.Game/Beatmaps/IO/ArchiveReader.cs b/osu.Game/Beatmaps/IO/ArchiveReader.cs index cb5f936939..bbf4de20f5 100644 --- a/osu.Game/Beatmaps/IO/ArchiveReader.cs +++ b/osu.Game/Beatmaps/IO/ArchiveReader.cs @@ -14,13 +14,13 @@ namespace osu.Game.Beatmaps.IO { private class Reader { - public Func Test { get; set; } + public Func Test { get; set; } public Type Type { get; set; } } private static List readers { get; } = new List(); - public static ArchiveReader GetReader(BasicStorage storage, string path) + public static ArchiveReader GetReader(Storage storage, string path) { foreach (var reader in readers) { @@ -30,7 +30,7 @@ namespace osu.Game.Beatmaps.IO throw new IOException(@"Unknown file format"); } - protected static void AddReader(Func test) where T : ArchiveReader + protected static void AddReader(Func test) where T : ArchiveReader { readers.Add(new Reader { Test = test, Type = typeof(T) }); } diff --git a/osu.Game/Configuration/OsuConfigManager.cs b/osu.Game/Configuration/OsuConfigManager.cs index 1562571efc..ccf53ed714 100644 --- a/osu.Game/Configuration/OsuConfigManager.cs +++ b/osu.Game/Configuration/OsuConfigManager.cs @@ -189,7 +189,7 @@ namespace osu.Game.Configuration public string GetUnicodeString(string nonunicode, string unicode) => Get(OsuConfig.ShowUnicode) ? unicode ?? nonunicode : nonunicode ?? unicode; - public OsuConfigManager(BasicStorage storage) : base(storage) + public OsuConfigManager(Storage storage) : base(storage) { } } diff --git a/osu.Game/Database/BeatmapDatabase.cs b/osu.Game/Database/BeatmapDatabase.cs index 9c7e70f8eb..566131acdd 100644 --- a/osu.Game/Database/BeatmapDatabase.cs +++ b/osu.Game/Database/BeatmapDatabase.cs @@ -22,12 +22,12 @@ namespace osu.Game.Database public class BeatmapDatabase { private SQLiteConnection connection { get; set; } - private BasicStorage storage; + private Storage storage; public event Action BeatmapSetAdded; private BeatmapImporter ipc; - public BeatmapDatabase(BasicStorage storage, BasicGameHost importHost = null) + public BeatmapDatabase(Storage storage, GameHost importHost = null) { this.storage = storage; diff --git a/osu.Game/IPC/BeatmapImporter.cs b/osu.Game/IPC/BeatmapImporter.cs index 5b058d5bd8..73c47a1b97 100644 --- a/osu.Game/IPC/BeatmapImporter.cs +++ b/osu.Game/IPC/BeatmapImporter.cs @@ -13,7 +13,7 @@ namespace osu.Game.IPC private IpcChannel channel; private BeatmapDatabase beatmaps; - public BeatmapImporter(BasicGameHost host, BeatmapDatabase beatmaps = null) + public BeatmapImporter(GameHost host, BeatmapDatabase beatmaps = null) { this.beatmaps = beatmaps; diff --git a/osu.Game/OsuGameBase.cs b/osu.Game/OsuGameBase.cs index db546ac088..ca11d3659f 100644 --- a/osu.Game/OsuGameBase.cs +++ b/osu.Game/OsuGameBase.cs @@ -20,7 +20,7 @@ using osu.Game.Online.API; namespace osu.Game { - public class OsuGameBase : BaseGame, IOnlineComponent + public class OsuGameBase : Framework.Game, IOnlineComponent { protected OsuConfigManager LocalConfig; @@ -101,7 +101,7 @@ namespace osu.Game }); } - public override void SetHost(BasicGameHost host) + public override void SetHost(GameHost host) { if (LocalConfig == null) LocalConfig = new OsuConfigManager(host.Storage); diff --git a/osu.Game/Overlays/MusicController.cs b/osu.Game/Overlays/MusicController.cs index 3b13c7bf88..03575a10f0 100644 --- a/osu.Game/Overlays/MusicController.cs +++ b/osu.Game/Overlays/MusicController.cs @@ -45,7 +45,7 @@ namespace osu.Game.Overlays private Bindable preferUnicode; private WorkingBeatmap current; private BeatmapDatabase beatmaps; - private BaseGame game; + private Framework.Game game; private Container dragContainer; @@ -322,7 +322,7 @@ namespace osu.Game.Overlays updateDisplay(current, isNext ? TransformDirection.Next : TransformDirection.Prev); } - protected override void PerformLoad(BaseGame game) + protected override void PerformLoad(Framework.Game game) { this.game = game; base.PerformLoad(game); diff --git a/osu.Game/Overlays/Options/Sections/General/UpdateOptions.cs b/osu.Game/Overlays/Options/Sections/General/UpdateOptions.cs index 6c7c29d966..c45dc9cbd4 100644 --- a/osu.Game/Overlays/Options/Sections/General/UpdateOptions.cs +++ b/osu.Game/Overlays/Options/Sections/General/UpdateOptions.cs @@ -14,7 +14,7 @@ namespace osu.Game.Overlays.Options.Sections.General protected override string Header => "Updates"; [BackgroundDependencyLoader] - private void load(BasicStorage storage, OsuConfigManager config) + private void load(Storage storage, OsuConfigManager config) { Children = new Drawable[] { diff --git a/osu.Game/Screens/BackgroundScreen.cs b/osu.Game/Screens/BackgroundScreen.cs index 0bce73b92f..5b79158946 100644 --- a/osu.Game/Screens/BackgroundScreen.cs +++ b/osu.Game/Screens/BackgroundScreen.cs @@ -29,10 +29,10 @@ namespace osu.Game.Screens return false; } - BaseGame game; + Framework.Game game; [BackgroundDependencyLoader] - private void load(BaseGame game) + private void load(Framework.Game game) { this.game = game; } diff --git a/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs b/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs index 6807085061..d4781146c3 100644 --- a/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs +++ b/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs @@ -10,7 +10,7 @@ namespace osu.Game.Screens.Backgrounds public class BackgroundScreenDefault : BackgroundScreen { [BackgroundDependencyLoader] - private void load(BaseGame game) + private void load(Framework.Game game) { Add(new Background(@"Backgrounds/bg1")); } diff --git a/osu.Game/Screens/Play/PlayerInputManager.cs b/osu.Game/Screens/Play/PlayerInputManager.cs index f3041cb1e2..20fd4deed3 100644 --- a/osu.Game/Screens/Play/PlayerInputManager.cs +++ b/osu.Game/Screens/Play/PlayerInputManager.cs @@ -14,7 +14,7 @@ namespace osu.Game.Screens.Play { class PlayerInputManager : UserInputManager { - public PlayerInputManager(BasicGameHost host) + public PlayerInputManager(GameHost host) : base(host) { } diff --git a/osu.Game/Screens/Select/PlaySongSelect.cs b/osu.Game/Screens/Select/PlaySongSelect.cs index 2dcd957950..53a8aa4c14 100644 --- a/osu.Game/Screens/Select/PlaySongSelect.cs +++ b/osu.Game/Screens/Select/PlaySongSelect.cs @@ -81,7 +81,7 @@ namespace osu.Game.Screens.Select } [BackgroundDependencyLoader(permitNulls: true)] - private void load(BeatmapDatabase beatmaps, AudioManager audio, BaseGame game, + private void load(BeatmapDatabase beatmaps, AudioManager audio, Framework.Game game, OsuGame osuGame, OsuColour colours) { const float carousel_width = 640; @@ -328,7 +328,7 @@ namespace osu.Game.Screens.Select } } - private void addBeatmapSet(BeatmapSetInfo beatmapSet, BaseGame game, bool select = false) + private void addBeatmapSet(BeatmapSetInfo beatmapSet, Framework.Game game, bool select = false) { beatmapSet = database.GetWithChildren(beatmapSet.ID); beatmapSet.Beatmaps.ForEach(b => @@ -368,7 +368,7 @@ namespace osu.Game.Screens.Select })); } - private void addBeatmapSets(BaseGame game, CancellationToken token) + private void addBeatmapSets(Framework.Game game, CancellationToken token) { foreach (var beatmapSet in database.Query()) { From 011d2cc7cc2c8d68c6fd39aac6c35bd3807f0495 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 23 Feb 2017 16:44:59 +0900 Subject: [PATCH 4/7] oops --- osu.Desktop.VisualTests/Tests/TestCasePlayer.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs b/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs index 8ad1ca5143..2c4729b05a 100644 --- a/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs +++ b/osu.Desktop.VisualTests/Tests/TestCasePlayer.cs @@ -38,7 +38,7 @@ namespace osu.Desktop.VisualTests.Tests { base.Reset(); - //if (beatmap?.Track == null) + if (beatmap?.Track == null) { var objects = new List(); From 9bba4b66ba301ab7394619747c73d9053e7aaca1 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 23 Feb 2017 17:20:28 +0900 Subject: [PATCH 5/7] Update framework. --- osu-framework | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu-framework b/osu-framework index 6e1f811d9d..56535b834c 160000 --- a/osu-framework +++ b/osu-framework @@ -1 +1 @@ -Subproject commit 6e1f811d9d6e45a3a4b8c270b8c8cf10297dc3d7 +Subproject commit 56535b834cf2329e5abc8ecf698d19ece9ef7b07 From f1538791c3befd26bd2842e03ab0d3eefb982e57 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Thu, 23 Feb 2017 17:35:14 +0900 Subject: [PATCH 6/7] Correctly hook up window mode dropdown. --- .../Overlays/Options/Sections/Graphics/LayoutOptions.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Game/Overlays/Options/Sections/Graphics/LayoutOptions.cs b/osu.Game/Overlays/Options/Sections/Graphics/LayoutOptions.cs index 5897cd8fdf..a3dbb9c76f 100644 --- a/osu.Game/Overlays/Options/Sections/Graphics/LayoutOptions.cs +++ b/osu.Game/Overlays/Options/Sections/Graphics/LayoutOptions.cs @@ -18,10 +18,10 @@ namespace osu.Game.Overlays.Options.Sections.Graphics Children = new Drawable[] { new OptionLabel { Text = "Resolution: TODO dropdown" }, - new OsuCheckbox + new OptionEnumDropDown { - LabelText = "Fullscreen mode", - Bindable = config.GetBindable(FrameworkConfig.Fullscreen), + LabelText = "Screen mode", + Bindable = config.GetBindable(FrameworkConfig.WindowMode), }, new OsuCheckbox { From fd622286fe1e2cbf03965419bc0f26afc248d84a Mon Sep 17 00:00:00 2001 From: Kelvin <2yangk23@gmail.com> Date: Thu, 23 Feb 2017 00:50:09 -0800 Subject: [PATCH 7/7] Enable Tabbing in LoginOptions --- osu.Game/Overlays/Options/Sections/General/LoginOptions.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs b/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs index aca9b02f48..6866ee513f 100644 --- a/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs +++ b/osu.Game/Overlays/Options/Sections/General/LoginOptions.cs @@ -111,12 +111,14 @@ namespace osu.Game.Overlays.Options.Sections.General { PlaceholderText = "Username", RelativeSizeAxes = Axes.X, - Text = api?.Username ?? string.Empty + Text = api?.Username ?? string.Empty, + TabbableContentContainer = this }, password = new OsuPasswordTextBox { PlaceholderText = "Password", - RelativeSizeAxes = Axes.X + RelativeSizeAxes = Axes.X, + TabbableContentContainer = this }, new OsuCheckbox {