mirror of
https://github.com/ppy/osu.git
synced 2025-02-14 03:22:54 +08:00
Adjust background colours of textbox in chat display
This commit is contained in:
parent
35b9f84c00
commit
b82f92d7b8
@ -30,6 +30,8 @@ namespace osu.Game.Online.Chat
|
||||
|
||||
private readonly bool postingTextbox;
|
||||
|
||||
protected readonly Box Background;
|
||||
|
||||
private const float textbox_height = 30;
|
||||
|
||||
/// <summary>
|
||||
@ -44,7 +46,7 @@ namespace osu.Game.Online.Chat
|
||||
|
||||
InternalChildren = new Drawable[]
|
||||
{
|
||||
new Box
|
||||
Background = new Box
|
||||
{
|
||||
Colour = Color4.Black,
|
||||
Alpha = 0.8f,
|
||||
@ -54,7 +56,7 @@ namespace osu.Game.Online.Chat
|
||||
|
||||
if (postingTextbox)
|
||||
{
|
||||
AddInternal(Textbox = new FocusedTextBox
|
||||
AddInternal(Textbox = new ChatTextBox
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Height = textbox_height,
|
||||
@ -110,6 +112,17 @@ namespace osu.Game.Online.Chat
|
||||
AddInternal(drawableChannel);
|
||||
}
|
||||
|
||||
public class ChatTextBox : FocusedTextBox
|
||||
{
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
BackgroundUnfocused = new Color4(10, 10, 10, 10);
|
||||
BackgroundFocused = new Color4(10, 10, 10, 255);
|
||||
}
|
||||
}
|
||||
|
||||
public class StandAloneDrawableChannel : DrawableChannel
|
||||
{
|
||||
public Func<Message, ChatLine> CreateChatLineAction;
|
||||
|
Loading…
Reference in New Issue
Block a user