mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 18:27:23 +01:00
commit
1b558ec10d
3 changed files with 37 additions and 1 deletions
|
|
@ -130,6 +130,10 @@ namespace Dalamud.Game.Chat.SeStringHandling
|
|||
payload = new EmphasisItalicPayload();
|
||||
break;
|
||||
|
||||
case SeStringChunkType.SeHyphen:
|
||||
payload = SeHyphenPayload.Payload;
|
||||
break;
|
||||
|
||||
case SeStringChunkType.Interactable:
|
||||
{
|
||||
var subType = (EmbeddedInfoType)reader.ReadByte();
|
||||
|
|
@ -222,6 +226,7 @@ namespace Dalamud.Game.Chat.SeStringHandling
|
|||
{
|
||||
Icon = 0x12,
|
||||
EmphasisItalic = 0x1A,
|
||||
SeHyphen = 0x1F,
|
||||
Interactable = 0x27,
|
||||
AutoTranslateKey = 0x2E,
|
||||
UIForeground = 0x48,
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ namespace Dalamud.Game.Chat.SeStringHandling
|
|||
/// <summary>
|
||||
/// An SeString payload representing any data we don't handle.
|
||||
/// </summary>
|
||||
Unknown
|
||||
Unknown,
|
||||
SeHyphen,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,30 @@
|
|||
using System.IO;
|
||||
|
||||
namespace Dalamud.Game.Chat.SeStringHandling.Payloads {
|
||||
/// <summary>
|
||||
/// A wrapped '–'
|
||||
/// </summary>
|
||||
public class SeHyphenPayload : Payload, ITextProvider {
|
||||
|
||||
/// <summary>
|
||||
/// Instance of SeHyphenPayload
|
||||
/// </summary>
|
||||
public static SeHyphenPayload Payload => new SeHyphenPayload();
|
||||
|
||||
/// <inheritdoc />
|
||||
public override PayloadType Type => PayloadType.SeHyphen;
|
||||
|
||||
private readonly byte[] bytes = {START_BYTE, (byte) SeStringChunkType.SeHyphen, 0x01, END_BYTE};
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override byte[] EncodeImpl() => this.bytes;
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void DecodeImpl(BinaryReader reader, long endOfStream) { }
|
||||
|
||||
/// <summary>
|
||||
/// Just a '–'
|
||||
/// </summary>
|
||||
public string Text => "–";
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue