Chat improvements. (#4283)

* UI is an abbreviation, in XAML.

* Chat improvements.

Changing the "selected" channel on the chat box is now only done via the tab cycle or clicking the button.

Prefix chars like [ will temporarily replace the active chat channel. This is based 100% on message box contents so there's no input eating garbage or anything.

Pressing specific channel focusing keys inserts the correct prefix character, potentially replacing an existing one. Existing chat contents are left in place just fine and selected so you can easily delete them (but are not forced to).

Channel focusing keys now match the QWERTY key codes.

Deadchat works now.

Console can no longer be selected as a chat channel, but you can still use it with the / prefix.

Refactored the connection between chat manager and chat box so that it's event based, reducing tons of spaghetti everywhere.

Main chat box control uses XAML now.

General cleanup.

Added focus hotkeys for deadchat/console. Also added prefix for deadchat.

Local chat is mapped to deadchat when a ghost.

Probably more stuff I can't think of right now.

* Add preferred channel system to chat box to automatically select local.

I can't actually test this works because the non-lobby chat box code is complete disastrous spaghetti and i need to refactor it.

* Move chatbox resizing and all that to a subclass.

Refine preferred channel & deadchat mapping code further.

* Don't do prefixes for channels you don't have access to.

* Change format on channel select popup.

* Clean up code with console handling somewhat.
This commit is contained in:
Pieter-Jan Briers
2021-07-20 10:29:09 +02:00
committed by GitHub
parent 4f08bc5243
commit b96d760043
22 changed files with 1300 additions and 1278 deletions

View File

@@ -15,6 +15,8 @@ namespace Content.Shared.Input
public static readonly BoundKeyFunction FocusRadio = "FocusRadioWindow";
public static readonly BoundKeyFunction FocusOOC = "FocusOOCWindow";
public static readonly BoundKeyFunction FocusAdminChat = "FocusAdminChatWindow";
public static readonly BoundKeyFunction FocusDeadChat = "FocusDeadChatWindow";
public static readonly BoundKeyFunction FocusConsoleChat = "FocusConsoleChatWindow";
public static readonly BoundKeyFunction CycleChatChannelForward = "CycleChatChannelForward";
public static readonly BoundKeyFunction CycleChatChannelBackward = "CycleChatChannelBackward";
public static readonly BoundKeyFunction OpenCharacterMenu = "OpenCharacterMenu";