mirror of
https://github.com/osukey/osukey.git
synced 2025-07-02 16:59:53 +09:00
Fixed style changes and cleaned up ctrl + t implementation
This commit is contained in:
@ -96,6 +96,11 @@ namespace osu.Game.Overlays.Chat.Tabs
|
|||||||
selectorTab.Active.Value = false;
|
selectorTab.Active.Value = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void SelectChannelSelectorTab()
|
||||||
|
{
|
||||||
|
SelectTab(selectorTab);
|
||||||
|
}
|
||||||
|
|
||||||
protected override TabFillFlowContainer CreateTabFlow() => new ChannelTabFillFlowContainer
|
protected override TabFillFlowContainer CreateTabFlow() => new ChannelTabFillFlowContainer
|
||||||
{
|
{
|
||||||
Direction = FillDirection.Full,
|
Direction = FillDirection.Full,
|
||||||
|
@ -25,9 +25,6 @@ using osuTK.Input;
|
|||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using osu.Framework.Graphics.Textures;
|
using osu.Framework.Graphics.Textures;
|
||||||
|
|
||||||
using System;
|
|
||||||
using osu.Game.Input.Bindings;
|
|
||||||
|
|
||||||
namespace osu.Game.Overlays
|
namespace osu.Game.Overlays
|
||||||
{
|
{
|
||||||
public class ChatOverlay : OsuFocusedOverlayContainer, INamedOverlayComponent
|
public class ChatOverlay : OsuFocusedOverlayContainer, INamedOverlayComponent
|
||||||
@ -335,17 +332,6 @@ namespace osu.Game.Overlays
|
|||||||
if (channel != null)
|
if (channel != null)
|
||||||
ChannelTabControl.Current.Value = channel;
|
ChannelTabControl.Current.Value = channel;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void selectChannelSelectorTab()
|
|
||||||
{
|
|
||||||
int i = 0;
|
|
||||||
var channel = ChannelTabControl.Items
|
|
||||||
.Where(tab => (tab is ChannelSelectorTabItem.ChannelSelectorTabChannel))
|
|
||||||
.ElementAtOrDefault(i);
|
|
||||||
if (channel != null)
|
|
||||||
ChannelTabControl.Current.Value = channel;
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override bool OnKeyDown(KeyDownEvent e)
|
protected override bool OnKeyDown(KeyDownEvent e)
|
||||||
{
|
{
|
||||||
if (e.AltPressed)
|
if (e.AltPressed)
|
||||||
@ -369,6 +355,7 @@ namespace osu.Game.Overlays
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (e.ControlPressed)
|
if (e.ControlPressed)
|
||||||
{
|
{
|
||||||
switch (e.Key)
|
switch (e.Key)
|
||||||
@ -376,8 +363,9 @@ namespace osu.Game.Overlays
|
|||||||
case Key.W:
|
case Key.W:
|
||||||
channelManager.LeaveChannel(channelManager.CurrentChannel.Value);
|
channelManager.LeaveChannel(channelManager.CurrentChannel.Value);
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
case Key.T:
|
case Key.T:
|
||||||
selectChannelSelectorTab();
|
ChannelTabControl.SelectChannelSelectorTab();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -417,7 +405,6 @@ namespace osu.Game.Overlays
|
|||||||
|
|
||||||
private void joinedChannelsChanged(object sender, NotifyCollectionChangedEventArgs args)
|
private void joinedChannelsChanged(object sender, NotifyCollectionChangedEventArgs args)
|
||||||
{
|
{
|
||||||
|
|
||||||
switch (args.Action)
|
switch (args.Action)
|
||||||
{
|
{
|
||||||
case NotifyCollectionChangedAction.Add:
|
case NotifyCollectionChangedAction.Add:
|
||||||
|
Reference in New Issue
Block a user