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:
Kamron Batman 2024-05-07 23:56:32 -07:00 • committed by GitHub
parent 05535ec9d1
commit 26dfde19ee
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
109 changed files with 473 additions and 752 deletions

View file

@ -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)