remove duplicate code

This commit is contained in:
Jorolf 2017-05-26 12:10:16 +02:00
parent a9658ec66f
commit 1e4bca90f0

View File

@ -24,9 +24,7 @@ namespace osu.Game.Overlays.Chat
private const float shear_width = 10; private const float shear_width = 10;
private readonly Bindable<bool> channelSelectorActive = new Bindable<bool>(); public readonly Bindable<bool> ChannelSelectorActive = new Bindable<bool>();
public Bindable<bool> ChannelSelectorActive => channelSelectorActive;
public ChatTabControl() public ChatTabControl()
{ {
@ -43,7 +41,7 @@ namespace osu.Game.Overlays.Chat
Padding = new MarginPadding(10), Padding = new MarginPadding(10),
}); });
AddTabItem(new ChannelTabItem.ChannelSelectorTabItem(new Channel { Name = "+" }, channelSelectorActive)); AddTabItem(new ChannelTabItem.ChannelSelectorTabItem(new Channel { Name = "+" }, ChannelSelectorActive));
} }
private class ChannelTabItem : TabItem<Channel> private class ChannelTabItem : TabItem<Channel>
@ -122,6 +120,11 @@ namespace osu.Game.Overlays.Chat
backgroundHover = colours.Gray7; backgroundHover = colours.Gray7;
highlightBox.Colour = colours.Yellow; highlightBox.Colour = colours.Yellow;
}
protected override void LoadComplete()
{
base.LoadComplete();
updateState(); updateState();
} }
@ -232,8 +235,6 @@ namespace osu.Game.Overlays.Chat
{ {
backgroundInactive = colour.Gray2; backgroundInactive = colour.Gray2;
backgroundActive = colour.Gray3; backgroundActive = colour.Gray3;
updateState();
} }
} }
} }