mirror of
https://github.com/osukey/osukey.git
synced 2025-07-07 19:29:55 +09:00
Make tab background opaque when chat is fullscreen
This commit is contained in:
@ -50,6 +50,7 @@ namespace osu.Game.Overlays
|
|||||||
private readonly ChatTabControl channelTabs;
|
private readonly ChatTabControl channelTabs;
|
||||||
|
|
||||||
private readonly Box chatBackground;
|
private readonly Box chatBackground;
|
||||||
|
private readonly Box tabBackground;
|
||||||
|
|
||||||
private Bindable<double> chatHeight;
|
private Bindable<double> chatHeight;
|
||||||
|
|
||||||
@ -120,11 +121,10 @@ namespace osu.Game.Overlays
|
|||||||
Height = TAB_AREA_HEIGHT,
|
Height = TAB_AREA_HEIGHT,
|
||||||
Children = new Drawable[]
|
Children = new Drawable[]
|
||||||
{
|
{
|
||||||
new Box
|
tabBackground = new Box
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = Color4.Black,
|
Colour = Color4.Black,
|
||||||
Alpha = 0.8f,
|
|
||||||
},
|
},
|
||||||
channelTabs = new ChatTabControl
|
channelTabs = new ChatTabControl
|
||||||
{
|
{
|
||||||
@ -196,7 +196,11 @@ namespace osu.Game.Overlays
|
|||||||
api.Register(this);
|
api.Register(this);
|
||||||
|
|
||||||
chatHeight = config.GetBindable<double>(OsuConfig.ChatDisplayHeight);
|
chatHeight = config.GetBindable<double>(OsuConfig.ChatDisplayHeight);
|
||||||
chatHeight.ValueChanged += h => Height = (float)h;
|
chatHeight.ValueChanged += h =>
|
||||||
|
{
|
||||||
|
Height = (float)h;
|
||||||
|
tabBackground.FadeTo(Height == 1 ? 1 : 0.8f, 200);
|
||||||
|
};
|
||||||
chatHeight.TriggerChange();
|
chatHeight.TriggerChange();
|
||||||
|
|
||||||
chatBackground.Colour = colours.ChatBlue;
|
chatBackground.Colour = colours.ChatBlue;
|
||||||
|
Reference in New Issue
Block a user