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:
parent
c0de1f96ff
commit
83e781d5a1
@ -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;
|
||||||
}
|
}
|
||||||
|
@ -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)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user