From 9e692686760ea1f00cf661bc011da18e8b4b43a0 Mon Sep 17 00:00:00 2001 From: Salman Ahmed Date: Wed, 17 Apr 2024 02:48:32 +0300 Subject: [PATCH] Change editor screen selection logic to use `SelectItem` for sound feedback --- osu.Game/Screens/Edit/Editor.cs | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/osu.Game/Screens/Edit/Editor.cs b/osu.Game/Screens/Edit/Editor.cs index c1f6c02301..37f4b4f5be 100644 --- a/osu.Game/Screens/Edit/Editor.cs +++ b/osu.Game/Screens/Edit/Editor.cs @@ -372,7 +372,7 @@ namespace osu.Game.Screens.Edit } } }, - new EditorScreenSwitcherControl + screenSwitcher = new EditorScreenSwitcherControl { Anchor = Anchor.BottomRight, Origin = Anchor.BottomRight, @@ -662,23 +662,23 @@ namespace osu.Game.Screens.Edit return true; case GlobalAction.EditorComposeMode: - Mode.Value = EditorScreenMode.Compose; + screenSwitcher.SelectItem(EditorScreenMode.Compose); return true; case GlobalAction.EditorDesignMode: - Mode.Value = EditorScreenMode.Design; + screenSwitcher.SelectItem(EditorScreenMode.Design); return true; case GlobalAction.EditorTimingMode: - Mode.Value = EditorScreenMode.Timing; + screenSwitcher.SelectItem(EditorScreenMode.Timing); return true; case GlobalAction.EditorSetupMode: - Mode.Value = EditorScreenMode.SongSetup; + screenSwitcher.SelectItem(EditorScreenMode.SongSetup); return true; case GlobalAction.EditorVerifyMode: - Mode.Value = EditorScreenMode.Verify; + screenSwitcher.SelectItem(EditorScreenMode.Verify); return true; case GlobalAction.EditorTestGameplay: @@ -959,6 +959,8 @@ namespace osu.Game.Screens.Edit [CanBeNull] private ScheduledDelegate playbackDisabledDebounce; + private EditorScreenSwitcherControl screenSwitcher; + private void updateSampleDisabledState() { bool shouldDisableSamples = clock.SeekingOrStopped.Value