mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 16:02:55 +08:00
Add warning about using high precision mouse on macOS
This commit is contained in:
parent
af9f910a12
commit
b70bd7689e
@ -54,6 +54,11 @@ namespace osu.Game.Localisation
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString CursorSensitivity => new TranslatableString(getKey(@"cursor_sensitivity"), @"Cursor sensitivity");
|
public static LocalisableString CursorSensitivity => new TranslatableString(getKey(@"cursor_sensitivity"), @"Cursor sensitivity");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "This setting currently has issues on macOS. It is recommended to adjust sensitivity externally and keep this disabled for now."
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString HighPrecisionMacOSWarning => new TranslatableString(getKey(@"high_precision_macos_warning"), @"This setting currently has issues on macOS. It is recommended to adjust sensitivity externally and keep this disabled for now.");
|
||||||
|
|
||||||
private static string getKey(string key) => $@"{prefix}:{key}";
|
private static string getKey(string key) => $@"{prefix}:{key}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||||
// See the LICENCE file in the repository root for full licence text.
|
// See the LICENCE file in the repository root for full licence text.
|
||||||
|
|
||||||
|
using osu.Framework;
|
||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Bindables;
|
using osu.Framework.Bindables;
|
||||||
using osu.Framework.Configuration;
|
using osu.Framework.Configuration;
|
||||||
@ -28,6 +29,8 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
private SettingsEnumDropdown<OsuConfineMouseMode> confineMouseModeSetting;
|
private SettingsEnumDropdown<OsuConfineMouseMode> confineMouseModeSetting;
|
||||||
private Bindable<bool> relativeMode;
|
private Bindable<bool> relativeMode;
|
||||||
|
|
||||||
|
private SettingsCheckbox highPrecisionMouse;
|
||||||
|
|
||||||
public MouseSettings(MouseHandler mouseHandler)
|
public MouseSettings(MouseHandler mouseHandler)
|
||||||
{
|
{
|
||||||
this.mouseHandler = mouseHandler;
|
this.mouseHandler = mouseHandler;
|
||||||
@ -45,7 +48,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
|
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new SettingsCheckbox
|
highPrecisionMouse = new SettingsCheckbox
|
||||||
{
|
{
|
||||||
LabelText = MouseSettingsStrings.HighPrecisionMouse,
|
LabelText = MouseSettingsStrings.HighPrecisionMouse,
|
||||||
TooltipText = MouseSettingsStrings.HighPrecisionMouseTooltip,
|
TooltipText = MouseSettingsStrings.HighPrecisionMouseTooltip,
|
||||||
@ -107,6 +110,17 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
confineMouseModeSetting.TooltipText = string.Empty;
|
confineMouseModeSetting.TooltipText = string.Empty;
|
||||||
}
|
}
|
||||||
}, true);
|
}, true);
|
||||||
|
|
||||||
|
highPrecisionMouse.Current.BindValueChanged(highPrecision =>
|
||||||
|
{
|
||||||
|
if (RuntimeInfo.OS == RuntimeInfo.Platform.macOS)
|
||||||
|
{
|
||||||
|
if (highPrecision.NewValue)
|
||||||
|
highPrecisionMouse.WarningText = MouseSettingsStrings.HighPrecisionMacOSWarning;
|
||||||
|
else
|
||||||
|
highPrecisionMouse.WarningText = null;
|
||||||
|
}
|
||||||
|
}, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
private class SensitivitySetting : SettingsSlider<double, SensitivitySlider>
|
private class SensitivitySetting : SettingsSlider<double, SensitivitySlider>
|
||||||
|
Loading…
Reference in New Issue
Block a user