mirror of
https://github.com/ppy/osu.git
synced 2025-01-13 10:03:05 +08:00
Rename weird config setting
This commit is contained in:
parent
1146ba02d7
commit
b9298325a3
@ -20,7 +20,7 @@ namespace osu.Game.Configuration
|
||||
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 @@ namespace osu.Game.Configuration
|
||||
SaveUsername,
|
||||
DisplayStarsMinimum,
|
||||
DisplayStarsMaximum,
|
||||
SelectionRandomType,
|
||||
RandomSelectAlgorithm,
|
||||
SnakingInSliders,
|
||||
SnakingOutSliders,
|
||||
ShowFpsDisplay,
|
||||
|
@ -1,15 +1,15 @@
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace osu.Game.Configuration
|
||||
{
|
||||
public enum SongSelectRandomMode
|
||||
{
|
||||
[Description("Never repeat")]
|
||||
RandomPermutation,
|
||||
[Description("Random")]
|
||||
Random
|
||||
}
|
||||
}
|
||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace osu.Game.Configuration
|
||||
{
|
||||
public enum RandomSelectAlgorithm
|
||||
{
|
||||
[Description("Never repeat")]
|
||||
RandomPermutation,
|
||||
[Description("Random")]
|
||||
Random
|
||||
}
|
||||
}
|
@ -34,10 +34,10 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
||||
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),
|
||||
}
|
||||
};
|
||||
}
|
||||
|
@ -71,7 +71,7 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
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 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
CarouselBeatmapSet group;
|
||||
|
||||
if (randomType == SongSelectRandomMode.RandomPermutation)
|
||||
if (randomSelectAlgorithm == RandomSelectAlgorithm.RandomPermutation)
|
||||
{
|
||||
var notSeenGroups = visibleGroups.Except(seenSets);
|
||||
if (!notSeenGroups.Any())
|
||||
@ -338,7 +338,6 @@ namespace osu.Game.Screens.Select
|
||||
[BackgroundDependencyLoader(permitNulls: true)]
|
||||
private void load(OsuConfigManager config)
|
||||
{
|
||||
randomType = config.GetBindable<SongSelectRandomMode>(OsuSetting.SelectionRandomType);
|
||||
}
|
||||
|
||||
private void addBeatmapSet(CarouselBeatmapSet set)
|
||||
@ -350,6 +349,7 @@ namespace osu.Game.Screens.Select
|
||||
|
||||
//todo: add to root
|
||||
carouselSets.Add(set);
|
||||
randomSelectAlgorithm = config.GetBindable<RandomSelectAlgorithm>(OsuSetting.RandomSelectAlgorithm);
|
||||
}
|
||||
|
||||
private void removeBeatmapSet(CarouselBeatmapSet set)
|
||||
|
@ -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" />
|
||||
|
Loading…
Reference in New Issue
Block a user