Move setting to osu! ruleset subsection

This commit is contained in:
Bartłomiej Dach
2020-10-19 21:00:49 +02:00
parent 4267d23d59
commit bca0539735
5 changed files with 13 additions and 14 deletions

View File

@ -19,6 +19,7 @@ namespace osu.Game.Rulesets.Osu.Configuration
Set(OsuRulesetSetting.SnakingInSliders, true); Set(OsuRulesetSetting.SnakingInSliders, true);
Set(OsuRulesetSetting.SnakingOutSliders, true); Set(OsuRulesetSetting.SnakingOutSliders, true);
Set(OsuRulesetSetting.ShowCursorTrail, true); Set(OsuRulesetSetting.ShowCursorTrail, true);
Set(OsuRulesetSetting.ShowPlayfieldBorder, false);
} }
} }
@ -26,6 +27,7 @@ namespace osu.Game.Rulesets.Osu.Configuration
{ {
SnakingInSliders, SnakingInSliders,
SnakingOutSliders, SnakingOutSliders,
ShowCursorTrail ShowCursorTrail,
ShowPlayfieldBorder,
} }
} }

View File

@ -18,8 +18,8 @@ using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI; using osu.Game.Rulesets.UI;
using osu.Game.Skinning; using osu.Game.Skinning;
using osu.Framework.Allocation; using osu.Framework.Allocation;
using osu.Game.Configuration;
using osu.Framework.Bindables; using osu.Framework.Bindables;
using osu.Game.Rulesets.Osu.Configuration;
using osuTK; using osuTK;
namespace osu.Game.Rulesets.Osu.UI namespace osu.Game.Rulesets.Osu.UI
@ -37,7 +37,7 @@ namespace osu.Game.Rulesets.Osu.UI
protected override GameplayCursorContainer CreateCursor() => new OsuCursorContainer(); protected override GameplayCursorContainer CreateCursor() => new OsuCursorContainer();
private Bindable<bool> showPlayfieldBorder; private readonly Bindable<bool> showPlayfieldBorder = new BindableBool();
private readonly IDictionary<HitResult, DrawablePool<DrawableOsuJudgement>> poolDictionary = new Dictionary<HitResult, DrawablePool<DrawableOsuJudgement>>(); private readonly IDictionary<HitResult, DrawablePool<DrawableOsuJudgement>> poolDictionary = new Dictionary<HitResult, DrawablePool<DrawableOsuJudgement>>();
@ -87,10 +87,10 @@ namespace osu.Game.Rulesets.Osu.UI
AddRangeInternal(poolDictionary.Values); AddRangeInternal(poolDictionary.Values);
} }
[BackgroundDependencyLoader] [BackgroundDependencyLoader(true)]
private void load(OsuConfigManager config) private void load(OsuRulesetConfigManager config)
{ {
showPlayfieldBorder = config.GetBindable<bool>(OsuSetting.ShowPlayfieldBorder); config?.BindWith(OsuRulesetSetting.ShowPlayfieldBorder, showPlayfieldBorder);
showPlayfieldBorder.BindValueChanged(updateBorderVisibility, true); showPlayfieldBorder.BindValueChanged(updateBorderVisibility, true);
} }

View File

@ -39,6 +39,11 @@ namespace osu.Game.Rulesets.Osu.UI
LabelText = "Cursor trail", LabelText = "Cursor trail",
Current = config.GetBindable<bool>(OsuRulesetSetting.ShowCursorTrail) Current = config.GetBindable<bool>(OsuRulesetSetting.ShowCursorTrail)
}, },
new SettingsCheckbox
{
LabelText = "Show playfield border",
Current = config.GetBindable<bool>(OsuRulesetSetting.ShowPlayfieldBorder),
},
}; };
} }
} }

View File

@ -106,8 +106,6 @@ namespace osu.Game.Configuration
Set(OsuSetting.IncreaseFirstObjectVisibility, true); Set(OsuSetting.IncreaseFirstObjectVisibility, true);
Set(OsuSetting.GameplayDisableWinKey, true); Set(OsuSetting.GameplayDisableWinKey, true);
Set(OsuSetting.ShowPlayfieldBorder, false);
// Update // Update
Set(OsuSetting.ReleaseStream, ReleaseStream.Lazer); Set(OsuSetting.ReleaseStream, ReleaseStream.Lazer);
@ -241,6 +239,5 @@ namespace osu.Game.Configuration
HitLighting, HitLighting,
MenuBackgroundSource, MenuBackgroundSource,
GameplayDisableWinKey, GameplayDisableWinKey,
ShowPlayfieldBorder,
} }
} }

View File

@ -79,11 +79,6 @@ namespace osu.Game.Overlays.Settings.Sections.Gameplay
Current = config.GetBindable<ScoringMode>(OsuSetting.ScoreDisplayMode), Current = config.GetBindable<ScoringMode>(OsuSetting.ScoreDisplayMode),
Keywords = new[] { "scoring" } Keywords = new[] { "scoring" }
}, },
new SettingsCheckbox
{
LabelText = "Show playfield border",
Current = config.GetBindable<bool>(OsuSetting.ShowPlayfieldBorder),
},
}; };
if (RuntimeInfo.OS == RuntimeInfo.Platform.Windows) if (RuntimeInfo.OS == RuntimeInfo.Platform.Windows)