1
0
mirror of https://github.com/ppy/osu.git synced 2025-01-27 15:53:19 +08:00

Subclass and use yellow for stand-alone chat display

This commit is contained in:
Dean Herbert 2019-10-23 00:24:08 +09:00
parent 3b4823abe7
commit e9aa7f3218
2 changed files with 19 additions and 9 deletions

View File

@ -8,6 +8,7 @@ using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Graphics.UserInterface;
using osu.Game.Graphics;
using osu.Game.Graphics.UserInterface;
using osu.Game.Overlays.Chat;
using osuTK.Graphics;
@ -124,14 +125,7 @@ namespace osu.Game.Online.Chat
protected override ChatLine CreateChatLine(Message m) => CreateChatLineAction(m);
protected override DaySeparator CreateDaySeparator(DateTimeOffset time) => new DaySeparator(time)
{
Colour = Color4.White,
TextSize = 14,
LineHeight = 1,
Padding = new MarginPadding { Horizontal = 10 },
Margin = new MarginPadding { Vertical = 5 },
};
protected override DaySeparator CreateDaySeparator(DateTimeOffset time) => new CustomDaySeparator(time);
public StandAloneDrawableChannel(Channel channel)
: base(channel)
@ -143,6 +137,23 @@ namespace osu.Game.Online.Chat
{
ChatLineFlow.Padding = new MarginPadding { Horizontal = 0 };
}
private class CustomDaySeparator : DaySeparator
{
public CustomDaySeparator(DateTimeOffset time) : base(time)
{
}
[BackgroundDependencyLoader]
private void load(OsuColour colours)
{
Colour = colours.Yellow;
TextSize = 14;
LineHeight = 1;
Padding = new MarginPadding { Horizontal = 10 };
Margin = new MarginPadding { Vertical = 5 };
}
}
}
protected class StandAloneMessage : ChatLine

View File

@ -13,7 +13,6 @@ using osu.Game.Graphics.Containers;
using osu.Game.Graphics.Cursor;
using osu.Game.Online.Chat;
using osu.Framework.Graphics.Shapes;
using osu.Framework.Extensions.IEnumerableExtensions;
using osu.Game.Graphics;
using osu.Framework.Extensions.Color4Extensions;
using osu.Framework.Graphics.Sprites;