1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-06 06:17:23 +08:00

Implement enable state changes locally for InputHandlers which should be toggleable

This commit is contained in:
Dean Herbert 2021-03-18 21:17:04 +09:00
parent c694deb7d6
commit a8cc3a3b44

View File

@ -9,7 +9,6 @@ using osu.Framework.Input.Handlers.Joystick;
using osu.Framework.Input.Handlers.Midi;
using osu.Framework.Input.Handlers.Mouse;
using osu.Framework.Platform;
using osu.Game.Configuration;
using osu.Game.Overlays.Settings.Sections.Input;
namespace osu.Game.Overlays.Settings.Sections
@ -70,13 +69,6 @@ namespace osu.Game.Overlays.Settings.Sections
return null;
}
var settingsControls = handler.CreateSettingsControlsFromAllBindables(false);
if (settingsControls.Count == 0)
return null;
section.AddRange(settingsControls);
return section;
}
@ -89,6 +81,19 @@ namespace osu.Game.Overlays.Settings.Sections
this.handler = handler;
}
[BackgroundDependencyLoader]
private void load()
{
Children = new Drawable[]
{
new SettingsCheckbox
{
LabelText = "Enabled",
Current = handler.Enabled
},
};
}
protected override string Header => handler.Description;
}
}