1
0
mirror of https://github.com/ppy/osu.git synced 2025-02-15 10:22:56 +08:00

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

View File

@ -18,8 +18,8 @@ using osu.Game.Rulesets.Scoring;
using osu.Game.Rulesets.UI;
using osu.Game.Skinning;
using osu.Framework.Allocation;
using osu.Game.Configuration;
using osu.Framework.Bindables;
using osu.Game.Rulesets.Osu.Configuration;
using osuTK;
namespace osu.Game.Rulesets.Osu.UI
@ -37,7 +37,7 @@ namespace osu.Game.Rulesets.Osu.UI
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>>();
@ -87,10 +87,10 @@ namespace osu.Game.Rulesets.Osu.UI
AddRangeInternal(poolDictionary.Values);
}
[BackgroundDependencyLoader]
private void load(OsuConfigManager config)
[BackgroundDependencyLoader(true)]
private void load(OsuRulesetConfigManager config)
{
showPlayfieldBorder = config.GetBindable<bool>(OsuSetting.ShowPlayfieldBorder);
config?.BindWith(OsuRulesetSetting.ShowPlayfieldBorder, showPlayfieldBorder);
showPlayfieldBorder.BindValueChanged(updateBorderVisibility, true);
}

View File

@ -39,6 +39,11 @@ namespace osu.Game.Rulesets.Osu.UI
LabelText = "Cursor trail",
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.GameplayDisableWinKey, true);
Set(OsuSetting.ShowPlayfieldBorder, false);
// Update
Set(OsuSetting.ReleaseStream, ReleaseStream.Lazer);
@ -241,6 +239,5 @@ namespace osu.Game.Configuration
HitLighting,
MenuBackgroundSource,
GameplayDisableWinKey,
ShowPlayfieldBorder,
}
}

View File

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