mirror of
https://github.com/osukey/osukey.git
synced 2025-07-03 01:09:57 +09:00
Add truncatino of long usernames in chat
This commit is contained in:
@ -31,6 +31,8 @@ namespace osu.Game.Overlays.Chat
|
||||
|
||||
protected virtual float MessagePadding => default_message_padding;
|
||||
|
||||
private const float timestamp_padding = 70;
|
||||
|
||||
private const float default_horizontal_padding = 15;
|
||||
|
||||
protected virtual float HorizontalPadding => default_horizontal_padding;
|
||||
@ -87,7 +89,10 @@ namespace osu.Game.Overlays.Chat
|
||||
{
|
||||
Shadow = false,
|
||||
Colour = hasBackground ? customUsernameColour : username_colours[message.Sender.Id % username_colours.Length],
|
||||
Font = OsuFont.GetFont(size: TextSize, weight: FontWeight.Bold, italics: true)
|
||||
Truncate = true,
|
||||
EllipsisString = ".. :",
|
||||
Font = OsuFont.GetFont(size: TextSize, weight: FontWeight.Bold, italics: true),
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
};
|
||||
|
||||
if (hasBackground)
|
||||
@ -141,7 +146,8 @@ namespace osu.Game.Overlays.Chat
|
||||
},
|
||||
new MessageSender(message.Sender)
|
||||
{
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Padding = new MarginPadding { Left = timestamp_padding },
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Origin = Anchor.TopRight,
|
||||
Anchor = Anchor.TopRight,
|
||||
Child = effectedUsername,
|
||||
|
Reference in New Issue
Block a user