mirror of
https://github.com/goatcorp/Dalamud.git
synced 2026-02-18 22:07:44 +01:00
Revert "refactor(Dalamud): switch to file-scoped namespaces"
This reverts commit b5f34c3199.
This commit is contained in:
parent
d473826247
commit
1561fbac00
325 changed files with 45549 additions and 45209 deletions
|
|
@ -1,62 +1,63 @@
|
|||
using System.Collections.Generic;
|
||||
using System.IO;
|
||||
|
||||
namespace Dalamud.Game.Text.SeStringHandling.Payloads;
|
||||
|
||||
/// <summary>
|
||||
/// SeString payload representing a bitmap icon from fontIcon.
|
||||
/// </summary>
|
||||
public class IconPayload : Payload
|
||||
namespace Dalamud.Game.Text.SeStringHandling.Payloads
|
||||
{
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="IconPayload"/> class.
|
||||
/// Create a Icon payload for the specified icon.
|
||||
/// SeString payload representing a bitmap icon from fontIcon.
|
||||
/// </summary>
|
||||
/// <param name="icon">The Icon.</param>
|
||||
public IconPayload(BitmapFontIcon icon)
|
||||
public class IconPayload : Payload
|
||||
{
|
||||
this.Icon = icon;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="IconPayload"/> class.
|
||||
/// Create a Icon payload for the specified icon.
|
||||
/// </summary>
|
||||
internal IconPayload()
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override PayloadType Type => PayloadType.Icon;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the icon the payload represents.
|
||||
/// </summary>
|
||||
public BitmapFontIcon Icon { get; set; } = BitmapFontIcon.None;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{this.Type} - {this.Icon}";
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override byte[] EncodeImpl()
|
||||
{
|
||||
var indexBytes = MakeInteger((uint)this.Icon);
|
||||
var chunkLen = indexBytes.Length + 1;
|
||||
var bytes = new List<byte>(new byte[]
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="IconPayload"/> class.
|
||||
/// Create a Icon payload for the specified icon.
|
||||
/// </summary>
|
||||
/// <param name="icon">The Icon.</param>
|
||||
public IconPayload(BitmapFontIcon icon)
|
||||
{
|
||||
START_BYTE, (byte)SeStringChunkType.Icon, (byte)chunkLen,
|
||||
});
|
||||
bytes.AddRange(indexBytes);
|
||||
bytes.Add(END_BYTE);
|
||||
return bytes.ToArray();
|
||||
}
|
||||
this.Icon = icon;
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void DecodeImpl(BinaryReader reader, long endOfStream)
|
||||
{
|
||||
this.Icon = (BitmapFontIcon)GetInteger(reader);
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the <see cref="IconPayload"/> class.
|
||||
/// Create a Icon payload for the specified icon.
|
||||
/// </summary>
|
||||
internal IconPayload()
|
||||
{
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override PayloadType Type => PayloadType.Icon;
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the icon the payload represents.
|
||||
/// </summary>
|
||||
public BitmapFontIcon Icon { get; set; } = BitmapFontIcon.None;
|
||||
|
||||
/// <inheritdoc />
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{this.Type} - {this.Icon}";
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override byte[] EncodeImpl()
|
||||
{
|
||||
var indexBytes = MakeInteger((uint)this.Icon);
|
||||
var chunkLen = indexBytes.Length + 1;
|
||||
var bytes = new List<byte>(new byte[]
|
||||
{
|
||||
START_BYTE, (byte)SeStringChunkType.Icon, (byte)chunkLen,
|
||||
});
|
||||
bytes.AddRange(indexBytes);
|
||||
bytes.Add(END_BYTE);
|
||||
return bytes.ToArray();
|
||||
}
|
||||
|
||||
/// <inheritdoc />
|
||||
protected override void DecodeImpl(BinaryReader reader, long endOfStream)
|
||||
{
|
||||
this.Icon = (BitmapFontIcon)GetInteger(reader);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue