fix: Consolidates Color/Center html (#1762)
### Summary - Fixes bad color in virtual check gump - Consolidates the Color/Center html strings for all gumps
This commit is contained in:
parent
05535ec9d1
commit
26dfde19ee
109 changed files with 473 additions and 752 deletions
|
|
@ -129,7 +129,7 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
sb.Append(" Tournament Signup");
|
||||
|
||||
AddBorderedText(22, 22, 294, 20, Center(sb.ToString()), LabelColor32, BlackColor32);
|
||||
AddBorderedText(22, 22, 294, 20, sb.ToString().Center(), LabelColor32, BlackColor32);
|
||||
AddBorderedText(
|
||||
22,
|
||||
50,
|
||||
|
|
@ -283,10 +283,6 @@ namespace Server.Engines.ConPVP
|
|||
AddButton(314, y, 247, 248, 1);
|
||||
}
|
||||
|
||||
public string Center(string text) => $"<CENTER>{text}</CENTER>";
|
||||
|
||||
public string Color(string text, int color) => $"<BASEFONT COLOR=#{color:X6}>{text}</BASEFONT>";
|
||||
|
||||
private void AddBorderedText(int x, int y, int width, int height, string text, int color, int borderColor)
|
||||
{
|
||||
AddColoredText(x - 1, y - 1, width, height, text, borderColor);
|
||||
|
|
@ -298,14 +294,7 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
private void AddColoredText(int x, int y, int width, int height, string text, int color)
|
||||
{
|
||||
if (color == 0)
|
||||
{
|
||||
AddHtml(x, y, width, height, text);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddHtml(x, y, width, height, Color(text, color));
|
||||
}
|
||||
AddHtml(x, y, width, height, color == 0 ? text : text.Color(color));
|
||||
}
|
||||
|
||||
public void AddGoldenButton(int x, int y, int bid)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue