mirror of
https://github.com/ppy/osu.git
synced 2024-11-11 10:33:30 +08:00
Hide confine setting entirely in fullscreen
This commit is contained in:
parent
08f23cc424
commit
71edada623
@ -20,6 +20,9 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
private Bindable<double> sensitivityBindable = new BindableDouble();
|
||||
private Bindable<string> ignoredInputHandlers;
|
||||
|
||||
private Bindable<WindowMode> windowMode;
|
||||
private SettingsEnumDropdown<OsuConfineMouseMode> confineMouseModeSetting;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuConfigManager osuConfig, FrameworkConfigManager config)
|
||||
{
|
||||
@ -30,6 +33,9 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
configSensitivity.BindValueChanged(val => sensitivityBindable.Value = val.NewValue);
|
||||
sensitivityBindable.BindValueChanged(val => configSensitivity.Value = val.NewValue);
|
||||
|
||||
windowMode = config.GetBindable<WindowMode>(FrameworkSetting.WindowMode);
|
||||
windowMode.BindValueChanged(mode => confineMouseModeSetting.Alpha = mode.NewValue == WindowMode.Fullscreen ? 0 : 1);
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new SettingsCheckbox
|
||||
@ -47,7 +53,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
||||
LabelText = "Map absolute input to window",
|
||||
Current = config.GetBindable<bool>(FrameworkSetting.MapAbsoluteInputToWindow)
|
||||
},
|
||||
new SettingsEnumDropdown<OsuConfineMouseMode>
|
||||
confineMouseModeSetting = new SettingsEnumDropdown<OsuConfineMouseMode>
|
||||
{
|
||||
LabelText = "Confine mouse cursor to window",
|
||||
Current = osuConfig.GetBindable<OsuConfineMouseMode>(OsuSetting.ConfineMouseMode)
|
||||
|
Loading…
Reference in New Issue
Block a user