fix: adjust TextArrowPayloads based on language

This commit is contained in:
Haselnussbomber 2023-08-01 20:56:11 +02:00
parent dd845a30f0
commit d6555007ce

View file

@ -52,14 +52,27 @@ public class SeString
/// with the appropriate glow and coloring. /// with the appropriate glow and coloring.
/// </summary> /// </summary>
/// <returns>A list of all the payloads required to insert the link marker.</returns> /// <returns>A list of all the payloads required to insert the link marker.</returns>
public static IEnumerable<Payload> TextArrowPayloads => new List<Payload>(new Payload[] public static IEnumerable<Payload> TextArrowPayloads
{ {
new UIForegroundPayload(0x01F4), get
new UIGlowPayload(0x01F5), {
new TextPayload($"{(char)SeIconChar.LinkMarker}"), var clientState = Service<ClientState.ClientState>.Get();
var markerSpace = clientState.ClientLanguage switch
{
ClientLanguage.German => " ",
ClientLanguage.French => " ",
_ => string.Empty,
};
return new List<Payload>
{
new UIForegroundPayload(500),
new UIGlowPayload(501),
new TextPayload($"{(char)SeIconChar.LinkMarker}{markerSpace}"),
UIGlowPayload.UIGlowOff, UIGlowPayload.UIGlowOff,
UIForegroundPayload.UIForegroundOff, UIForegroundPayload.UIForegroundOff,
}); };
}
}
/// <summary> /// <summary>
/// Gets an empty SeString. /// Gets an empty SeString.