From 18e30a7fc4123a297f271bfb8ddc4fbe06fa9f23 Mon Sep 17 00:00:00 2001 From: Shivam Date: Thu, 2 Jul 2020 19:12:45 +0200 Subject: [PATCH 1/4] Implement background switching based on the intro Only the Welcome intro has its own unique background right now --- .../Backgrounds/BackgroundScreenDefault.cs | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs b/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs index 980a127cf4..ae3ad63ac8 100644 --- a/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs +++ b/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs @@ -22,11 +22,12 @@ namespace osu.Game.Screens.Backgrounds private int currentDisplay; private const int background_count = 7; - private string backgroundName => $@"Menu/menu-background-{currentDisplay % background_count + 1}"; + private string backgroundName; private Bindable user; private Bindable skin; private Bindable mode; + private Bindable introSequence; [Resolved] private IBindable beatmap { get; set; } @@ -42,11 +43,13 @@ namespace osu.Game.Screens.Backgrounds user = api.LocalUser.GetBoundCopy(); skin = skinManager.CurrentSkin.GetBoundCopy(); mode = config.GetBindable(OsuSetting.MenuBackgroundSource); + introSequence = config.GetBindable(OsuSetting.IntroSequence); user.ValueChanged += _ => Next(); skin.ValueChanged += _ => Next(); mode.ValueChanged += _ => Next(); beatmap.ValueChanged += _ => Next(); + introSequence.ValueChanged += _ => Next(); currentDisplay = RNG.Next(0, background_count); @@ -74,6 +77,17 @@ namespace osu.Game.Screens.Backgrounds { Background newBackground; + switch (introSequence.Value) + { + case IntroSequence.Welcome: + backgroundName = "Menu/menu-background-welcome"; + break; + + default: + backgroundName = $@"Menu/menu-background-{currentDisplay % background_count + 1}"; + break; + } + if (user.Value?.IsSupporter ?? false) { switch (mode.Value) From e80a5a085afe07c55c9c112450df8f173af153e2 Mon Sep 17 00:00:00 2001 From: Shivam Date: Thu, 2 Jul 2020 19:45:18 +0200 Subject: [PATCH 2/4] Make backgroundName local --- osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs b/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs index ae3ad63ac8..2c22e60195 100644 --- a/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs +++ b/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs @@ -21,9 +21,6 @@ namespace osu.Game.Screens.Backgrounds private int currentDisplay; private const int background_count = 7; - - private string backgroundName; - private Bindable user; private Bindable skin; private Bindable mode; @@ -76,6 +73,7 @@ namespace osu.Game.Screens.Backgrounds private Background createBackground() { Background newBackground; + string backgroundName; switch (introSequence.Value) { From 4ded6d1913c6db7811cb3f4ac4a5037e3f843cb0 Mon Sep 17 00:00:00 2001 From: Shivam Date: Fri, 3 Jul 2020 11:36:03 +0200 Subject: [PATCH 3/4] Change background path with resource change --- osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs b/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs index 2c22e60195..ef41c5be3d 100644 --- a/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs +++ b/osu.Game/Screens/Backgrounds/BackgroundScreenDefault.cs @@ -78,7 +78,7 @@ namespace osu.Game.Screens.Backgrounds switch (introSequence.Value) { case IntroSequence.Welcome: - backgroundName = "Menu/menu-background-welcome"; + backgroundName = "Intro/Welcome/menu-background"; break; default: From 8a77a3621e71961bbcccb0a3b38eb2e1d9e96561 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Tue, 14 Jul 2020 11:03:55 +0900 Subject: [PATCH 4/4] Update resources --- osu.Android.props | 2 +- osu.Game/osu.Game.csproj | 2 +- osu.iOS.props | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Android.props b/osu.Android.props index 1d1583c55a..8510632d45 100644 --- a/osu.Android.props +++ b/osu.Android.props @@ -51,7 +51,7 @@ - + diff --git a/osu.Game/osu.Game.csproj b/osu.Game/osu.Game.csproj index 4295e02d24..05d6f27d40 100644 --- a/osu.Game/osu.Game.csproj +++ b/osu.Game/osu.Game.csproj @@ -25,7 +25,7 @@ - + diff --git a/osu.iOS.props b/osu.iOS.props index 3627cc032e..af779b32fd 100644 --- a/osu.iOS.props +++ b/osu.iOS.props @@ -71,7 +71,7 @@ - +