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

@ -139,7 +139,5 @@ namespace Server.Guilds
AddHtml(x, y, width, height, text.String, back, scroll);
}
}
public static string Color(string text, int color) => $"<BASEFONT COLOR=#{color:X6}>{text}</BASEFONT>";
}
}

View file

@ -117,7 +117,7 @@ namespace Server.Guilds
{
var defs = new TextDefinition[aryLength];
defs[0] = g == guild ? Color(g.Name, 0x006600) : g.Name;
defs[0] = g == guild ? g.Name.Color(0x006600) : g.Name;
defs[1] = g.Abbreviation;
defs[2] = 3000085; // Peace
@ -186,7 +186,7 @@ namespace Server.Guilds
}
else if (m_LowerText?.String != null)
{
AddHtml(66, 153 + itemNumber * 28, 280, 26, Color(m_LowerText.String, 0x99));
AddHtml(66, 153 + itemNumber * 28, 280, 26, m_LowerText.String.Color(0x99));
}
if (AllowAdvancedSearch)

View file

@ -61,11 +61,11 @@ namespace Server.Guilds
if (pm == player)
{
name = Color(name, 0x006600);
name = name.Color(0x006600);
}
else if (pm.NetState != null)
{
name = Color(name, 0x000066);
name = name.Color(0x000066);
}
defs[0] = name;

View file

@ -85,13 +85,13 @@ namespace Server.Guilds
}
else if (PendingWar)
{
kills = Color($"{war.Kills}/{war.MaxKills}", 0x990000);
time = Color($"{war.WarLength.Hours:D2}:{DateTime.MinValue + war.WarLength:mm}", 0x990000);
kills = $"{war.Kills}/{war.MaxKills}".Color(0x990000);
time = $"{war.WarLength.Hours:D2}:{DateTime.MinValue + war.WarLength:mm}".Color(0x990000);
otherWar = m_Other.FindPendingWar(guild);
if (otherWar != null)
{
otherKills = Color($"{otherWar.Kills}/{otherWar.MaxKills}", 0x990000);
otherKills = $"{otherWar.Kills}/{otherWar.MaxKills}".Color(0x990000);
}
}
@ -159,7 +159,7 @@ namespace Server.Guilds
// Withdraw Request
AddButtonAndBackground(20, 290, 14, 1062986); // Withdraw Request
AddHtml(150, 83, 360, 26, Color(alliance.Name, 0x99));
AddHtml(150, 83, 360, 26, alliance.Name.Color(0x99));
}
else if (alliance.Leader == m_Other && alliance.IsPendingMember(guild))
{
@ -172,7 +172,7 @@ namespace Server.Guilds
AddButtonAndBackground(20, 260, 15, 1062988); // Deny Request
AddButtonAndBackground(20, 290, 16, 1062987); // Accept Request
AddHtml(150, 83, 360, 26, Color(alliance.Name, 0x99));
AddHtml(150, 83, 360, 26, alliance.Name.Color(0x99));
}
}
else