feat: add custom dalamud link payload handling

This commit is contained in:
Anna
2022-01-03 16:41:02 -05:00
parent 58efbf5b59
commit 8ce62fa24e
6 changed files with 51 additions and 21 deletions
+6 -4
View File
@@ -4,9 +4,11 @@ using Dalamud.Game.Text.SeStringHandling;
namespace ChatTwo;
internal abstract class Chunk {
internal SeString? Source { get; set; }
internal Payload? Link { get; set; }
protected Chunk(Payload? link) {
protected Chunk(SeString? source, Payload? link) {
this.Source = source;
this.Link = link;
}
}
@@ -18,11 +20,11 @@ internal class TextChunk : Chunk {
internal bool Italic { get; set; }
internal string Content { get; set; }
internal TextChunk(Payload? link, string content) : base(link) {
internal TextChunk(SeString? source, Payload? link, string content) : base(source, link) {
this.Content = content;
}
internal TextChunk(Payload? link, ChatType? fallbackColour, uint? foreground, uint? glow, bool italic, string content) : base(link) {
internal TextChunk(SeString? source, Payload? link, ChatType? fallbackColour, uint? foreground, uint? glow, bool italic, string content) : base(source, link) {
this.FallbackColour = fallbackColour;
this.Foreground = foreground;
this.Glow = glow;
@@ -34,7 +36,7 @@ internal class TextChunk : Chunk {
internal class IconChunk : Chunk {
internal BitmapFontIcon Icon { get; set; }
public IconChunk(Payload? link, BitmapFontIcon icon) : base(link) {
public IconChunk(SeString? source, Payload? link, BitmapFontIcon icon) : base(source, link) {
this.Icon = icon;
}
}