Add support for localisation where it was missing

This commit is contained in:
ansel
2023-01-15 01:46:11 +03:00
parent 43c0f8b95f
commit 76eefc7573
5 changed files with 15 additions and 23 deletions

View File

@ -1,10 +1,9 @@
// 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.
#nullable disable
using System;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Localisation;
namespace osu.Game.Graphics.UserInterface
{
@ -18,7 +17,7 @@ namespace osu.Game.Graphics.UserInterface
/// </summary>
/// <param name="text">The text to display.</param>
/// <param name="type">The type of action which this <see cref="ToggleMenuItem"/> performs.</param>
public ToggleMenuItem(string text, MenuItemType type = MenuItemType.Standard)
public ToggleMenuItem(LocalisableString text, MenuItemType type = MenuItemType.Standard)
: this(text, type, null)
{
}
@ -29,7 +28,7 @@ namespace osu.Game.Graphics.UserInterface
/// <param name="text">The text to display.</param>
/// <param name="type">The type of action which this <see cref="ToggleMenuItem"/> performs.</param>
/// <param name="action">A delegate to be invoked when this <see cref="ToggleMenuItem"/> is pressed.</param>
public ToggleMenuItem(string text, MenuItemType type, Action<bool> action)
public ToggleMenuItem(LocalisableString text, MenuItemType type, Action<bool>? action)
: base(text, value => !value, type, action)
{
}