mirror of
https://github.com/ppy/osu.git
synced 2025-01-30 01:32:55 +08:00
Implement enable state changes locally for InputHandlers which should be toggleable
This commit is contained in:
parent
c694deb7d6
commit
a8cc3a3b44
@ -9,7 +9,6 @@ using osu.Framework.Input.Handlers.Joystick;
|
|||||||
using osu.Framework.Input.Handlers.Midi;
|
using osu.Framework.Input.Handlers.Midi;
|
||||||
using osu.Framework.Input.Handlers.Mouse;
|
using osu.Framework.Input.Handlers.Mouse;
|
||||||
using osu.Framework.Platform;
|
using osu.Framework.Platform;
|
||||||
using osu.Game.Configuration;
|
|
||||||
using osu.Game.Overlays.Settings.Sections.Input;
|
using osu.Game.Overlays.Settings.Sections.Input;
|
||||||
|
|
||||||
namespace osu.Game.Overlays.Settings.Sections
|
namespace osu.Game.Overlays.Settings.Sections
|
||||||
@ -70,13 +69,6 @@ namespace osu.Game.Overlays.Settings.Sections
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
var settingsControls = handler.CreateSettingsControlsFromAllBindables(false);
|
|
||||||
|
|
||||||
if (settingsControls.Count == 0)
|
|
||||||
return null;
|
|
||||||
|
|
||||||
section.AddRange(settingsControls);
|
|
||||||
|
|
||||||
return section;
|
return section;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,6 +81,19 @@ namespace osu.Game.Overlays.Settings.Sections
|
|||||||
this.handler = handler;
|
this.handler = handler;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[BackgroundDependencyLoader]
|
||||||
|
private void load()
|
||||||
|
{
|
||||||
|
Children = new Drawable[]
|
||||||
|
{
|
||||||
|
new SettingsCheckbox
|
||||||
|
{
|
||||||
|
LabelText = "Enabled",
|
||||||
|
Current = handler.Enabled
|
||||||
|
},
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
protected override string Header => handler.Description;
|
protected override string Header => handler.Description;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user