/// <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); }
internal void BaseSkinByType(Gump g) { if (relplug == null) { SkillSettings.DoTell("Base Type is invalid. Cannot skin."); } g.AddPage(0); string switchby = relplug.getGumpType(); if (switchby == "Control") { //this.X = sk.GetCoord("Control", "X", sk ); this.Y = sk.SelectionY; g.X = 0; g.Y = 0; if (!Skin.WindowInfo.ContainsKey("Control")) { SkillSettings.DoTell("No key for Control gump skin."); return; } WindowInfo inf = Skin.WindowInfo["Control"]; g.X = inf.X; g.Y = inf.Y; //this.AddBackground(sk.GetCoord("Control", "X", sk ), sk.SelectionY, sk.GetCoord("Control", "W", sk ), sk.GetCoord("Control", "H", sk ), sk.SelectBGID); g.AddBackground(0, 0, inf.W, inf.H, inf.bgID); g.AddImageTiled(Skin.BarSHX, Skin.BarSHY, Skin.BarSHW, Skin.BarSHH, Skin.SelectLineH); g.AddHtml(Skin.TMSSX, Skin.TMSSY, 140, 20, "<basefont size=5 face=1 color=#CC0000><Center>TMSS - //4// -</center></basefont>", false, false); //<basefont size=5 face=1 color=#CC0000><Center>TM Skill & Stat System v3.0</center></basefont> } else if (switchby == "Master") { g.X = 0; g.Y = 0; if (!Skin.WindowInfo.ContainsKey("Master")) { SkillSettings.DoTell("No key for Master gump skin."); return; } WindowInfo inf = Skin.WindowInfo["Master"]; //this.AddBackground(sk.MasterX, sk.MasterY, sk.MasterW, sk.MasterH, sk.MasterBGID); g.X = inf.X; g.Y = inf.Y; g.AddBackground(0, 0, inf.W, inf.H, inf.bgID); g.AddImageTiled(Skin.BarMHX, Skin.BarMHY, Skin.BarMHW, Skin.BarMHH, Skin.MasterLineH); g.AddImageTiled(Skin.BarMVX, Skin.BarMVY, Skin.BarMVW, Skin.BarMVH, Skin.MasterLineV); g.AddItem(Skin.IconMX, Skin.IconMY, Skin.IconMID, Skin.IconMColor); } else if (switchby == "Underbar") { g.X = 0; g.Y = 0; if (!Skin.WindowInfo.ContainsKey("Underbar")) { SkillSettings.DoTell("No key for Underbar gump skin."); return; } WindowInfo inf = Skin.WindowInfo["Underbar"]; g.X = inf.X; g.Y = inf.Y; g.AddBackground(0, 0, inf.W, inf.H, inf.bgID); //this.AddBackground(sk.sk.GetCoord("Underbar", "X", );, sk.sk.GetCoord("Underbar", "Y", );, sk.HelpW, sk.HelpH, sk.HelpBGID); } else SkillSettings.DoTell("Unknown Gump Type. Cannot apply base skin."); }