Fix selected item not being highlighted on some setting dropdowns

This commit is contained in:
Joehu 2020-12-19 16:57:25 -08:00
parent 4bf54a3736
commit b87f89986a
2 changed files with 4 additions and 10 deletions

View File

@ -59,11 +59,10 @@ private void load(FrameworkConfigManager config, OsuConfigManager osuConfig, Gam
Children = new Drawable[]
{
windowModeDropdown = new SettingsDropdown<WindowMode>
windowModeDropdown = new SettingsEnumDropdown<WindowMode>
{
LabelText = "Screen mode",
Current = config.GetBindable<WindowMode>(FrameworkSetting.WindowMode),
ItemSource = windowModes,
},
resolutionSettingsContainer = new Container
{

View File

@ -1,8 +1,6 @@
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
// See the LICENCE file in the repository root for full licence text.
using System;
using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Graphics;
using osu.Game.Configuration;
@ -28,23 +26,20 @@ private void load(OsuConfigManager config)
LabelText = "osu! music theme",
Current = config.GetBindable<bool>(OsuSetting.MenuMusic)
},
new SettingsDropdown<IntroSequence>
new SettingsEnumDropdown<IntroSequence>
{
LabelText = "Intro sequence",
Current = config.GetBindable<IntroSequence>(OsuSetting.IntroSequence),
Items = Enum.GetValues(typeof(IntroSequence)).Cast<IntroSequence>()
},
new SettingsDropdown<BackgroundSource>
new SettingsEnumDropdown<BackgroundSource>
{
LabelText = "Background source",
Current = config.GetBindable<BackgroundSource>(OsuSetting.MenuBackgroundSource),
Items = Enum.GetValues(typeof(BackgroundSource)).Cast<BackgroundSource>()
},
new SettingsDropdown<SeasonalBackgroundMode>
new SettingsEnumDropdown<SeasonalBackgroundMode>
{
LabelText = "Seasonal backgrounds",
Current = config.GetBindable<SeasonalBackgroundMode>(OsuSetting.SeasonalBackgroundMode),
Items = Enum.GetValues(typeof(SeasonalBackgroundMode)).Cast<SeasonalBackgroundMode>()
}
};
}