mirror of
https://github.com/ppy/osu
synced 2025-01-06 06:10:04 +00:00
Move tab channel class into tab item class
This commit is contained in:
parent
8957ad5a7e
commit
7adaa09263
@ -93,7 +93,7 @@ namespace osu.Game.Tests.Visual.Online
|
||||
AddUntilStep("remove all channels", () =>
|
||||
{
|
||||
var first = channelTabControl.Items.First();
|
||||
if (first is ChannelSelectorTabChannel)
|
||||
if (first is ChannelSelectorTabItem.ChannelSelectorTabChannel)
|
||||
return true;
|
||||
|
||||
channelTabControl.RemoveChannel(first);
|
||||
|
@ -87,7 +87,7 @@ namespace osu.Game.Online.Chat
|
||||
|
||||
private void currentChannelChanged(ValueChangedEvent<Channel> e)
|
||||
{
|
||||
if (!(e.NewValue is ChannelSelectorTabChannel))
|
||||
if (!(e.NewValue is ChannelSelectorTabItem.ChannelSelectorTabChannel))
|
||||
JoinChannel(e.NewValue);
|
||||
}
|
||||
|
||||
|
@ -1,15 +0,0 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using osu.Game.Online.Chat;
|
||||
|
||||
namespace osu.Game.Overlays.Chat.Tabs
|
||||
{
|
||||
public class ChannelSelectorTabChannel : Channel
|
||||
{
|
||||
public ChannelSelectorTabChannel()
|
||||
{
|
||||
Name = "+";
|
||||
}
|
||||
}
|
||||
}
|
@ -31,5 +31,13 @@ namespace osu.Game.Overlays.Chat.Tabs
|
||||
BackgroundInactive = colour.Gray2;
|
||||
BackgroundActive = colour.Gray3;
|
||||
}
|
||||
|
||||
public class ChannelSelectorTabChannel : Channel
|
||||
{
|
||||
public ChannelSelectorTabChannel()
|
||||
{
|
||||
Name = "+";
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -199,7 +199,7 @@ namespace osu.Game.Overlays
|
||||
return;
|
||||
}
|
||||
|
||||
if (e.NewValue is ChannelSelectorTabChannel)
|
||||
if (e.NewValue is ChannelSelectorTabItem.ChannelSelectorTabChannel)
|
||||
return;
|
||||
|
||||
textbox.Current.Disabled = e.NewValue.ReadOnly;
|
||||
@ -271,7 +271,7 @@ namespace osu.Game.Overlays
|
||||
private void selectTab(int index)
|
||||
{
|
||||
var channel = channelTabControl.Items.Skip(index).FirstOrDefault();
|
||||
if (channel != null && !(channel is ChannelSelectorTabChannel))
|
||||
if (channel != null && !(channel is ChannelSelectorTabItem.ChannelSelectorTabChannel))
|
||||
channelTabControl.Current.Value = channel;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user