Rename weird config setting

This commit is contained in:
Dean Herbert 2017-12-13 18:10:32 +09:00
parent 1146ba02d7
commit b9298325a3
5 changed files with 24 additions and 24 deletions

View File

@ -20,7 +20,7 @@ protected override void InitialiseDefaults()
Set(OsuSetting.DisplayStarsMinimum, 0.0, 0, 10, 0.1);
Set(OsuSetting.DisplayStarsMaximum, 10.0, 0, 10, 0.1);
Set(OsuSetting.SelectionRandomType, SongSelectRandomMode.RandomPermutation);
Set(OsuSetting.RandomSelectAlgorithm, RandomSelectAlgorithm.RandomPermutation);
Set(OsuSetting.ChatDisplayHeight, ChatOverlay.DEFAULT_HEIGHT, 0.2, 1);
@ -108,7 +108,7 @@ public enum OsuSetting
SaveUsername,
DisplayStarsMinimum,
DisplayStarsMaximum,
SelectionRandomType,
RandomSelectAlgorithm,
SnakingInSliders,
SnakingOutSliders,
ShowFpsDisplay,

View File

@ -5,7 +5,7 @@
namespace osu.Game.Configuration
{
public enum SongSelectRandomMode
public enum RandomSelectAlgorithm
{
[Description("Never repeat")]
RandomPermutation,

View File

@ -34,10 +34,10 @@ private void load(OsuConfigManager config)
Bindable = config.GetBindable<double>(OsuSetting.DisplayStarsMaximum),
KeyboardStep = 1f
},
new SettingsEnumDropdown<SongSelectRandomMode>
new SettingsEnumDropdown<RandomSelectAlgorithm>
{
LabelText = "Random beatmap selection",
Bindable = config.GetBindable<SongSelectRandomMode>(OsuSetting.SelectionRandomType),
LabelText = "Random selection algorithm",
Bindable = config.GetBindable<RandomSelectAlgorithm>(OsuSetting.RandomSelectAlgorithm),
}
};
}

View File

@ -71,7 +71,7 @@ public IEnumerable<BeatmapSetInfo> Beatmaps
private readonly List<CarouselBeatmapSet> carouselSets = new List<CarouselBeatmapSet>();
private Bindable<SongSelectRandomMode> randomType;
private Bindable<RandomSelectAlgorithm> randomSelectAlgorithm;
private readonly List<CarouselBeatmapSet> seenSets = new List<CarouselBeatmapSet>();
private List<DrawableCarouselItem> items = new List<DrawableCarouselItem>();
@ -221,7 +221,7 @@ public void SelectNextRandom()
CarouselBeatmapSet group;
if (randomType == SongSelectRandomMode.RandomPermutation)
if (randomSelectAlgorithm == RandomSelectAlgorithm.RandomPermutation)
{
var notSeenGroups = visibleGroups.Except(seenSets);
if (!notSeenGroups.Any())
@ -338,7 +338,6 @@ private CarouselBeatmapSet createGroup(BeatmapSetInfo beatmapSet)
[BackgroundDependencyLoader(permitNulls: true)]
private void load(OsuConfigManager config)
{
randomType = config.GetBindable<SongSelectRandomMode>(OsuSetting.SelectionRandomType);
}
private void addBeatmapSet(CarouselBeatmapSet set)
@ -350,6 +349,7 @@ private void addBeatmapSet(CarouselBeatmapSet set)
//todo: add to root
carouselSets.Add(set);
randomSelectAlgorithm = config.GetBindable<RandomSelectAlgorithm>(OsuSetting.RandomSelectAlgorithm);
}
private void removeBeatmapSet(CarouselBeatmapSet set)

View File

@ -343,7 +343,7 @@
<Compile Include="Configuration\ReleaseStream.cs" />
<Compile Include="Configuration\ScoreMeterType.cs" />
<Compile Include="Configuration\ScreenshotFormat.cs" />
<Compile Include="Configuration\SongSelectRandomMode.cs" />
<Compile Include="Configuration\RandomSelectAlgorithm.cs" />
<Compile Include="Database\DatabaseBackedStore.cs" />
<Compile Include="Database\OsuDbContext.cs" />
<Compile Include="Graphics\Backgrounds\Background.cs" />