From ca2603324cf28123ce3448ff90119034920043dc Mon Sep 17 00:00:00 2001 From: PC Date: Tue, 14 Feb 2023 09:43:40 +0300 Subject: [PATCH] Change present from skin selection tab to `SkinCollection.First()` --- osu.Game/OsuGame.cs | 21 ++++----------------- 1 file changed, 4 insertions(+), 17 deletions(-) diff --git a/osu.Game/OsuGame.cs b/osu.Game/OsuGame.cs index ddba5667d8..56e17107b6 100644 --- a/osu.Game/OsuGame.cs +++ b/osu.Game/OsuGame.cs @@ -29,7 +29,6 @@ using osu.Framework.Input.Handlers.Tablet; using osu.Framework.Localisation; using osu.Framework.Logging; using osu.Framework.Screens; -using osu.Framework.Testing; using osu.Framework.Threading; using osu.Game.Beatmaps; using osu.Game.Collections; @@ -50,7 +49,6 @@ using osu.Game.Overlays; using osu.Game.Overlays.BeatmapListing; using osu.Game.Overlays.Music; using osu.Game.Overlays.Notifications; -using osu.Game.Overlays.Settings.Sections; using osu.Game.Overlays.SkinEditor; using osu.Game.Overlays.Toolbar; using osu.Game.Overlays.Volume; @@ -505,21 +503,10 @@ namespace osu.Game public void ShowChangelogBuild(string updateStream, string version) => waitForReady(() => changelogOverlay, _ => changelogOverlay.ShowBuild(updateStream, version)); /// - /// Present ether a skin select if one skin was imported or navigate to the skin selection menu if multiple skins were imported immediately. + /// Present a skin select immediately. /// - /// List of imported skins - public void PresentSkins(IEnumerable> importedSkins) - { - int importedSkinsCount = importedSkins.Count(); - - if (importedSkinsCount == 1) - SkinManager.CurrentSkinInfo.Value = importedSkins.Single(); - else if (importedSkinsCount > 1) - { - Settings.Show(); - Settings.SectionsContainer.ScrollTo(Settings.SectionsContainer.ChildrenOfType().Single()); - } - } + /// Skin to select + public void PresentSkin(Live importedSkin) => SkinManager.CurrentSkinInfo.Value = importedSkin; /// /// Present a beatmap at song select immediately. @@ -797,7 +784,7 @@ namespace osu.Game // todo: all archive managers should be able to be looped here. SkinManager.PostNotification = n => Notifications.Post(n); - SkinManager.PresentImport = PresentSkins; + SkinManager.PresentImport = items => PresentSkin(items.First()); BeatmapManager.PostNotification = n => Notifications.Post(n); BeatmapManager.PresentImport = items => PresentBeatmap(items.First().Value);