mirror of
https://github.com/ppy/osu.git
synced 2025-01-28 02:02:53 +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.DisplayStarsMinimum, 0.0, 0, 10, 0.1);
|
||||||
Set(OsuSetting.DisplayStarsMaximum, 10.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);
|
Set(OsuSetting.ChatDisplayHeight, ChatOverlay.DEFAULT_HEIGHT, 0.2, 1);
|
||||||
|
|
||||||
@ -108,7 +108,7 @@ namespace osu.Game.Configuration
|
|||||||
SaveUsername,
|
SaveUsername,
|
||||||
DisplayStarsMinimum,
|
DisplayStarsMinimum,
|
||||||
DisplayStarsMaximum,
|
DisplayStarsMaximum,
|
||||||
SelectionRandomType,
|
RandomSelectAlgorithm,
|
||||||
SnakingInSliders,
|
SnakingInSliders,
|
||||||
SnakingOutSliders,
|
SnakingOutSliders,
|
||||||
ShowFpsDisplay,
|
ShowFpsDisplay,
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
// Copyright (c) 2007-2017 ppy Pty Ltd <contact@ppy.sh>.
|
||||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||||
|
|
||||||
using System.ComponentModel;
|
using System.ComponentModel;
|
||||||
|
|
||||||
namespace osu.Game.Configuration
|
namespace osu.Game.Configuration
|
||||||
{
|
{
|
||||||
public enum SongSelectRandomMode
|
public enum RandomSelectAlgorithm
|
||||||
{
|
{
|
||||||
[Description("Never repeat")]
|
[Description("Never repeat")]
|
||||||
RandomPermutation,
|
RandomPermutation,
|
||||||
[Description("Random")]
|
[Description("Random")]
|
||||||
Random
|
Random
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -34,10 +34,10 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
|
|||||||
Bindable = config.GetBindable<double>(OsuSetting.DisplayStarsMaximum),
|
Bindable = config.GetBindable<double>(OsuSetting.DisplayStarsMaximum),
|
||||||
KeyboardStep = 1f
|
KeyboardStep = 1f
|
||||||
},
|
},
|
||||||
new SettingsEnumDropdown<SongSelectRandomMode>
|
new SettingsEnumDropdown<RandomSelectAlgorithm>
|
||||||
{
|
{
|
||||||
LabelText = "Random beatmap selection",
|
LabelText = "Random selection algorithm",
|
||||||
Bindable = config.GetBindable<SongSelectRandomMode>(OsuSetting.SelectionRandomType),
|
Bindable = config.GetBindable<RandomSelectAlgorithm>(OsuSetting.RandomSelectAlgorithm),
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -71,7 +71,7 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
private readonly List<CarouselBeatmapSet> carouselSets = new List<CarouselBeatmapSet>();
|
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 readonly List<CarouselBeatmapSet> seenSets = new List<CarouselBeatmapSet>();
|
||||||
|
|
||||||
private List<DrawableCarouselItem> items = new List<DrawableCarouselItem>();
|
private List<DrawableCarouselItem> items = new List<DrawableCarouselItem>();
|
||||||
@ -221,7 +221,7 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
CarouselBeatmapSet group;
|
CarouselBeatmapSet group;
|
||||||
|
|
||||||
if (randomType == SongSelectRandomMode.RandomPermutation)
|
if (randomSelectAlgorithm == RandomSelectAlgorithm.RandomPermutation)
|
||||||
{
|
{
|
||||||
var notSeenGroups = visibleGroups.Except(seenSets);
|
var notSeenGroups = visibleGroups.Except(seenSets);
|
||||||
if (!notSeenGroups.Any())
|
if (!notSeenGroups.Any())
|
||||||
@ -338,7 +338,6 @@ namespace osu.Game.Screens.Select
|
|||||||
[BackgroundDependencyLoader(permitNulls: true)]
|
[BackgroundDependencyLoader(permitNulls: true)]
|
||||||
private void load(OsuConfigManager config)
|
private void load(OsuConfigManager config)
|
||||||
{
|
{
|
||||||
randomType = config.GetBindable<SongSelectRandomMode>(OsuSetting.SelectionRandomType);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addBeatmapSet(CarouselBeatmapSet set)
|
private void addBeatmapSet(CarouselBeatmapSet set)
|
||||||
@ -350,6 +349,7 @@ namespace osu.Game.Screens.Select
|
|||||||
|
|
||||||
//todo: add to root
|
//todo: add to root
|
||||||
carouselSets.Add(set);
|
carouselSets.Add(set);
|
||||||
|
randomSelectAlgorithm = config.GetBindable<RandomSelectAlgorithm>(OsuSetting.RandomSelectAlgorithm);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void removeBeatmapSet(CarouselBeatmapSet set)
|
private void removeBeatmapSet(CarouselBeatmapSet set)
|
||||||
|
@ -343,7 +343,7 @@
|
|||||||
<Compile Include="Configuration\ReleaseStream.cs" />
|
<Compile Include="Configuration\ReleaseStream.cs" />
|
||||||
<Compile Include="Configuration\ScoreMeterType.cs" />
|
<Compile Include="Configuration\ScoreMeterType.cs" />
|
||||||
<Compile Include="Configuration\ScreenshotFormat.cs" />
|
<Compile Include="Configuration\ScreenshotFormat.cs" />
|
||||||
<Compile Include="Configuration\SongSelectRandomMode.cs" />
|
<Compile Include="Configuration\RandomSelectAlgorithm.cs" />
|
||||||
<Compile Include="Database\DatabaseBackedStore.cs" />
|
<Compile Include="Database\DatabaseBackedStore.cs" />
|
||||||
<Compile Include="Database\OsuDbContext.cs" />
|
<Compile Include="Database\OsuDbContext.cs" />
|
||||||
<Compile Include="Graphics\Backgrounds\Background.cs" />
|
<Compile Include="Graphics\Backgrounds\Background.cs" />
|
||||||
|
Loading…
Reference in New Issue
Block a user