Clean up: Bugs, LINQ, constructors, default values, and null checks (#18)

This commit is contained in:
Kamron Batman 2019-03-11 14:29:59 -07:00 committed by GitHub
parent e748af4430
commit 513e54f70e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
1094 changed files with 15913 additions and 21892 deletions

View file

@ -11,7 +11,7 @@ namespace Server.Gumps
private TextDefinition m_Label;
private int m_LocalizedTooltip;
public ImageTileButtonInfo(int itemID, int hue, TextDefinition label, int localizedTooltip)
public ImageTileButtonInfo(int itemID, int hue, TextDefinition label, int localizedTooltip = -1)
{
m_Hue = hue;
m_ItemID = itemID;
@ -19,10 +19,6 @@ namespace Server.Gumps
m_LocalizedTooltip = localizedTooltip;
}
public ImageTileButtonInfo(int itemID, int hue, TextDefinition label) : this(itemID, hue, label, -1)
{
}
public virtual int ItemID
{
get => m_ItemID;
@ -69,8 +65,8 @@ namespace Server.Gumps
AddImageTiled(10, y + 54, x, 20, 0xA40);
AddAlphaRegion(10, 10, x, y + 64);
AddButton(10, y + 54, 0xFB1, 0xFB2, 0, GumpButtonType.Reply, 0); //Cancel Button
AddHtmlLocalized(45, y + 56, x - 50, 20, 1060051, 0x7FFF, false, false); // CANCEL
AddButton(10, y + 54, 0xFB1, 0xFB2, 0); //Cancel Button
AddHtmlLocalized(45, y + 56, x - 50, 20, 1060051, 0x7FFF); // CANCEL
TextDefinition.AddHtmlText(this, 14, 12, x, 20, header, false, false, 0x7FFF, 0xFFFFFF);
AddPage(1);
@ -89,12 +85,12 @@ namespace Server.Gumps
if (position == 0 && i != 0)
{
AddButton(x - 100, y + 54, 0xFA5, 0xFA7, 0, GumpButtonType.Page, pageNum);
AddHtmlLocalized(x - 60, y + 56, 60, 20, 1043353, 0x7FFF, false, false); // Next
AddHtmlLocalized(x - 60, y + 56, 60, 20, 1043353, 0x7FFF); // Next
AddPage(pageNum);
AddButton(x - 200, y + 54, 0xFAE, 0xFB0, 0, GumpButtonType.Page, pageNum - 1);
AddHtmlLocalized(x - 160, y + 56, 60, 20, 1011393, 0x7FFF, false, false); // Back
AddHtmlLocalized(x - 160, y + 56, 60, 20, 1011393, 0x7FFF); // Back
}
ImageTileButtonInfo b = buttons[i];
@ -128,4 +124,4 @@ namespace Server.Gumps
{
}
}
}
}