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:
parent
3b4823abe7
commit
e9aa7f3218
@ -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
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user