Skip to main content

Class SeStringBuilder

Helper class to build SeStrings using a builder pattern.

Assembly: Dalamud.dll
View Source
Declaration
public class SeStringBuilder

Properties

BuiltString

Gets the built SeString.

View Source
Declaration
public SeString BuiltString { get; init; }

Methods

Append(SeString)

Append another SeString to the builder.

View Source
Declaration
public SeStringBuilder Append(SeString toAppend)
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: The current builder.

Parameters
TypeNameDescription
Dalamud.Game.Text.SeStringHandling.SeStringtoAppendThe SeString to append.

Append(string)

Append raw text to the builder.

View Source
Declaration
public SeStringBuilder Append(string text)
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: The current builder.

Parameters
TypeNameDescription
System.StringtextThe raw text.

Append(IEnumerable<Payload>)

Append payloads to the builder.

View Source
Declaration
public SeStringBuilder Append(IEnumerable<Payload> payloads)
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: The current builder.

Parameters
TypeNameDescription
System.Collections.Generic.IEnumerable<Dalamud.Game.Text.SeStringHandling.Payload>payloadsA list of payloads.

AddText(string)

Append raw text to the builder.

View Source
Declaration
public SeStringBuilder AddText(string text)
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: The current builder.

Parameters
TypeNameDescription
System.StringtextThe raw text.

AddUiForeground(ushort)

Start colored text in the current builder.

View Source
Declaration
public SeStringBuilder AddUiForeground(ushort colorKey)
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: The current builder.

Parameters
TypeNameDescription
System.UInt16colorKeyThe text color.

AddUiForegroundOff()

Turn off a previous colored text.

View Source
Declaration
public SeStringBuilder AddUiForegroundOff()
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: The current builder.### AddUiForeground(string, ushort) Add colored text to the current builder.

View Source
Declaration
public SeStringBuilder AddUiForeground(string text, ushort colorKey)
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: The current builder.

Parameters
TypeNameDescription
System.StringtextThe raw text.
System.UInt16colorKeyThe text color.

AddUiGlow(ushort)

Start an UiGlow in the current builder.

View Source
Declaration
public SeStringBuilder AddUiGlow(ushort colorKey)
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: The current builder.

Parameters
TypeNameDescription
System.UInt16colorKeyThe glow color.

AddUiGlowOff()

Turn off a previous UiGlow.

View Source
Declaration
public SeStringBuilder AddUiGlowOff()
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: The current builder.### AddUiGlow(string, ushort) Add glowing text to the current builder.

View Source
Declaration
public SeStringBuilder AddUiGlow(string text, ushort colorKey)
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: The current builder.

Parameters
TypeNameDescription
System.StringtextThe raw text.
System.UInt16colorKeyThe glow color.

AddIcon(BitmapFontIcon)

Add an icon to the builder.

View Source
Declaration
public SeStringBuilder AddIcon(BitmapFontIcon icon)
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: The current builder.

Parameters
TypeNameDescription
Dalamud.Game.Text.SeStringHandling.BitmapFontIconiconThe icon to add.

AddItemLink(uint, bool, string?)

Add an item link to the builder.

View Source
Declaration
public SeStringBuilder AddItemLink(uint itemId, bool isHq, string? itemNameOverride = null)
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: The current builder.

Parameters
TypeNameDescription
System.UInt32itemIdThe item ID.
System.BooleanisHqWhether or not the item is high quality.
System.StringitemNameOverrideOverride for the item's name.

AddItemLink(uint, ItemKind, string?)

Add an item link to the builder.

View Source
Declaration
public SeStringBuilder AddItemLink(uint itemId, ItemPayload.ItemKind kind = ItemKind.Normal, string? itemNameOverride = null)
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: The current builder.

Parameters
TypeNameDescription
System.UInt32itemIdThe item ID.
Dalamud.Game.Text.SeStringHandling.Payloads.ItemPayload.ItemKindkindKind of item to encode.
System.StringitemNameOverrideOverride for the item's name.

AddItemLinkRaw(uint)

Add an item link to the builder.

