Dalamud/Dalamud/Game/Text/SeStringHandling/Payloads/NewLinePayload.cs
goat 448b0d16ea
Add "loading dialog" for service init, unify blocking logic (#1779)
* wip

* hacky fix for overlapping event text in profiler

* move IsResumeGameAfterPluginLoad logic to PluginManager

* fix some warnings

* handle exceptions properly

* remove ability to cancel, rename button to "hide" instead

* undo Dalamud.Service refactor for now

* warnings

* add explainer, show which plugins are still loading

* add some text if loading takes more than 3 minutes

* undo wrong CS merge
2024-04-21 17:28:37 +02:00

32 lines
870 B
C#

using System.IO;
namespace Dalamud.Game.Text.SeStringHandling.Payloads;
/// <summary>
/// A wrapped newline character.
/// </summary>
public class NewLinePayload : Payload, ITextProvider
{
private readonly byte[] bytes = { START_BYTE, (byte)SeStringChunkType.NewLine, 0x01, END_BYTE };
/// <summary>
/// Gets an instance of NewLinePayload.
/// </summary>
public static NewLinePayload Payload => new();
/// <summary>
/// Gets the text of this payload, evaluates to <c>Environment.NewLine</c>.
/// </summary>
public string Text => Environment.NewLine;
/// <inheritdoc/>
public override PayloadType Type => PayloadType.NewLine;
/// <inheritdoc/>
protected override byte[] EncodeImpl() => this.bytes;
/// <inheritdoc/>
protected override void DecodeImpl(BinaryReader reader, long endOfStream)
{
}
}