Apply changes to UI components overriding functions with changing signatures

This commit is contained in:
Dean Herbert
2021-02-22 17:14:00 +09:00
parent c99e152fe4
commit 1fd76ea3fb
42 changed files with 68 additions and 66 deletions

View File

@ -10,6 +10,7 @@ using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.Events;
using osu.Framework.Localisation;
using osu.Game.Graphics.Sprites;
using osuTK.Graphics;
@ -105,7 +106,7 @@ namespace osu.Game.Graphics.UserInterface
protected class TextContainer : Container, IHasText
{
public string Text
public LocalisableString Text
{
get => NormalText.Text;
set

View File

@ -11,6 +11,7 @@ using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.Events;
using osu.Framework.Localisation;
using osu.Game.Graphics.Sprites;
using osuTK.Graphics;
@ -21,9 +22,9 @@ namespace osu.Game.Graphics.UserInterface
/// </summary>
public class OsuButton : Button
{
public string Text
public LocalisableString Text
{
get => SpriteText?.Text;
get => SpriteText.Text;
set
{
if (SpriteText != null)

View File

@ -9,6 +9,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Localisation;
using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Sprites;
using osuTK;
@ -168,7 +169,7 @@ namespace osu.Game.Graphics.UserInterface
protected new class Content : FillFlowContainer, IHasText
{
public string Text
public LocalisableString Text
{
get => Label.Text;
set => Label.Text = value;
@ -215,7 +216,7 @@ namespace osu.Game.Graphics.UserInterface
{
protected readonly SpriteText Text;
protected override string Label
protected override LocalisableString Label
{
get => Text.Text;
set => Text.Text = value;

View File

@ -11,6 +11,7 @@ using osu.Game.Graphics.Sprites;
using osu.Framework.Graphics.Sprites;
using osu.Framework.Graphics.UserInterface;
using osu.Framework.Input.Events;
using osu.Framework.Localisation;
namespace osu.Game.Graphics.UserInterface
{
@ -35,7 +36,7 @@ namespace osu.Game.Graphics.UserInterface
}
}
public string Text
public LocalisableString Text
{
get => text.Text;
set => text.Text = value;

View File

@ -11,6 +11,7 @@ using osu.Game.Graphics.Sprites;
using osu.Game.Overlays;
using osuTK;
using System.Collections.Generic;
using osu.Framework.Localisation;
namespace osu.Game.Graphics.UserInterface
{
@ -18,7 +19,7 @@ namespace osu.Game.Graphics.UserInterface
{
private const int duration = 200;
public string Text
public LocalisableString Text
{
get => text.Text;
set => text.Text = value;

View File

@ -27,7 +27,7 @@ namespace osu.Game.Graphics.UserInterface
});
}
public virtual IEnumerable<string> FilterTerms => new[] { Text };
public virtual IEnumerable<string> FilterTerms => new[] { Text.ToString() };
public bool MatchingFilter
{