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
|
|
@ -33,11 +33,11 @@ namespace Server.Gumps
|
|||
{
|
||||
m_Selection = null;
|
||||
|
||||
AddHtml(35, 15, 120, 20, Color("House Type", White));
|
||||
AddHtml(35, 15, 120, 20, "House Type".Color(White));
|
||||
|
||||
if (list.Count == 0)
|
||||
{
|
||||
AddHtml(35, 40, 160, 40, Color("There were no houses found for that player.", White));
|
||||
AddHtml(35, 40, 160, 40, "There were no houses found for that player.".Color(White));
|
||||
}
|
||||
|
||||
AddImage(190, 17, 0x25EA);
|
||||
|
|
@ -64,7 +64,7 @@ namespace Server.Gumps
|
|||
|
||||
var name = FindHouseName(list[i]);
|
||||
|
||||
AddHtml(15, 40 + i % 15 * 20, 20, 20, Color($"{i + 1}.", White));
|
||||
AddHtml(15, 40 + i % 15 * 20, 20, 20, $"{i + 1}.".Color(White));
|
||||
|
||||
if (name.Number > 0)
|
||||
{
|
||||
|
|
@ -72,7 +72,7 @@ namespace Server.Gumps
|
|||
}
|
||||
else
|
||||
{
|
||||
AddHtml(35, 40 + i % 15 * 20, 160, 20, Color(name, White));
|
||||
AddHtml(35, 40 + i % 15 * 20, 160, 20, Html.Color(name, White));
|
||||
}
|
||||
|
||||
AddButton(198, 39 + i % 15 * 20, 4005, 4007, i + 1);
|
||||
|
|
@ -109,49 +109,49 @@ namespace Server.Gumps
|
|||
location = "unknown";
|
||||
}
|
||||
|
||||
AddHtml(10, 15, 220, 20, Color(Center("House Properties"), White));
|
||||
AddHtml(10, 15, 220, 20, "House Properties".Center(White));
|
||||
|
||||
AddHtml(15, 40, 210, 20, Color("Facet:", White));
|
||||
AddHtml(15, 40, 210, 20, Color(Right(map == null ? "(null)" : map.Name), White));
|
||||
AddHtml(15, 40, 210, 20, "Facet:".Color(White));
|
||||
AddHtml(15, 40, 210, 20, (map == null ? "(null)" : map.Name).Right(White));
|
||||
|
||||
AddHtml(15, 60, 210, 20, Color("Location:", White));
|
||||
AddHtml(15, 60, 210, 20, Color(Right(sel.Location.ToString()), White));
|
||||
AddHtml(15, 60, 210, 20, "Location:".Color(White));
|
||||
AddHtml(15, 60, 210, 20, sel.Location.ToString().Right(White));
|
||||
|
||||
AddHtml(15, 80, 210, 20, Color("Sextant:", White));
|
||||
AddHtml(15, 80, 210, 20, Color(Right(location), White));
|
||||
AddHtml(15, 80, 210, 20, "Sextant:".Color(White));
|
||||
AddHtml(15, 80, 210, 20, location.Right(White));
|
||||
|
||||
AddHtml(15, 100, 210, 20, Color("Owner:", White));
|
||||
AddHtml(15, 100, 210, 20, Color(Right(owner), White));
|
||||
AddHtml(15, 100, 210, 20, "Owner:".Color(White));
|
||||
AddHtml(15, 100, 210, 20, owner.Right(White));
|
||||
|
||||
AddHtml(15, 120, 210, 20, Color("Name:", White));
|
||||
AddHtml(15, 120, 210, 20, Color(Right(houseName), White));
|
||||
AddHtml(15, 120, 210, 20, "Name:".Color(White));
|
||||
AddHtml(15, 120, 210, 20, houseName.Right(White));
|
||||
|
||||
AddHtml(15, 140, 210, 20, Color("Friends:", White));
|
||||
AddHtml(15, 140, 210, 20, Color(Right(sel.Friends.Count.ToString()), White));
|
||||
AddHtml(15, 140, 210, 20, "Friends:".Color(White));
|
||||
AddHtml(15, 140, 210, 20, sel.Friends.Count.ToString().Right(White));
|
||||
|
||||
AddHtml(15, 160, 210, 20, Color("Co-Owners:", White));
|
||||
AddHtml(15, 160, 210, 20, Color(Right(sel.CoOwners.Count.ToString()), White));
|
||||
AddHtml(15, 160, 210, 20, "Co-Owners:".Color(White));
|
||||
AddHtml(15, 160, 210, 20, sel.CoOwners.Count.ToString().Right(White));
|
||||
|
||||
AddHtml(15, 180, 210, 20, Color("Bans:", White));
|
||||
AddHtml(15, 180, 210, 20, Color(Right(sel.Bans.Count.ToString()), White));
|
||||
AddHtml(15, 180, 210, 20, "Bans:".Color(White));
|
||||
AddHtml(15, 180, 210, 20, sel.Bans.Count.ToString().Right(White));
|
||||
|
||||
AddHtml(15, 200, 210, 20, Color("Decays:", White));
|
||||
AddHtml(15, 200, 210, 20, Color(Right(sel.CanDecay ? "Yes" : "No"), White));
|
||||
AddHtml(15, 200, 210, 20, "Decays:".Color(White));
|
||||
AddHtml(15, 200, 210, 20, (sel.CanDecay ? "Yes" : "No").Right(White));
|
||||
|
||||
AddHtml(15, 220, 210, 20, Color("Decay Level:", White));
|
||||
AddHtml(15, 220, 210, 20, Color(Right(sel.DecayLevel.ToString()), White));
|
||||
AddHtml(15, 220, 210, 20, "Decay Level:".Color(White));
|
||||
AddHtml(15, 220, 210, 20, sel.DecayLevel.ToString().Right(White));
|
||||
|
||||
AddButton(15, 245, 4005, 4007, 1);
|
||||
AddHtml(50, 245, 120, 20, Color("Go to house", White));
|
||||
AddHtml(50, 245, 120, 20, "Go to house".Color(White));
|
||||
|
||||
AddButton(15, 265, 4005, 4007, 2);
|
||||
AddHtml(50, 265, 120, 20, Color("Open house menu", White));
|
||||
AddHtml(50, 265, 120, 20, "Open house menu".Color(White));
|
||||
|
||||
AddButton(15, 285, 4005, 4007, 3);
|
||||
AddHtml(50, 285, 120, 20, Color("Demolish house", White));
|
||||
AddHtml(50, 285, 120, 20, "Demolish house".Color(White));
|
||||
|
||||
AddButton(15, 305, 4005, 4007, 4);
|
||||
AddHtml(50, 305, 120, 20, Color("Refresh house", White));
|
||||
AddHtml(50, 305, 120, 20, "Refresh house".Color(White));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -302,12 +302,6 @@ namespace Server.Gumps
|
|||
return house.GetType().Name;
|
||||
}
|
||||
|
||||
public string Right(string text) => $"<div align=right>{text}</div>";
|
||||
|
||||
public string Center(string text) => $"<CENTER>{text}</CENTER>";
|
||||
|
||||
public string Color(string text, int color) => $"<BASEFONT COLOR=#{color:X6}>{text}</BASEFONT>";
|
||||
|
||||
public void AddBlackAlpha(int x, int y, int width, int height)
|
||||
{
|
||||
AddImageTiled(x, y, width, height, 2624);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue