mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 08:49:59 +09:00
Add support for framework-level mouse confining.
This commit is contained in:
@ -2,7 +2,9 @@
|
||||
// Licensed under the MIT Licence - https://raw.githubusercontent.com/ppy/osu/master/LICENCE
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Configuration;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Input;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
|
||||
@ -13,44 +15,44 @@ namespace osu.Game.Overlays.Options.Sections.Input
|
||||
protected override string Header => "Mouse";
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager config)
|
||||
private void load(OsuConfigManager osuConfig, FrameworkConfigManager config)
|
||||
{
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new OptionSlider<double, SensitivitySlider>
|
||||
{
|
||||
LabelText = "Sensitivity",
|
||||
Bindable = config.GetBindable<double>(OsuConfig.MouseSpeed)
|
||||
Bindable = osuConfig.GetBindable<double>(OsuConfig.MouseSpeed)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Raw input",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.RawInput)
|
||||
Bindable = osuConfig.GetBindable<bool>(OsuConfig.RawInput)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Map absolute raw input to the osu! window",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.AbsoluteToOsuWindow)
|
||||
Bindable = osuConfig.GetBindable<bool>(OsuConfig.AbsoluteToOsuWindow)
|
||||
},
|
||||
new OptionEnumDropdown<ConfineMouseMode>
|
||||
{
|
||||
LabelText = "Confine mouse cursor",
|
||||
Bindable = config.GetBindable<ConfineMouseMode>(OsuConfig.ConfineMouse),
|
||||
Bindable = config.GetBindable<ConfineMouseMode>(FrameworkConfig.ConfineMouseMode),
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Disable mouse wheel in play mode",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.MouseDisableWheel)
|
||||
LabelText = "Disable mouse wheel during gameplay",
|
||||
Bindable = osuConfig.GetBindable<bool>(OsuConfig.MouseDisableWheel)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Disable mouse buttons in play mode",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.MouseDisableButtons)
|
||||
LabelText = "Disable mouse buttons during gameplay",
|
||||
Bindable = osuConfig.GetBindable<bool>(OsuConfig.MouseDisableButtons)
|
||||
},
|
||||
new OsuCheckbox
|
||||
{
|
||||
LabelText = "Cursor ripples",
|
||||
Bindable = config.GetBindable<bool>(OsuConfig.CursorRipple)
|
||||
Bindable = osuConfig.GetBindable<bool>(OsuConfig.CursorRipple)
|
||||
},
|
||||
};
|
||||
}
|
||||
|
Reference in New Issue
Block a user