feat: add custom dalamud link payload handling
This commit is contained in:
@@ -14,7 +14,7 @@ internal static class ChunkUtil {
|
||||
Payload? link = null;
|
||||
|
||||
void Append(string text) {
|
||||
chunks.Add(new TextChunk(link, text) {
|
||||
chunks.Add(new TextChunk(msg, link, text) {
|
||||
FallbackColour = defaultColour,
|
||||
Foreground = foreground.Count > 0 ? foreground.Peek() : null,
|
||||
Glow = glow.Count > 0 ? glow.Peek() : null,
|
||||
@@ -47,13 +47,13 @@ internal static class ChunkUtil {
|
||||
|
||||
break;
|
||||
case PayloadType.AutoTranslateText:
|
||||
chunks.Add(new IconChunk(link, BitmapFontIcon.AutoTranslateBegin));
|
||||
chunks.Add(new IconChunk(msg, link, BitmapFontIcon.AutoTranslateBegin));
|
||||
var autoText = ((AutoTranslatePayload) payload).Text;
|
||||
Append(autoText.Substring(2, autoText.Length - 4));
|
||||
chunks.Add(new IconChunk(link, BitmapFontIcon.AutoTranslateEnd));
|
||||
chunks.Add(new IconChunk(msg, link, BitmapFontIcon.AutoTranslateEnd));
|
||||
break;
|
||||
case PayloadType.Icon:
|
||||
chunks.Add(new IconChunk(link, ((IconPayload) payload).Icon));
|
||||
chunks.Add(new IconChunk(msg, link, ((IconPayload) payload).Icon));
|
||||
break;
|
||||
case PayloadType.MapLink:
|
||||
case PayloadType.Quest:
|
||||
|
||||
Reference in New Issue
Block a user