mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 22:56:36 +09:00
Move Playfield Border to OsuPlayfield Ruleset
This commit is contained in:
@ -12,6 +12,10 @@ using osu.Game.Rulesets.UI;
|
||||
using osu.Game.Rulesets.Judgements;
|
||||
using osu.Game.Rulesets.Osu.UI.Cursor;
|
||||
using osu.Game.Skinning;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Framework.Bindables;
|
||||
using osu.Game.Screens;
|
||||
|
||||
namespace osu.Game.Rulesets.Osu.UI
|
||||
{
|
||||
@ -26,6 +30,8 @@ namespace osu.Game.Rulesets.Osu.UI
|
||||
|
||||
protected override GameplayCursorContainer CreateCursor() => new OsuCursorContainer();
|
||||
|
||||
private Bindable<bool> showPlayfieldBorder;
|
||||
|
||||
public OsuPlayfield()
|
||||
{
|
||||
InternalChildren = new Drawable[]
|
||||
@ -56,6 +62,19 @@ namespace osu.Game.Rulesets.Osu.UI
|
||||
hitPolicy = new OrderedHitPolicy(HitObjectContainer);
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
{
|
||||
showPlayfieldBorder = config.GetBindable<bool>(OsuSetting.ShowPlayfieldBorder);
|
||||
if (showPlayfieldBorder.Value)
|
||||
{
|
||||
AddInternal(new PlayfieldBorder
|
||||
{
|
||||
RelativeSizeAxes = Axes.Both
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
public override void Add(DrawableHitObject h)
|
||||
{
|
||||
h.OnNewResult += onNewResult;
|
||||
|
Reference in New Issue
Block a user