1
0
mirror of https://github.com/ppy/osu.git synced 2025-03-28 01:47:33 +08:00

Allow localisation of PlaceholderText

This commit is contained in:
Dean Herbert 2022-05-17 17:42:46 +09:00
parent c0de1f96ff
commit 83e781d5a1
2 changed files with 3 additions and 2 deletions

View File

@ -6,6 +6,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers; using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.UserInterface; using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.Events; using osu.Framework.Input.Events;
using osu.Framework.Localisation;
using osu.Game.Graphics.UserInterface; using osu.Game.Graphics.UserInterface;
namespace osu.Game.Graphics.UserInterfaceV2 namespace osu.Game.Graphics.UserInterfaceV2
@ -25,7 +26,7 @@ namespace osu.Game.Graphics.UserInterfaceV2
set => Component.ReadOnly = value; set => Component.ReadOnly = value;
} }
public string PlaceholderText public LocalisableString PlaceholderText
{ {
set => Component.PlaceholderText = value; set => Component.PlaceholderText = value;
} }

View File

@ -154,7 +154,7 @@ namespace osu.Game.Screens.Edit.Compose.Components.Timeline
private void updateBankPlaceholderText(IEnumerable<HitObject> objects) private void updateBankPlaceholderText(IEnumerable<HitObject> objects)
{ {
string? commonBank = getCommonBank(objects.Select(h => h.SampleControlPoint).ToArray()); string? commonBank = getCommonBank(objects.Select(h => h.SampleControlPoint).ToArray());
bank.PlaceholderText = string.IsNullOrEmpty(commonBank) ? "(multiple)" : null; bank.PlaceholderText = string.IsNullOrEmpty(commonBank) ? "(multiple)" : string.Empty;
} }
private void updateVolumeFor(IEnumerable<HitObject> objects, int? newVolume) private void updateVolumeFor(IEnumerable<HitObject> objects, int? newVolume)