1
0
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:
Bartłomiej Dach 2020-12-05 22:13:51 +01:00
parent 08f23cc424
commit 71edada623

View File

@ -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)