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
|
|
@ -254,10 +254,6 @@ namespace Server.Engines.ConPVP
|
|||
}
|
||||
}
|
||||
|
||||
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, string text, int color, int borderColor)
|
||||
{
|
||||
AddColoredText(x, y, width, text, color);
|
||||
|
|
@ -265,14 +261,7 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
private void AddColoredText(int x, int y, int width, string text, int color)
|
||||
{
|
||||
if (color == 0)
|
||||
{
|
||||
AddHtml(x, y, width, 20, text);
|
||||
}
|
||||
else
|
||||
{
|
||||
AddHtml(x, y, width, 20, Color(text, color));
|
||||
}
|
||||
AddHtml(x, y, width, 20, color == 0 ? text : text.Color(color));
|
||||
}
|
||||
|
||||
private void AddColumnHeader(int width, string name)
|
||||
|
|
@ -282,7 +271,7 @@ namespace Server.Engines.ConPVP
|
|||
|
||||
if (name != null)
|
||||
{
|
||||
AddBorderedText(m_ColumnX, 13, width, Center(name), 0xFFFFFF, 0);
|
||||
AddBorderedText(m_ColumnX, 13, width, name.Center(), 0xFFFFFF, 0);
|
||||
}
|
||||
|
||||
m_ColumnX += width;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue