1
0
mirror of https://github.com/ppy/osu.git synced 2024-11-11 11:37:28 +08:00

Truncate room name text

This commit is contained in:
Joseph Madamba 2023-06-13 13:56:29 -07:00
parent df49a48d4d
commit 2a3f2ff122

View File

@ -179,7 +179,12 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
Direction = FillDirection.Vertical,
Children = new Drawable[]
{
new RoomNameText(),
new TruncatingSpriteText
{
RelativeSizeAxes = Axes.X,
Font = OsuFont.GetFont(size: 28),
Current = { BindTarget = Room.Name }
},
new RoomStatusText()
}
}
@ -316,23 +321,6 @@ namespace osu.Game.Screens.OnlinePlay.Lounge.Components
return pills;
}
private partial class RoomNameText : OsuSpriteText
{
[Resolved(typeof(Room), nameof(Online.Rooms.Room.Name))]
private Bindable<string> name { get; set; }
public RoomNameText()
{
Font = OsuFont.GetFont(size: 28);
}
[BackgroundDependencyLoader]
private void load()
{
Current = name;
}
}
private partial class RoomStatusText : OnlinePlayComposite
{
[Resolved]