mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-13 12:14:16 +01:00
Add SeHyphenPayload
This commit is contained in:
parent
0b4a7d2755
commit
e78dc692be
3 changed files with 37 additions and 1 deletions
|
|
@ -130,6 +130,10 @@ namespace Dalamud.Game.Chat.SeStringHandling
|
||||||
payload = new EmphasisItalicPayload();
|
payload = new EmphasisItalicPayload();
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case SeStringChunkType.SeHyphen:
|
||||||
|
payload = SeHyphenPayload.Payload;
|
||||||
|
break;
|
||||||
|
|
||||||
case SeStringChunkType.Interactable:
|
case SeStringChunkType.Interactable:
|
||||||
{
|
{
|
||||||
var subType = (EmbeddedInfoType)reader.ReadByte();
|
var subType = (EmbeddedInfoType)reader.ReadByte();
|
||||||
|
|
@ -222,6 +226,7 @@ namespace Dalamud.Game.Chat.SeStringHandling
|
||||||
{
|
{
|
||||||
Icon = 0x12,
|
Icon = 0x12,
|
||||||
EmphasisItalic = 0x1A,
|
EmphasisItalic = 0x1A,
|
||||||
|
SeHyphen = 0x1F,
|
||||||
Interactable = 0x27,
|
Interactable = 0x27,
|
||||||
AutoTranslateKey = 0x2E,
|
AutoTranslateKey = 0x2E,
|
||||||
UIForeground = 0x48,
|
UIForeground = 0x48,
|
||||||
|
|
|
||||||
|
|
@ -57,6 +57,7 @@ namespace Dalamud.Game.Chat.SeStringHandling
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// An SeString payload representing any data we don't handle.
|
/// An SeString payload representing any data we don't handle.
|
||||||
/// </summary>
|
/// </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