Untested Ctrl+Shift+T shortcut prototype

Added a list to the ChannelManager class that tracks
which tabs I closed. Works like a stack, where it adds to the end
every time I close a tab. Then added a function that uses
this list to open the last closed channel, and added a shortcut inside of ChatOverlay,
similar to how jmeng implemented shortcuts.

Code is currently untested.
This commit is contained in:
Joseph-Ramos-CMU
2020-12-13 13:21:50 -05:00
parent 084e4ce50b
commit 2d98da0d61
2 changed files with 49 additions and 7 deletions

View File

@ -359,15 +359,27 @@ namespace osu.Game.Overlays
if (e.ControlPressed)
{
switch (e.Key)
if(e.ShiftPressed)
{
case Key.W:
channelManager.LeaveChannel(channelManager.CurrentChannel.Value);
return true;
switch(e.Key)
{
case Key.T:
channelManager.JoinLastClosedChannel();
return true;
}
}
else
{
switch (e.Key)
{
case Key.W:
channelManager.LeaveChannel(channelManager.CurrentChannel.Value);
return true;
case Key.T:
ChannelTabControl.SelectChannelSelectorTab();
return true;
case Key.T:
ChannelTabControl.SelectChannelSelectorTab();
return true;
}
}
}