From bc5bcfa66a5c737d62128e793a373bf04f8d741c Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 12 May 2017 19:15:04 +0900 Subject: [PATCH] Make tab background opaque when chat is fullscreen --- osu.Game/Overlays/ChatOverlay.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/osu.Game/Overlays/ChatOverlay.cs b/osu.Game/Overlays/ChatOverlay.cs index 812ab236e7..15f8586125 100644 --- a/osu.Game/Overlays/ChatOverlay.cs +++ b/osu.Game/Overlays/ChatOverlay.cs @@ -50,6 +50,7 @@ namespace osu.Game.Overlays private readonly ChatTabControl channelTabs; private readonly Box chatBackground; + private readonly Box tabBackground; private Bindable chatHeight; @@ -120,11 +121,10 @@ namespace osu.Game.Overlays Height = TAB_AREA_HEIGHT, Children = new Drawable[] { - new Box + tabBackground = new Box { RelativeSizeAxes = Axes.Both, Colour = Color4.Black, - Alpha = 0.8f, }, channelTabs = new ChatTabControl { @@ -196,7 +196,11 @@ namespace osu.Game.Overlays api.Register(this); chatHeight = config.GetBindable(OsuConfig.ChatDisplayHeight); - chatHeight.ValueChanged += h => Height = (float)h; + chatHeight.ValueChanged += h => + { + Height = (float)h; + tabBackground.FadeTo(Height == 1 ? 1 : 0.8f, 200); + }; chatHeight.TriggerChange(); chatBackground.Colour = colours.ChatBlue;