View Source
Declaration
public SeStringBuilder AddItemLinkRaw(uint rawItemId)
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: The current builder.

Parameters
TypeNameDescription
System.UInt32rawItemIdThe raw item ID.

AddItalics(string)

Add italicized raw text to the builder.

View Source
Declaration
public SeStringBuilder AddItalics(string text)
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: The current builder.

Parameters
TypeNameDescription
System.StringtextThe raw text.

AddItalicsOn()

Turn italics on.

View Source
Declaration
public SeStringBuilder AddItalicsOn()
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: The current builder.### AddItalicsOff() Turn italics off.

View Source
Declaration
public SeStringBuilder AddItalicsOff()
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: The current builder.### AddMapLink(uint, uint, int, int) Add a map link payload to the builder.

View Source
Declaration
public SeStringBuilder AddMapLink(uint territoryTypeId, uint mapId, int rawX, int rawY)
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: The current builder.

Parameters
TypeNameDescription
System.UInt32territoryTypeIdThe id of the TerritoryType entry for this link.
System.UInt32mapIdThe id of the Map entry for this link.
System.Int32rawXThe internal raw x-coordinate for this link.
System.Int32rawYThe internal raw y-coordinate for this link.

AddMapLink(uint, uint, float, float, float)

Add a map link payload to the builder.

View Source
Declaration
public SeStringBuilder AddMapLink(uint territoryTypeId, uint mapId, float niceXCoord, float niceYCoord, float fudgeFactor = 0.05)
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: The current builder.

Parameters
TypeNameDescription
System.UInt32territoryTypeIdThe id of the TerritoryType entry for this link.
System.UInt32mapIdThe id of the Map entry for this link.
System.SingleniceXCoordThe human-readable x-coordinate for this link.
System.SingleniceYCoordThe human-readable y-coordinate for this link.
System.SinglefudgeFactorAn optional offset to account for rounding and truncation errors; it is best to leave this untouched in most cases.

AddQuestLink(uint)

Add a quest link to the builder.

View Source
Declaration
public SeStringBuilder AddQuestLink(uint questId)
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: The current builder.

Parameters
TypeNameDescription
System.UInt32questIdThe quest ID.

AddStatusLink(uint)

Add a status effect link to the builder.

View Source
Declaration
public SeStringBuilder AddStatusLink(uint statusId)
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: The current builder.

Parameters
TypeNameDescription
System.UInt32statusIdThe status effect ID.

Add a link to the party finder search conditions to the builder.

View Source
Declaration
public SeStringBuilder AddPartyFinderSearchConditionsLink()
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: The current builder.### AddPartyFinderLink(uint, bool) Add a party finder listing link to the builder.

View Source
Declaration
public SeStringBuilder AddPartyFinderLink(uint id, bool isCrossWorld = false)
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: The current builder.

Parameters
TypeNameDescription
System.UInt32idThe listing ID of the party finder listing.
System.BooleanisCrossWorldWhether the listing is limited to the recruiting world.

Add(Payload)

Add a payload to the builder.

View Source
Declaration
public SeStringBuilder Add(Payload payload)
Returns

Dalamud.Game.Text.SeStringHandling.SeStringBuilder: The current builder.

Parameters
TypeNameDescription
Dalamud.Game.Text.SeStringHandling.PayloadpayloadThe payload to add.

Build()

Return the built string.

View Source
Declaration
public SeString Build()
Returns

Dalamud.Game.Text.SeStringHandling.SeString: The built string.### Encode() Encode the built string to bytes.

View Source
Declaration
public byte[] Encode()
Returns

System.Byte[]: The built string, encoded to UTF-8 bytes.### ToString() Return the text representation of this string.

View Source
Declaration
public override string ToString()
Returns

System.String: The text representation of this string.## Extension Methods

  • Dalamud.Game.Text.SeStringHandling.SeStringBuilder.Dalamud.Utility.SeStringExtensions.AppendMacroString(System.ReadOnlySpan{System.Byte})
  • Dalamud.Game.Text.SeStringHandling.SeStringBuilder.Dalamud.Utility.SeStringExtensions.AppendMacroString(System.ReadOnlySpan{System.Char})