fix: Fixes incorrect interpolation in legacy gumps (#1800)
This commit is contained in:
parent
b3a817ee2d
commit
96a398784f
2 changed files with 42 additions and 21 deletions
|
|
@ -103,18 +103,30 @@ public class GumpHtmlLocalized : GumpEntry
|
|||
|
||||
public override void AppendTo(ref SpanWriter writer, OrderedSet<string> strings, ref int entries, ref int switches)
|
||||
{
|
||||
var background = Background ? "1" : "0";
|
||||
var scrollbar = Scrollbar ? "1" : "0";
|
||||
writer.WriteAscii(
|
||||
Type switch
|
||||
{
|
||||
GumpHtmlLocalizedType.Plain =>
|
||||
$"{{ xmfhtmlgump {X} {Y} {Width} {Height} {Number} {background} {scrollbar} }}",
|
||||
GumpHtmlLocalizedType.Color =>
|
||||
$"{{ xmfhtmlgumpcolor {X} {Y} {Width} {Height} {Number} {background} {scrollbar} {Color} }}",
|
||||
_ =>
|
||||
$"{{ xmfhtmltok {X} {Y} {Width} {Height} {background} {scrollbar} {Color} {Number} @{Args}@ }}"
|
||||
}
|
||||
);
|
||||
switch (Type)
|
||||
{
|
||||
default:
|
||||
case GumpHtmlLocalizedType.Plain:
|
||||
{
|
||||
writer.WriteAscii(
|
||||
$"{{ xmfhtmlgump {X} {Y} {Width} {Height} {Number} {(Background ? "1" : "0")} {(Scrollbar ? "1" : "0")} }}"
|
||||
);
|
||||
break;
|
||||
}
|
||||
case GumpHtmlLocalizedType.Color:
|
||||
{
|
||||
writer.WriteAscii(
|
||||
$"{{ xmfhtmlgumpcolor {X} {Y} {Width} {Height} {Number} {(Background ? "1" : "0")} {(Scrollbar ? "1" : "0")} {Color} }}"
|
||||
);
|
||||
break;
|
||||
}
|
||||
case GumpHtmlLocalizedType.Args:
|
||||
{
|
||||
writer.WriteAscii(
|
||||
$"{{ xmfhtmltok {X} {Y} {Width} {Height} {(Background ? "1" : "0")} {(Scrollbar ? "1" : "0")} {Color} {Number} @{Args}@ }}"
|
||||
);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue