fix: Uses variables for gump html localized (#970)
This commit is contained in:
parent
c166e113b1
commit
601eb4e116
1 changed files with 5 additions and 3 deletions
|
|
@ -103,15 +103,17 @@ public class GumpHtmlLocalized : GumpEntry
|
||||||
|
|
||||||
public override void AppendTo(ref SpanWriter writer, OrderedHashSet<string> strings, ref int entries, ref int switches)
|
public override void AppendTo(ref SpanWriter writer, OrderedHashSet<string> strings, ref int entries, ref int switches)
|
||||||
{
|
{
|
||||||
|
var background = Background ? "1" : "0";
|
||||||
|
var scrollbar = Scrollbar ? "1" : "0";
|
||||||
writer.WriteAscii(
|
writer.WriteAscii(
|
||||||
Type switch
|
Type switch
|
||||||
{
|
{
|
||||||
GumpHtmlLocalizedType.Plain =>
|
GumpHtmlLocalizedType.Plain =>
|
||||||
$"{{ xmfhtmlgump {X} {Y} {Width} {Height} {Number} {(Background ? 1 : 0)} {(Scrollbar ? 1 : 0)} }}",
|
$"{{ xmfhtmlgump {X} {Y} {Width} {Height} {Number} {background} {scrollbar} }}",
|
||||||
GumpHtmlLocalizedType.Color =>
|
GumpHtmlLocalizedType.Color =>
|
||||||
$"{{ xmfhtmlgumpcolor {X} {Y} {Width} {Height} {Number} {(Background ? 1 : 0)} {(Scrollbar ? 1 : 0)} {Color} }}",
|
$"{{ xmfhtmlgumpcolor {X} {Y} {Width} {Height} {Number} {background} {scrollbar} {Color} }}",
|
||||||
_ =>
|
_ =>
|
||||||
$"{{ xmfhtmltok {X} {Y} {Width} {Height} {(Background ? 1 : 0)} {(Scrollbar ? 1 : 0)} {Color} {Number} @{Args}@ }}"
|
$"{{ xmfhtmltok {X} {Y} {Width} {Height} {background} {scrollbar} {Color} {Number} @{Args}@ }}"
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue