mirror of
https://github.com/ppy/osu.git
synced 2025-01-12 18:23:04 +08:00
Add localisation support for MouseSettings
This commit is contained in:
parent
d58534dce6
commit
3f3adfe297
@ -14,6 +14,46 @@ namespace osu.Game.Localisation
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
public static LocalisableString Mouse => new TranslatableString(getKey(@"mouse"), @"Mouse");
|
public static LocalisableString Mouse => new TranslatableString(getKey(@"mouse"), @"Mouse");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Not applicable in full screen mode"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString NotApplicableFullscreen => new TranslatableString(getKey(@"not_applicable_full_screen"), @"Not applicable in full screen mode");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "High precision mouse"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString HighPrecisionMouse => new TranslatableString(getKey(@"high_precision_mouse"), @"High precision mouse");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Attempts to bypass any operation system mouse acceleration. On windows, this is equivalent to what used to be known as "Raw Input"."
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString HighPrecisionMouseTooltip => new TranslatableString(getKey(@"high_precision_mouse_tooltip"), @"Attempts to bypass any operation system mouse acceleration. On windows, this is equivalent to what used to be known as ""Raw Input"".");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Confine mouse cursor to window"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString ConfineMouseMode => new TranslatableString(getKey(@"confine_mouse_mode"), @"Confine mouse cursor to window");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Disable mouse wheel during gameplay"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString DisableMouseWheel => new TranslatableString(getKey(@"disable_mouse_wheel"), @"Disable mouse wheel during gameplay");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Disable mouse buttons during gameplay"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString DisableMouseButtons => new TranslatableString(getKey(@"disable_mouse_buttons"), @"Disable mouse buttons during gameplay");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Enable high precision mouse to adjust sensitivity"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString EnableHighPrecisionForSensitivityAdjust => new TranslatableString(getKey(@"enable_high_precision_for_sensitivity_adjust"), @"Enable high precision mouse to adjust sensitivity");
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// "Cursor sensitivity"
|
||||||
|
/// </summary>
|
||||||
|
public static LocalisableString CursorSensitivity => new TranslatableString(getKey(@"cursor_sensitivity"), @"Cursor sensitivity");
|
||||||
|
|
||||||
private static string getKey(string key) => $@"{prefix}:{key}";
|
private static string getKey(string key) => $@"{prefix}:{key}";
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -47,29 +47,29 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
{
|
{
|
||||||
new SettingsCheckbox
|
new SettingsCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "High precision mouse",
|
LabelText = MouseSettingsStrings.HighPrecisionMouse,
|
||||||
TooltipText = "Attempts to bypass any operation system mouse acceleration. On windows, this is equivalent to what used to be known as \"Raw Input\".",
|
TooltipText = MouseSettingsStrings.HighPrecisionMouseTooltip,
|
||||||
Current = relativeMode,
|
Current = relativeMode,
|
||||||
Keywords = new[] { "raw", "input", "relative", "cursor" }
|
Keywords = new[] { @"raw", @"input", @"relative", @"cursor" }
|
||||||
},
|
},
|
||||||
new SensitivitySetting
|
new SensitivitySetting
|
||||||
{
|
{
|
||||||
LabelText = "Cursor sensitivity",
|
LabelText = MouseSettingsStrings.CursorSensitivity,
|
||||||
Current = localSensitivity
|
Current = localSensitivity
|
||||||
},
|
},
|
||||||
confineMouseModeSetting = new SettingsEnumDropdown<OsuConfineMouseMode>
|
confineMouseModeSetting = new SettingsEnumDropdown<OsuConfineMouseMode>
|
||||||
{
|
{
|
||||||
LabelText = "Confine mouse cursor to window",
|
LabelText = MouseSettingsStrings.ConfineMouseMode,
|
||||||
Current = osuConfig.GetBindable<OsuConfineMouseMode>(OsuSetting.ConfineMouseMode)
|
Current = osuConfig.GetBindable<OsuConfineMouseMode>(OsuSetting.ConfineMouseMode)
|
||||||
},
|
},
|
||||||
new SettingsCheckbox
|
new SettingsCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Disable mouse wheel during gameplay",
|
LabelText = MouseSettingsStrings.DisableMouseWheel,
|
||||||
Current = osuConfig.GetBindable<bool>(OsuSetting.MouseDisableWheel)
|
Current = osuConfig.GetBindable<bool>(OsuSetting.MouseDisableWheel)
|
||||||
},
|
},
|
||||||
new SettingsCheckbox
|
new SettingsCheckbox
|
||||||
{
|
{
|
||||||
LabelText = "Disable mouse buttons during gameplay",
|
LabelText = MouseSettingsStrings.DisableMouseButtons,
|
||||||
Current = osuConfig.GetBindable<bool>(OsuSetting.MouseDisableButtons)
|
Current = osuConfig.GetBindable<bool>(OsuSetting.MouseDisableButtons)
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
@ -99,7 +99,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
if (isFullscreen)
|
if (isFullscreen)
|
||||||
{
|
{
|
||||||
confineMouseModeSetting.Current.Disabled = true;
|
confineMouseModeSetting.Current.Disabled = true;
|
||||||
confineMouseModeSetting.TooltipText = "Not applicable in full screen mode";
|
confineMouseModeSetting.TooltipText = MouseSettingsStrings.NotApplicableFullscreen;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -120,7 +120,7 @@ namespace osu.Game.Overlays.Settings.Sections.Input
|
|||||||
|
|
||||||
private class SensitivitySlider : OsuSliderBar<double>
|
private class SensitivitySlider : OsuSliderBar<double>
|
||||||
{
|
{
|
||||||
public override LocalisableString TooltipText => Current.Disabled ? "enable high precision mouse to adjust sensitivity" : $"{base.TooltipText}x";
|
public override LocalisableString TooltipText => Current.Disabled ? MouseSettingsStrings.EnableHighPrecisionForSensitivityAdjust : $"{base.TooltipText}x";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user