mirror of
https://github.com/ppy/osu.git
synced 2024-12-14 07:42:57 +08:00
Truncate room name text
This commit is contained in:
parent
df49a48d4d
commit
2a3f2ff122
@ -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]
|
||||
|
Loading…
Reference in New Issue
Block a user