This commit is contained in:
Infi
2024-08-20 23:14:52 +02:00
parent 16a16b1f12
commit 117d9fc45c
7 changed files with 114 additions and 45 deletions
+18
View File
@@ -59,6 +59,7 @@ public sealed class ChatLogWindow : Window
private int LastTab { get; set; }
private InputChannel? TempChannel;
private TellTarget? TellTarget;
public bool TellSpecial;
private readonly Stopwatch LastResize = new();
private AutoCompleteInfo? AutoCompleteInfo;
private bool AutoCompleteOpen;
@@ -145,6 +146,8 @@ public sealed class ChatLogWindow : Window
internal void Activated(ChatActivatedArgs args)
{
TellSpecial = args.TellSpecial;
Activate = true;
PlayedClosingSound = false;
if (Plugin.Config.PlaySounds)
@@ -857,6 +860,21 @@ public sealed class ChatLogWindow : Window
AddBacklog(trimmed);
InputBacklogIdx = -1;
if (TellSpecial)
{
var tellBytes = Encoding.UTF8.GetBytes(trimmed);
AutoTranslate.ReplaceWithPayload(ref tellBytes);
Plugin.Functions.Chat.SendTellUsingCommandInner(tellBytes);
TellSpecial = false;
if (TempChannel is InputChannel.Tell)
TellTarget = null;
Chat = string.Empty;
return;
}
if (!trimmed.StartsWith('/'))
{
if (TellTarget != null)