/// <summary>
/// Sets up a new page for the GumpList to add items to.
/// </summary>
/// <param name="title">The title of the page.</param>
/// <param name="first">Determines if actions for the first page should be taken.</param>
/// <param name="last">Determines if actions for the last page should be taken.</param>
/// <param name="pg">The page number of this page.</param>
private void SetupPage(string title, bool first, bool last, int pg)
{
if (topbar != null)
{
topbar.X = X; //+sk.ListStartX;
topbar.Y = Y; //+sk.ListStartY;
topbar.AppendTo(page);
}
ButtonInfo ListPrevButton = sk.ButtonInfo["ListPrevButton"];
ButtonInfo ListNextButton = sk.ButtonInfo["ListNextButton"];
//ButtonInfo inf2 = sk.ButtonInfo["ListDoneButton"];
page.AddPage(pg);
page.AddLabel(sk.ListTitleX, sk.ListTitleY, sk.ListTitleHue, title);
DebugWrite("Page: " + pg);
if (!first)
{
DebugWrite("Adding previous button: " + (pg - 1));
if (ListPrevButton.bgID != 0)
{
this.AddSuperButton(X + ListPrevButton.X, Y + ListPrevButton.Y, ListPrevButton.H, ListPrevButton.W, ListPrevButton.bgID, sk.ListUnderButtonN, sk.ListUnderButtonP, ListPrevButton.text, GumpButtonType.Page, 0, pg - 1);
}
else
{
page.AddButton(ListPrevButton.X, ListPrevButton.Y, ListPrevButton.up, ListPrevButton.down, 1, GumpButtonType.Page, pg - 1);
}
}
if (!last)
{
DebugWrite("Adding next button: " + (pg + 1));
if (ListNextButton.bgID != 0)
{
this.AddSuperButton(X + ListNextButton.X, Y + ListNextButton.Y, ListNextButton.H, ListNextButton.W, ListNextButton.bgID, sk.ListUnderButtonN, sk.ListUnderButtonP, ListNextButton.text, GumpButtonType.Page, 0, pg + 1);
}
else
{
page.AddButton(ListNextButton.X, ListNextButton.Y, ListNextButton.up, ListNextButton.down, 1, GumpButtonType.Page, pg + 1);
}
}
//AddSuperButton(inf2.X, inf2.Y, inf2.H, inf2.W, inf2.bgID, sk.EntryButtonUnderlay, sk.EntryButtonUnderlay, inf2.text, GumpButtonType.Reply, 1, 0);
}