From 31897251f7cb06ae08bc685395f6f8e4a9cfebe7 Mon Sep 17 00:00:00 2001 From: Infi Date: Sat, 18 May 2024 19:23:39 +0200 Subject: [PATCH] Implement and text preview --- ChatTwo/ChatTwo.csproj | 2 +- ChatTwo/Message.cs | 89 ++++++++++++++++++++++++- ChatTwo/Resources/Language.af.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.ar.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.ca.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.cs.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.da.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.el.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.es.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.fi.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.fr.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.he.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.hu.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.it.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.ja.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.ko.resx | 21 ++++++ ChatTwo/Resources/Language.nl.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.no.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.pl.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.pt-BR.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.pt.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.ro.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.ru.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.sr.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.sv.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.tr.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.uk.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.vi.resx | 60 +++++++++++++++++ ChatTwo/Resources/Language.zh-Hans.resx | 21 ++++++ ChatTwo/Resources/Language.zh-Hant.resx | 60 +++++++++++++++++ ChatTwo/Ui/ChatLogWindow.cs | 5 +- 31 files changed, 1695 insertions(+), 3 deletions(-) diff --git a/ChatTwo/ChatTwo.csproj b/ChatTwo/ChatTwo.csproj index 090abbf..55af37d 100755 --- a/ChatTwo/ChatTwo.csproj +++ b/ChatTwo/ChatTwo.csproj @@ -1,6 +1,6 @@ - 1.25.0 + 1.25.1 net8.0-windows enable enable diff --git a/ChatTwo/Message.cs b/ChatTwo/Message.cs index 44ab1f8..e1196d6 100755 --- a/ChatTwo/Message.cs +++ b/ChatTwo/Message.cs @@ -4,7 +4,10 @@ using ChatTwo.Util; using Dalamud.Game.Text.SeStringHandling; using Dalamud.Game.Text.SeStringHandling.Payloads; using System.Text.RegularExpressions; +using FFXIVClientStructs.FFXIV.Client.Game; +using FFXIVClientStructs.FFXIV.Client.UI.Agent; using LiteDB; +using Lumina.Excel.GeneratedSheets; namespace ChatTwo; @@ -59,7 +62,7 @@ internal class Message internal DateTimeOffset Date { get; } internal ChatCode Code { get; } internal List Sender { get; } - internal List Content { get; } + internal List Content { get; private set; } internal SeString SenderSource { get; } internal SeString ContentSource { get; } @@ -224,6 +227,90 @@ internal class Message return newChunks; } + public unsafe void DecodeTextParam() + { + var newChunks = new List(); + void AddChunkWithMessage(TextChunk chunk) + { + if (string.IsNullOrEmpty(chunk.Content)) + return; + + chunk.Message = this; + newChunks.Add(chunk); + } + + foreach (var chunk in Content) + { + // Use as is if it's not a text chunk or it already has a payload. + if (chunk is not TextChunk text || chunk.Link != null) + { + // No need to call AddChunkWithMessage here since the chunk + // already has the Message field set. + newChunks.Add(chunk); + continue; + } + + if (!text.Content.Contains("") && !text.Content.Contains("")) + { + newChunks.Add(chunk); + continue; + } + + var nextIsMatch = false; + foreach (var split in Regex.Split(text.Content, "(|)")) + { + if (split == "" || !nextIsMatch) + { + nextIsMatch = true; + AddChunkWithMessage(text.NewWithStyle(chunk.Source, chunk.Link, split)); + continue; + } + + nextIsMatch = false; + try + { + if (split == "") + { + var agentChat = AgentChatLog.Instance(); + var item = *(InventoryItem*)((nint)agentChat + 0x8A0); + + var kind = item.ItemID switch + { + < 500_000 => ItemPayload.ItemKind.Normal, + < 1_000_000 => ItemPayload.ItemKind.Collectible, + < 2_000_000 => ItemPayload.ItemKind.Hq, + _ => ItemPayload.ItemKind.EventItem + }; + + var name = kind != ItemPayload.ItemKind.EventItem + ? Plugin.DataManager.GetExcelSheet()!.GetRow(item.ItemID)!.Name.ToString() + : Plugin.DataManager.GetExcelSheet()!.GetRow(item.ItemID)!.Name.ToString(); + + var link = new ItemPayload(item.ItemID, kind, name); + AddChunkWithMessage(text.NewWithStyle(chunk.Source, link, link.DisplayName ?? "Unknown")); + } + else + { + var mapCoords = AgentMap.Instance()->FlagMapMarker; + var rawX = (int)(MathF.Round(mapCoords.XFloat, 3, MidpointRounding.AwayFromZero) * 1000); + var rawY = (int)(MathF.Round(mapCoords.YFloat, 3, MidpointRounding.AwayFromZero) * 1000); + + var link = new MapLinkPayload(mapCoords.TerritoryId, mapCoords.MapId, rawX, rawY); + AddChunkWithMessage(text.NewWithStyle(chunk.Source, link, $"{link.PlaceName} {link.CoordinateString}")); + } + + } + catch (UriFormatException) + { + AddChunkWithMessage(text.NewWithStyle(chunk.Source, chunk.Link, split)); + Plugin.Log.Debug($"Invalid URL accepted by Regex but failed URI parsing: '{split}'"); + } + } + } + + Content = newChunks; + } + /// /// URLRegex returns a regex object that matches URLs like: /// - https://example.com diff --git a/ChatTwo/Resources/Language.af.resx b/ChatTwo/Resources/Language.af.resx index f667727..3012a55 100644 --- a/ChatTwo/Resources/Language.af.resx +++ b/ChatTwo/Resources/Language.af.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.ar.resx b/ChatTwo/Resources/Language.ar.resx index f667727..3012a55 100644 --- a/ChatTwo/Resources/Language.ar.resx +++ b/ChatTwo/Resources/Language.ar.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.ca.resx b/ChatTwo/Resources/Language.ca.resx index f667727..3012a55 100644 --- a/ChatTwo/Resources/Language.ca.resx +++ b/ChatTwo/Resources/Language.ca.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.cs.resx b/ChatTwo/Resources/Language.cs.resx index f667727..3012a55 100644 --- a/ChatTwo/Resources/Language.cs.resx +++ b/ChatTwo/Resources/Language.cs.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.da.resx b/ChatTwo/Resources/Language.da.resx index f667727..3012a55 100644 --- a/ChatTwo/Resources/Language.da.resx +++ b/ChatTwo/Resources/Language.da.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.el.resx b/ChatTwo/Resources/Language.el.resx index 107bd06..b23f28b 100644 --- a/ChatTwo/Resources/Language.el.resx +++ b/ChatTwo/Resources/Language.el.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.es.resx b/ChatTwo/Resources/Language.es.resx index 53b2c97..994d900 100644 --- a/ChatTwo/Resources/Language.es.resx +++ b/ChatTwo/Resources/Language.es.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.fi.resx b/ChatTwo/Resources/Language.fi.resx index f667727..3012a55 100644 --- a/ChatTwo/Resources/Language.fi.resx +++ b/ChatTwo/Resources/Language.fi.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.fr.resx b/ChatTwo/Resources/Language.fr.resx index 88c1f23..4ab5158 100644 --- a/ChatTwo/Resources/Language.fr.resx +++ b/ChatTwo/Resources/Language.fr.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.he.resx b/ChatTwo/Resources/Language.he.resx index f667727..3012a55 100644 --- a/ChatTwo/Resources/Language.he.resx +++ b/ChatTwo/Resources/Language.he.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.hu.resx b/ChatTwo/Resources/Language.hu.resx index f667727..3012a55 100644 --- a/ChatTwo/Resources/Language.hu.resx +++ b/ChatTwo/Resources/Language.hu.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.it.resx b/ChatTwo/Resources/Language.it.resx index f667727..3012a55 100644 --- a/ChatTwo/Resources/Language.it.resx +++ b/ChatTwo/Resources/Language.it.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.ja.resx b/ChatTwo/Resources/Language.ja.resx index 89198d4..07d9e16 100644 --- a/ChatTwo/Resources/Language.ja.resx +++ b/ChatTwo/Resources/Language.ja.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.ko.resx b/ChatTwo/Resources/Language.ko.resx index 6b49680..8080e4f 100644 --- a/ChatTwo/Resources/Language.ko.resx +++ b/ChatTwo/Resources/Language.ko.resx @@ -1051,4 +1051,25 @@ Emotes available: + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.nl.resx b/ChatTwo/Resources/Language.nl.resx index e59c61d..24426df 100644 --- a/ChatTwo/Resources/Language.nl.resx +++ b/ChatTwo/Resources/Language.nl.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.no.resx b/ChatTwo/Resources/Language.no.resx index f667727..3012a55 100644 --- a/ChatTwo/Resources/Language.no.resx +++ b/ChatTwo/Resources/Language.no.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.pl.resx b/ChatTwo/Resources/Language.pl.resx index f667727..3012a55 100644 --- a/ChatTwo/Resources/Language.pl.resx +++ b/ChatTwo/Resources/Language.pl.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.pt-BR.resx b/ChatTwo/Resources/Language.pt-BR.resx index f667727..3012a55 100644 --- a/ChatTwo/Resources/Language.pt-BR.resx +++ b/ChatTwo/Resources/Language.pt-BR.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.pt.resx b/ChatTwo/Resources/Language.pt.resx index f667727..3012a55 100644 --- a/ChatTwo/Resources/Language.pt.resx +++ b/ChatTwo/Resources/Language.pt.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.ro.resx b/ChatTwo/Resources/Language.ro.resx index cb76253..153c783 100644 --- a/ChatTwo/Resources/Language.ro.resx +++ b/ChatTwo/Resources/Language.ro.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.ru.resx b/ChatTwo/Resources/Language.ru.resx index 83fdf87..e5fc235 100644 --- a/ChatTwo/Resources/Language.ru.resx +++ b/ChatTwo/Resources/Language.ru.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.sr.resx b/ChatTwo/Resources/Language.sr.resx index f667727..3012a55 100644 --- a/ChatTwo/Resources/Language.sr.resx +++ b/ChatTwo/Resources/Language.sr.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.sv.resx b/ChatTwo/Resources/Language.sv.resx index eaa403b..189d5d9 100644 --- a/ChatTwo/Resources/Language.sv.resx +++ b/ChatTwo/Resources/Language.sv.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.tr.resx b/ChatTwo/Resources/Language.tr.resx index e25eac7..178ff06 100644 --- a/ChatTwo/Resources/Language.tr.resx +++ b/ChatTwo/Resources/Language.tr.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.uk.resx b/ChatTwo/Resources/Language.uk.resx index f667727..3012a55 100644 --- a/ChatTwo/Resources/Language.uk.resx +++ b/ChatTwo/Resources/Language.uk.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.vi.resx b/ChatTwo/Resources/Language.vi.resx index f667727..3012a55 100644 --- a/ChatTwo/Resources/Language.vi.resx +++ b/ChatTwo/Resources/Language.vi.resx @@ -1012,4 +1012,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.zh-Hans.resx b/ChatTwo/Resources/Language.zh-Hans.resx index 6f66088..e3ff6a7 100644 --- a/ChatTwo/Resources/Language.zh-Hans.resx +++ b/ChatTwo/Resources/Language.zh-Hans.resx @@ -1051,4 +1051,25 @@ Emotes available: + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Resources/Language.zh-Hant.resx b/ChatTwo/Resources/Language.zh-Hant.resx index 8545495..b0013b6 100644 --- a/ChatTwo/Resources/Language.zh-Hant.resx +++ b/ChatTwo/Resources/Language.zh-Hant.resx @@ -1013,4 +1013,64 @@ Attention, this change applies immediately and is not discardable! + + Keep input focus + + + Keeps the input focus, even if you enter battle or do other actions + + + Show emotes + + + Replaces words with their emote version, currently supports BetterTTV + + + Emotes + + + Blocked emotes + + + Emote + + + Hide during battle + + + Hide the chat during battles. + + + Emote Stats + + + Ready + + + Not Ready + + + Emotes available: + + + A preview wih all emote, auto-translate encoded as they appear in chat + + + Input preview + + + None + + + Inside + + + Top + + + Bottom + + + Text Preview: + diff --git a/ChatTwo/Ui/ChatLogWindow.cs b/ChatTwo/Ui/ChatLogWindow.cs index 120409b..449dde3 100644 --- a/ChatTwo/Ui/ChatLogWindow.cs +++ b/ChatTwo/Ui/ChatLogWindow.cs @@ -532,6 +532,7 @@ public sealed class ChatLogWindow : Window var chunks = ChunkUtil.ToChunks(SeString.Parse(bytes), ChunkSource.Content, ChatType.Say).ToList(); PreviewMessage = Message.FakeMessage(chunks, new ChatCode((ushort)XivChatType.Say)); + PreviewMessage.DecodeTextParam(); } var pos = ImGui.GetCursorPos(); @@ -564,7 +565,9 @@ public sealed class ChatLogWindow : Window using (ImRaii.PushStyle(ImGuiStyleVar.ItemSpacing, Vector2.Zero)) { ImGui.TextUnformatted("Text Preview:"); - DrawChunks(PreviewMessage.Content); + var handler = HandlerLender.Borrow(); + DrawChunks(PreviewMessage.Content, true, handler); + handler.Draw(); } }