Class SeStringBuilder
Helper class to build SeStrings using a builder pattern.
Inheritance
Inherited Members
Namespace: Dalamud.Game.Text.SeStringHandling
Assembly: Dalamud.dll
Syntax
public class SeStringBuilder
Properties
| Improve this Doc View SourceBuiltString
Gets the built SeString.
Declaration
public SeString BuiltString { get; set; }
Property Value
| Type | Description |
|---|---|
| SeString |
Methods
| Improve this Doc View SourceAdd(Payload)
Add a payload to the builder.
Declaration
public SeStringBuilder Add(Payload payload)
Parameters
| Type | Name | Description |
|---|---|---|
| Payload | payload | The payload to add. |
Returns
| Type | Description |
|---|---|
| SeStringBuilder | The current builder. |
AddIcon(BitmapFontIcon)
Add an icon to the builder.
Declaration
public SeStringBuilder AddIcon(BitmapFontIcon icon)
Parameters
| Type | Name | Description |
|---|---|---|
| BitmapFontIcon | icon | The icon to add. |
Returns
| Type | Description |
|---|---|
| SeStringBuilder | The current builder. |
AddItalics(String)
Add italicized raw text to the builder.
Declaration
public SeStringBuilder AddItalics(string text)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | text | The raw text. |
Returns
| Type | Description |
|---|---|
| SeStringBuilder | The current builder. |
AddItalicsOff()
Turn italics off.
Declaration
public SeStringBuilder AddItalicsOff()
Returns
| Type | Description |
|---|---|
| SeStringBuilder | The current builder. |
AddItalicsOn()
Turn italics on.
Declaration
public SeStringBuilder AddItalicsOn()
Returns
| Type | Description |
|---|---|
| SeStringBuilder | The current builder. |
AddItemLink(UInt32, Boolean, String)
Add an item link to the builder.
Declaration
public SeStringBuilder AddItemLink(uint itemId, bool isHq, string itemNameOverride = null)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt32 | itemId | The item ID. |
| System.Boolean | isHq | Whether or not the item is high quality. |
| System.String | itemNameOverride | Override for the item's name. |
Returns
| Type | Description |
|---|---|
| SeStringBuilder | The current builder. |
AddMapLink(UInt32, UInt32, Int32, Int32)
Add a map link payload to the builder.
Declaration
public SeStringBuilder AddMapLink(uint territoryTypeId, uint mapId, int rawX, int rawY)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt32 | territoryTypeId | The id of the TerritoryType entry for this link. |
| System.UInt32 | mapId | The id of the Map entry for this link. |
| System.Int32 | rawX | The internal raw x-coordinate for this link. |
| System.Int32 | rawY | The internal raw y-coordinate for this link. |
Returns
| Type | Description |
|---|---|
| SeStringBuilder | The current builder. |
AddMapLink(UInt32, UInt32, Single, Single, Single)
Add a map link payload to the builder.
Declaration
public SeStringBuilder AddMapLink(uint territoryTypeId, uint mapId, float niceXCoord, float niceYCoord, float fudgeFactor = 0.05F)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt32 | territoryTypeId | The id of the TerritoryType entry for this link. |
| System.UInt32 | mapId | The id of the Map entry for this link. |
| System.Single | niceXCoord | The human-readable x-coordinate for this link. |
| System.Single | niceYCoord | The human-readable y-coordinate for this link. |
| System.Single | fudgeFactor | An optional offset to account for rounding and truncation errors; it is best to leave this untouched in most cases. |
Returns
| Type | Description |
|---|---|
| SeStringBuilder | The current builder. |
AddQuestLink(UInt32)
Add a quest link to the builder.
Declaration
public SeStringBuilder AddQuestLink(uint questId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt32 | questId | The quest ID. |
Returns
| Type | Description |
|---|---|
| SeStringBuilder | The current builder. |
AddStatusLink(UInt32)
Add a status effect link to the builder.
Declaration
public SeStringBuilder AddStatusLink(uint statusId)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt32 | statusId | The status effect ID. |
Returns
| Type | Description |
|---|---|
| SeStringBuilder | The current builder. |
AddText(String)
Append raw text to the builder.
Declaration
public SeStringBuilder AddText(string text)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | text | The raw text. |
Returns
| Type | Description |
|---|---|
| SeStringBuilder | The current builder. |
AddUiForeground(String, UInt16)
Add colored text to the current builder.
Declaration
public SeStringBuilder AddUiForeground(string text, ushort colorKey)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | text | The raw text. |
| System.UInt16 | colorKey | The text color. |
Returns
| Type | Description |
|---|---|
| SeStringBuilder | The current builder. |
AddUiForeground(UInt16)
Start colored text in the current builder.
Declaration
public SeStringBuilder AddUiForeground(ushort colorKey)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt16 | colorKey | The text color. |
Returns
| Type | Description |
|---|---|
| SeStringBuilder | The current builder. |
AddUiForegroundOff()
Turn off a previous colored text.
Declaration
public SeStringBuilder AddUiForegroundOff()
Returns
| Type | Description |
|---|---|
| SeStringBuilder | The current builder. |
AddUiGlow(String, UInt16)
Add glowing text to the current builder.
Declaration
public SeStringBuilder AddUiGlow(string text, ushort colorKey)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | text | The raw text. |
| System.UInt16 | colorKey | The glow color. |
Returns
| Type | Description |
|---|---|
| SeStringBuilder | The current builder. |
AddUiGlow(UInt16)
Start an UiGlow in the current builder.
Declaration
public SeStringBuilder AddUiGlow(ushort colorKey)
Parameters
| Type | Name | Description |
|---|---|---|
| System.UInt16 | colorKey | The glow color. |
Returns
| Type | Description |
|---|---|
| SeStringBuilder | The current builder. |
AddUiGlowOff()
Turn off a previous UiGlow.
Declaration
public SeStringBuilder AddUiGlowOff()
Returns
| Type | Description |
|---|---|
| SeStringBuilder | The current builder. |
Append(SeString)
Append another SeString to the builder.
Declaration
public SeStringBuilder Append(SeString toAppend)
Parameters
| Type | Name | Description |
|---|---|---|
| SeString | toAppend | The SeString to append. |
Returns
| Type | Description |
|---|---|
| SeStringBuilder | The current builder. |
Append(String)
Append raw text to the builder.
Declaration
public SeStringBuilder Append(string text)
Parameters
| Type | Name | Description |
|---|---|---|
| System.String | text | The raw text. |
Returns
| Type | Description |
|---|---|
| SeStringBuilder | The current builder. |
Build()
Return the built string.
Declaration
public SeString Build()
Returns
| Type | Description |
|---|---|
| SeString | The built string. |
Encode()
Encode the built string to bytes.
Declaration
public byte[] Encode()
Returns
| Type | Description |
|---|---|
| System.Byte[] | The built string, encoded to UTF-8 bytes. |
ToString()
Return the text representation of this string.
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| System.String | The text representation of this string. |