mirror of
https://github.com/goatcorp/Dalamud.git
synced 2025-12-12 10:17:22 +01:00
Add NamePlateQuotedParts.OuterWrap
This commit is contained in:
parent
bceca96998
commit
a78296c603
1 changed files with 16 additions and 0 deletions
|
|
@ -8,6 +8,12 @@ namespace Dalamud.Game.Gui.NamePlate;
|
|||
/// <param name="field">The field type which should be set.</param>
|
||||
public class NamePlateQuotedParts(NamePlateStringField field, bool isFreeCompany)
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the opening and closing SeStrings which will wrap the entire contents, which can be used to apply
|
||||
/// colors or styling to the entire field.
|
||||
/// </summary>
|
||||
public (SeString, SeString)? OuterWrap { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the opening quote string which appears before the text and opening text-wrap.
|
||||
/// </summary>
|
||||
|
|
@ -39,6 +45,11 @@ public class NamePlateQuotedParts(NamePlateStringField field, bool isFreeCompany
|
|||
return;
|
||||
|
||||
var sb = new SeStringBuilder();
|
||||
if (this.OuterWrap is { Item1: var outerLeft })
|
||||
{
|
||||
sb.Append(outerLeft);
|
||||
}
|
||||
|
||||
if (this.LeftQuote is not null)
|
||||
{
|
||||
sb.Append(this.LeftQuote);
|
||||
|
|
@ -68,6 +79,11 @@ public class NamePlateQuotedParts(NamePlateStringField field, bool isFreeCompany
|
|||
sb.Append(isFreeCompany ? "»" : "》");
|
||||
}
|
||||
|
||||
if (this.OuterWrap is { Item2: var outerRight })
|
||||
{
|
||||
sb.Append(outerRight);
|
||||
}
|
||||
|
||||
handler.SetField(field, sb.Build());
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue