mirror of
https://github.com/ppy/osu.git
synced 2025-01-15 07:22:55 +08:00
Fixed only the links being italics for /me messages
This commit is contained in:
parent
cbfef7052e
commit
c4f5754f94
@ -189,7 +189,12 @@ namespace osu.Game.Overlays.Chat
|
|||||||
Padding = new MarginPadding { Left = message_padding + padding },
|
Padding = new MarginPadding { Left = message_padding + padding },
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
contentFlow = new OsuLinkTextFlowContainer<ChatLink>(t => { t.TextSize = text_size; })
|
contentFlow = new OsuLinkTextFlowContainer<ChatLink>(t =>
|
||||||
|
{
|
||||||
|
if (Message.IsAction)
|
||||||
|
t.Font = "Exo2.0-MediumItalic";
|
||||||
|
t.TextSize = text_size;
|
||||||
|
})
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Y,
|
AutoSizeAxes = Axes.Y,
|
||||||
RelativeSizeAxes = Axes.X,
|
RelativeSizeAxes = Axes.X,
|
||||||
@ -218,13 +223,7 @@ namespace osu.Game.Overlays.Chat
|
|||||||
contentFlow.Clear();
|
contentFlow.Clear();
|
||||||
|
|
||||||
if (message.Links == null || message.Links.Count == 0)
|
if (message.Links == null || message.Links.Count == 0)
|
||||||
{
|
contentFlow.AddText(message.Content);
|
||||||
contentFlow.AddText(message.Content, sprite =>
|
|
||||||
{
|
|
||||||
if (message.IsAction)
|
|
||||||
sprite.Font = @"Exo2.0-MediumItalic";
|
|
||||||
});
|
|
||||||
}
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
int prevIndex = 0;
|
int prevIndex = 0;
|
||||||
@ -247,9 +246,6 @@ namespace osu.Game.Overlays.Chat
|
|||||||
contentFlow.AddLink(message.Content.Substring(link.Index, link.Length), link.Url, sprite =>
|
contentFlow.AddLink(message.Content.Substring(link.Index, link.Length), link.Url, sprite =>
|
||||||
{
|
{
|
||||||
((OsuLinkSpriteText)sprite).TextColour = urlColour;
|
((OsuLinkSpriteText)sprite).TextColour = urlColour;
|
||||||
|
|
||||||
if (message.IsAction)
|
|
||||||
sprite.Font = @"Exo2.0-MediumItalic";
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user