1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-15 06:42:56 +08:00

Fix confine mode dropdown becoming visible again after filtering

Changes from a hidden to a disabled state, with a tooltip explaining
why.

Closes #11851.
This commit is contained in:
Dean Herbert 2021-03-02 17:44:56 +09:00
parent a75537142d
commit 6372a0265a

View File

@ -68,7 +68,21 @@ namespace osu.Game.Overlays.Settings.Sections.Input
};
windowMode = config.GetBindable<WindowMode>(FrameworkSetting.WindowMode);
windowMode.BindValueChanged(mode => confineMouseModeSetting.Alpha = mode.NewValue == WindowMode.Fullscreen ? 0 : 1, true);
windowMode.BindValueChanged(mode =>
{
var isFullscreen = mode.NewValue == WindowMode.Fullscreen;
if (isFullscreen)
{
confineMouseModeSetting.Current.Disabled = true;
confineMouseModeSetting.TooltipText = "Not applicable in full screen mode";
}
else
{
confineMouseModeSetting.Current.Disabled = false;
confineMouseModeSetting.TooltipText = string.Empty;
}
}, true);
if (RuntimeInfo.OS != RuntimeInfo.Platform.Windows)
{