public ConfirmDeleteEntryGump(Mobile mobile, ArrayList argsList) : base(0, 0) { gumpMobile = mobile; ArgsList = argsList; GetArgsList(); GetTextColors(); AddPage(0); // Page 0 MC.DisplayStyle(this, StyleTypeConfig, 180, 180, 330, 90); MC.DisplayBackground(this, BackgroundTypeConfig, 200, 200, 290, 20); MC.DisplayBackground(this, BackgroundTypeConfig, 200, 230, 290, 20); AddHtml(221, 181, 270, 20, MC.ColorText(titleTextColor, "Confirmation Of Deleting Entry"), false, false); AddHtml(201, 201, 290, 20, MC.ColorText(defaultTextColor, "Are you sure you want to delete the entry?"), false, false); AddHtml(441, 231, 60, 20, MC.ColorText(defaultTextColor, "Cancel"), false, false); AddButton(400, 230, 4017, 4019, 0, GumpButtonType.Reply, 0); AddHtml(241, 231, 60, 20, MC.ColorText(defaultTextColor, "Ok"), false, false); AddButton(200, 230, 4023, 4025, 1, GumpButtonType.Reply, 0); }
public FixEntryAmountGump(Mobile mobile, ArrayList argsList) : base(0, 0) { gumpMobile = mobile; ArgsList = argsList; GetArgsList(); GetTextColors(); AddPage(0); // Page 0 MC.DisplayStyle(this, StyleTypeConfig, 180, 180, 380, 110); MC.DisplayBackground(this, BackgroundTypeConfig, 200, 200, 340, 40); MC.DisplayBackground(this, BackgroundTypeConfig, 200, 250, 340, 20); AddHtml(221, 181, 320, 20, MC.ColorText(titleTextColor, "Confirmation Of Fixing Entry Amount"), false, false); AddHtml(201, 201, 340, 40, MC.ColorText(defaultTextColor, "Are you sure you want to fix the entry amount for overridden spawners?"), false, false); AddHtml(491, 251, 60, 20, MC.ColorText(defaultTextColor, "Cancel"), false, false); AddButton(450, 250, 4017, 4019, 0, GumpButtonType.Reply, 0); AddHtml(241, 251, 60, 20, MC.ColorText(defaultTextColor, "Ok"), false, false); AddButton(200, 250, 4023, 4025, 1, GumpButtonType.Reply, 0); }
public RemoveBadEntriesGump(Mobile mobile, ArrayList argsList) : base(0, 0) { gumpMobile = mobile; ArgsList = argsList; GetArgsList(); GetTextColors(); AddPage(0); // Page 0 MC.DisplayStyle(this, StyleTypeConfig, 180, 180, 380, 110); MC.DisplayBackground(this, BackgroundTypeConfig, 200, 200, 340, 40); MC.DisplayBackground(this, BackgroundTypeConfig, 200, 250, 340, 20); AddHtml(221, 181, 320, 20, MC.ColorText(titleTextColor, "Confirmation Of Deleting Bad Entries"), false, false); AddHtml(201, 201, 340, 40, MC.ColorText(defaultTextColor, "Are you sure you want to delete all bad entries on selected spawners?"), false, false); AddHtml(491, 251, 60, 20, MC.ColorText(defaultTextColor, "Cancel"), false, false); AddButton(450, 250, 4017, 4019, 0, GumpButtonType.Reply, 0); AddHtml(241, 251, 60, 20, MC.ColorText(defaultTextColor, "Ok"), false, false); AddButton(200, 250, 4023, 4025, 1, GumpButtonType.Reply, 0); }
private void AddButtonsPageOne() { AddHtml(141, 451, 300, 20, MC.ColorText(commandButtonsTextColor, "Misc Configuration"), false, false); if (MiscConfigClicked) { AddButton(100, 450, 5541, 5542, 1, GumpButtonType.Reply, 0); } else { AddButton(100, 450, 9904, 9905, 1, GumpButtonType.Reply, 0); } AddHtml(391, 451, 300, 20, MC.ColorText(commandButtonsTextColor, "Timer Configuration"), false, false); if (TimerConfigClicked) { AddButton(350, 450, 5541, 5542, 4, GumpButtonType.Reply, 0); } else { AddButton(350, 450, 9904, 9905, 4, GumpButtonType.Reply, 0); } AddStaticButtons(); }
private void AddPages() { AddCommandButtons(); totalPages = (int)((MenuAccessList.Count - 1) / amtPerPg) + 1; string pageNum = String.Format("{0}/{1}", pg, totalPages); AddLabel(540, 80, PageNumberTextColor, "Page:"); AddTextEntry(580, 80, 90, 20, PageNumberTextColor, 0, pageNum); if (Help) { AddButton(529, 85, 2104, 2103, -100, GumpButtonType.Reply, 0); } if (MenuAccessList.Count == 0) { MC.DisplayBackground(this, BackgroundTypeConfig, 100, 100, 560, 330); AddHtml(100, 100, 560, 330, MC.ColorText(defaultTextColor, "You do not have access to any menu commands."), false, false); } SetPage(); }
public SetSpawnerNameGump(Mobile mobile, ArrayList argsList) : base(0, 0) { gumpMobile = mobile; ArgsList = argsList; GetArgsList(); GetTextColors(); AddPage(0); // Page 0 MC.DisplayStyle(this, StyleTypeConfig, 180, 180, 330, 90); MC.DisplayBackground(this, BackgroundTypeConfig, 200, 200, 290, 20); MC.DisplayBackground(this, BackgroundTypeConfig, 200, 230, 290, 20); AddHtml(221, 181, 270, 20, MC.ColorText(titleTextColor, "Set Spawner Name"), false, false); MC.DisplayBackground(this, ActiveTEBGTypeConfig, 200, 200, 290, 20); AddTextEntry(200, 200, 280, 20, ActiveTextEntryTextColor, 0, megaSpawner.Name); AddHtml(441, 231, 60, 20, MC.ColorText(defaultTextColor, "Cancel"), false, false); AddButton(400, 230, 4017, 4019, 0, GumpButtonType.Reply, 0); AddHtml(241, 231, 60, 20, MC.ColorText(defaultTextColor, "Ok"), false, false); AddButton(200, 230, 4023, 4025, 1, GumpButtonType.Reply, 0); }
private void AddPages() { AddCommandButtons(); totalPages = (int)((SearchResultsList.Count - 1) / amtPerPg) + 1; string pageNum = String.Format("{0}/{1}", pg, totalPages); AddLabel(540, 80, PageNumberTextColor, "Page:"); AddTextEntry(580, 80, 90, 20, PageNumberTextColor, 0, pageNum); if (Help) { AddButton(529, 85, 2104, 2103, -100, GumpButtonType.Reply, 0); } if (SearchResultsList.Count == 0) { MC.DisplayBackground(this, BackgroundTypeConfig, 100, 100, 560, 330); AddHtml(100, 100, 560, 330, MC.ColorText(defaultTextColor, "No search results to display."), false, false); } else { MC.DisplayBackground(this, BackgroundTypeConfig, 100, 100, 560, 20); AddHtml(101, 101, 560, 20, MC.ColorText(defaultTextColor, "<center>Search Result List</center>"), false, false); SetPage(); } }
public LoadFileGump(Mobile mobile, ArrayList argsList, LoadType loadtype, string filename) : base(0, 0) { gumpMobile = mobile; ArgsList = argsList; GetArgsList(); GetTextColors(); loadType = loadtype; FileName = filename; AddPage(0); // Page 0 MC.DisplayStyle(this, StyleTypeConfig, 180, 180, 340, 120); MC.DisplayBackground(this, BackgroundTypeConfig, 200, 200, 300, 40); MC.DisplayBackground(this, BackgroundTypeConfig, 200, 260, 300, 20); AddHtml(221, 181, 280, 20, MC.ColorText(titleTextColor, "Load File"), false, false); switch (loadType) { case LoadType.Manual: { AddHtml(201, 201, 280, 20, MC.ColorText(defaultTextColor, "Type in the filename to load:"), false, false); MC.DisplayBackground(this, ActiveTEBGTypeConfig, 200, 220, 300, 18); AddTextEntry(200, 220, 300, 15, ActiveTextEntryTextColor, 0, ""); break; } case LoadType.FileBrowserMsf: { AddHtml(201, 201, 280, 20, MC.ColorText(defaultTextColor, "Are you sure you want to load file:"), false, false); AddHtml(201, 221, 280, 20, MC.ColorText(defaultTextColor, MC.CropDirectory(FileName)), false, false); break; } case LoadType.FileBrowserMbk: { MC.DisplayStyle(this, StyleTypeConfig, 180, 160, 340, 20); MC.DisplayBackground(this, BackgroundTypeConfig, 181, 161, 338, 18); AddHtml(201, 161, 280, 20, MC.ColorText(defaultTextColor, "Warning: All Mega Spawners will be removed."), false, false); AddHtml(201, 201, 280, 20, MC.ColorText(defaultTextColor, "Are you sure you want to load backup file:"), false, false); AddHtml(201, 221, 280, 20, MC.ColorText(defaultTextColor, MC.CropDirectory(FileName)), false, false); break; } } AddHtml(441, 261, 60, 20, MC.ColorText(defaultTextColor, "Cancel"), false, false); AddButton(400, 260, 4017, 4019, 0, GumpButtonType.Reply, 0); AddHtml(241, 261, 60, 20, MC.ColorText(defaultTextColor, "Ok"), false, false); AddButton(200, 260, 4023, 4025, 1, GumpButtonType.Reply, 0); }
private void AddStaticButtons() { AddHtml(141, 471, 300, 20, MC.ColorText(commandButtonsTextColor, "Reset Configurations To Defaults"), false, false); AddButton(100, 470, 9904, 9905, 2, GumpButtonType.Reply, 0); AddHtml(141, 491, 300, 20, MC.ColorText(commandButtonsTextColor, "Save Configurations"), false, false); AddButton(100, 490, 9904, 9905, 3, GumpButtonType.Reply, 0); }
private void AddButtonsPageTwo() { AddHtml(141, 451, 300, 20, MC.ColorText(commandButtonsTextColor, "New Spawner Workspace"), false, false); AddButton(100, 450, 9904, 9905, 7, GumpButtonType.Reply, 0); AddHtml(391, 451, 300, 20, MC.ColorText(commandButtonsTextColor, "Create Backup File"), false, false); AddButton(350, 450, 9904, 9905, 10, GumpButtonType.Reply, 0); }
private void AddStaticButtons() { AddHtml(141, 471, 300, 20, MC.ColorText(commandButtonsTextColor, "Reset"), false, false); AddButton(100, 470, 9904, 9905, 2, GumpButtonType.Reply, 0); AddHtml(141, 491, 300, 20, MC.ColorText(commandButtonsTextColor, "Submit"), false, false); AddButton(100, 490, 9904, 9905, 3, GumpButtonType.Reply, 0); }
private void SetPage() { int listY = 122; int spaceLeft = listSpace; if (totalPages > pg) { AddHtml(431, 431, 100, 20, MC.ColorText(defaultTextColor, String.Format("Page {0}", (pg + 1))), false, false); AddButton(380, 430, 4005, 4007, -3, GumpButtonType.Reply, 0); } if (pg > 1) { int length = ((pg - 1).ToString().Length - 1) * 10; int pageX = 280 - length; AddHtml(pageX + 1, 431, 100, 20, MC.ColorText(defaultTextColor, String.Format("Page {0}", (pg - 1))), false, false); AddButton(340, 430, 4014, 4016, -4, GumpButtonType.Reply, 0); } GetOffsets(); for (int i = offsetMin; i <= offsetMax; i++) { MC.DisplayBackground(this, BackgroundTypeConfig, 100, listY, 198, 20); MC.DisplayBackground(this, BackgroundTypeConfig, 300, listY, 53, 20); MC.DisplayBackground(this, BackgroundTypeConfig, 355, listY, 113, 20); MC.DisplayBackground(this, BackgroundTypeConfig, 470, listY, 168, 20); MC.DisplayBackground(this, BackgroundTypeConfig, 640, listY, 20, 20); Item spawner = (Item)SpawnerList[i]; if (spawner is Spawner) { spawner = (Spawner)spawner; } AddButton(100, listY, 9904, 9905, i + numOffset, GumpButtonType.Reply, 0); AddHtml(141, listY + 1, 200, 20, MC.ColorText(defaultTextColor, spawner.Name), false, false); AddHtml(301, listY + 1, 55, 20, MC.ColorText(defaultTextColor, String.Format("<center>{0}</center>", spawner.Map.ToString())), false, false); AddHtml(356, listY + 1, 115, 20, MC.ColorText(defaultTextColor, String.Format("<center>{0}</center>", spawner.Location.ToString())), false, false); if (spawner is Spawner) { AddHtml(471, listY + 1, 170, 20, MC.ColorText(defaultTextColor, "<center>Distro Spawner</center>"), false, false); } AddCheck(640, listY, 210, 211, (bool)CUGCheckBoxesList[i], i); listY += 21; spaceLeft -= 21; } MC.DisplayBackground(this, BackgroundTypeConfig, 100, listY, 560, spaceLeft); }
private void SetPage() { int listY = 122; int spaceLeft = listSpace; if (totalPages > pg) { AddHtml(431, 431, 100, 20, MC.ColorText(defaultTextColor, String.Format("Page {0}", (pg + 1))), false, false); AddButton(380, 430, 4005, 4007, -3, GumpButtonType.Reply, 0); } if (pg > 1) { int length = ((pg - 1).ToString().Length - 1) * 10; int pageX = 280 - length; AddHtml(pageX + 1, 431, 100, 20, MC.ColorText(defaultTextColor, String.Format("Page {0}", (pg - 1))), false, false); AddButton(340, 430, 4014, 4016, -4, GumpButtonType.Reply, 0); } GetOffsets(); for (int i = offsetMin; i <= offsetMax; i++) { ArrayList List = (ArrayList)InsideItemList[i]; itemToAdd = (string)List[0]; minStackAmount = (int)List[1]; maxStackAmount = (int)List[2]; MC.DisplayBackground(this, BackgroundTypeConfig, 100, listY, 228, 20); MC.DisplayBackground(this, BackgroundTypeConfig, 330, listY, 118, 20); MC.DisplayBackground(this, BackgroundTypeConfig, 450, listY, 118, 20); MC.DisplayBackground(this, BackgroundTypeConfig, 570, listY, 68, 20); AddButton(100, listY, 9904, 9905, i + numOffset, GumpButtonType.Reply, 0); MC.DisplayBackground(this, ActiveTEBGTypeConfig, 140, listY + 1, 188, 18); AddTextEntry(140, listY + 1, 188, 15, ActiveTextEntryTextColor, (i * 3) + 1, itemToAdd); MC.DisplayBackground(this, ActiveTEBGTypeConfig, 330, listY + 1, 118, 18); AddTextEntry(330, listY + 1, 118, 15, ActiveTextEntryTextColor, (i * 3) + 2, minStackAmount.ToString()); MC.DisplayBackground(this, ActiveTEBGTypeConfig, 450, listY + 1, 118, 18); AddTextEntry(450, listY + 1, 118, 15, ActiveTextEntryTextColor, (i * 3) + 3, maxStackAmount.ToString()); AddHtml(571, listY + 1, 68, 20, MC.ColorText(defaultTextColor, String.Format("<center>{0}</center>", i)), false, false); AddCheck(640, listY, 210, 211, (bool)AITCCheckBoxesList[i], i); listY += 21; spaceLeft -= 21; } MC.DisplayBackground(this, BackgroundTypeConfig, 100, listY, 560, spaceLeft); }
private void SetPage() { int listY = 100; int spaceLeft = listSpace; if (totalPages > pg) { AddHtml(431, 431, 100, 20, MC.ColorText(defaultTextColor, String.Format("Page {0}", (pg + 1))), false, false); AddButton(380, 430, 4005, 4007, -3, GumpButtonType.Reply, 0); } if (pg > 1) { int length = ((pg - 1).ToString().Length - 1) * 10; int pageX = 280 - length; AddHtml(pageX + 1, 431, 100, 20, MC.ColorText(defaultTextColor, String.Format("Page {0}", (pg - 1))), false, false); AddButton(340, 430, 4014, 4016, -4, GumpButtonType.Reply, 0); } GetOffsets(); for (int i = offsetMin; i <= offsetMax; i++) { MC.DisplayBackground(this, BackgroundTypeConfig, 100, listY, 560, 20); int option = (int)MenuSwitchList[i]; switch (option) { case 0: { AddHtml(141, listY + 1, 520, 20, MC.ColorText(commandButtonsTextColor, "Accounts Management Menu"), false, false); AddButton(100, listY, 9904, 9905, 101, GumpButtonType.Reply, 0); break; } case 1: { AddHtml(141, listY + 1, 520, 20, MC.ColorText(commandButtonsTextColor, "Edit System Configuration"), false, false); AddButton(100, listY, 9904, 9905, 102, GumpButtonType.Reply, 0); break; } } listY += 21; spaceLeft -= 21; } MC.DisplayBackground(this, BackgroundTypeConfig, 100, listY, 560, spaceLeft); }
private void AddButtonsPageOne() { AddHtml(141, 451, 300, 20, MC.ColorText(commandButtonsTextColor, "Convert Selected Spawners"), false, false); AddButton(100, 450, 9904, 9905, 1, GumpButtonType.Reply, 0); AddHtml(141, 471, 300, 20, MC.ColorText(commandButtonsTextColor, "Convert All Spawners"), false, false); AddButton(100, 470, 9904, 9905, 2, GumpButtonType.Reply, 0); AddHtml(391, 451, 300, 20, MC.ColorText(commandButtonsTextColor, "Select All Spawners"), false, false); AddButton(350, 450, 9904, 9905, 3, GumpButtonType.Reply, 0); AddHtml(391, 471, 300, 20, MC.ColorText(commandButtonsTextColor, "Deselect All Spawners"), false, false); AddButton(350, 470, 9904, 9905, 4, GumpButtonType.Reply, 0); }
public SaveFileGump(Mobile mobile, ArrayList argsList, SaveType savetype, string filename) : base(0, 0) { gumpMobile = mobile; ArgsList = argsList; GetArgsList(); GetTextColors(); saveType = savetype; FileName = filename; AddPage(0); // Page 0 MC.DisplayStyle(this, StyleTypeConfig, 180, 180, 340, 120); MC.DisplayBackground(this, BackgroundTypeConfig, 200, 200, 300, 40); MC.DisplayBackground(this, BackgroundTypeConfig, 200, 260, 300, 20); AddHtml(221, 181, 280, 20, MC.ColorText(titleTextColor, "Save File"), false, false); switch (saveType) { case SaveType.FileEdit: { AddHtml(201, 201, 280, 20, MC.ColorText(defaultTextColor, "Are you sure you want to save file:"), false, false); AddHtml(201, 221, 280, 20, MC.ColorText(defaultTextColor, FileName), false, false); break; } default: { AddHtml(201, 201, 280, 20, MC.ColorText(defaultTextColor, "Type in a filename without an extension:"), false, false); MC.DisplayBackground(this, ActiveTEBGTypeConfig, 200, 220, 300, 18); AddTextEntry(200, 220, 300, 15, ActiveTextEntryTextColor, 0, ""); break; } } AddHtml(441, 261, 60, 20, MC.ColorText(defaultTextColor, "Cancel"), false, false); AddButton(400, 260, 4017, 4019, 0, GumpButtonType.Reply, 0); AddHtml(241, 261, 60, 20, MC.ColorText(defaultTextColor, "Ok"), false, false); AddButton(200, 260, 4023, 4025, 1, GumpButtonType.Reply, 0); CompileSpawnerList(); }
private void AddPages() { AddCommandButtons(); totalPages = (int)((SpawnerList.Count - 1) / amtPerPg) + 1; string pageNum = String.Format("{0}/{1}", pg, totalPages); AddLabel(540, 80, PageNumberTextColor, "Page:"); AddTextEntry(580, 80, 90, 20, PageNumberTextColor, 0, pageNum); if (Help) { AddButton(529, 85, 2104, 2103, -100, GumpButtonType.Reply, 0); } if (SpawnerList.Count == 0) { MC.DisplayBackground(this, BackgroundTypeConfig, 100, 100, 560, 330); AddHtml(100, 100, 560, 330, MC.ColorText(defaultTextColor, "There are no spawners on the entire server that are not Mega Spawners."), false, false); } else { MC.DisplayBackground(this, BackgroundTypeConfig, 100, 100, 198, 20); MC.DisplayBackground(this, BackgroundTypeConfig, 300, 100, 53, 20); MC.DisplayBackground(this, BackgroundTypeConfig, 355, 100, 113, 20); MC.DisplayBackground(this, BackgroundTypeConfig, 470, 100, 168, 20); MC.DisplayBackground(this, BackgroundTypeConfig, 640, 100, 20, 20); AddButton(640, 100, 211, 210, -9, GumpButtonType.Reply, 0); if (Help) { AddButton(193, 100, 2104, 2103, -101, GumpButtonType.Reply, 0); AddButton(321, 100, 2104, 2103, -102, GumpButtonType.Reply, 0); AddButton(406, 100, 2104, 2103, -103, GumpButtonType.Reply, 0); AddButton(548, 100, 2104, 2103, -104, GumpButtonType.Reply, 0); } AddHtml(100, 100, 200, 20, MC.ColorText(defaultTextColor, "<center>Name</center>"), false, false); AddHtml(300, 100, 55, 20, MC.ColorText(defaultTextColor, "<center>Facet</center>"), false, false); AddHtml(355, 100, 115, 20, MC.ColorText(defaultTextColor, "<center>Location</center>"), false, false); AddHtml(470, 100, 170, 20, MC.ColorText(defaultTextColor, "<center>Spawner Type</center>"), false, false); SetPage(); } }
private void SetPage() { int listY = 122; int spaceLeft = listSpace; if (totalPages > pg) { AddHtml(431, 431, 100, 20, MC.ColorText(defaultTextColor, String.Format("Page {0}", (pg + 1))), false, false); AddButton(380, 430, 4005, 4007, -3, GumpButtonType.Reply, 0); } if (pg > 1) { int length = ((pg - 1).ToString().Length - 1) * 10; int pageX = 280 - length; AddHtml(pageX + 1, 431, 100, 20, MC.ColorText(defaultTextColor, String.Format("Page {0}", (pg - 1))), false, false); AddButton(340, 430, 4014, 4016, -4, GumpButtonType.Reply, 0); } GetOffsets(); for (int i = offsetMin; i <= offsetMax; i++) { MC.DisplayBackground(this, BackgroundTypeConfig, 100, listY, 438, 20); MC.DisplayBackground(this, BackgroundTypeConfig, 540, listY, 98, 20); string fileName = (string)MC.FileImportList[i]; string fileVersion = (string)MC.FileImportVersionList[i]; if (fileName == "" || fileName == null) { fileName = "Bad FileName"; } AddButton(100, listY, 9904, 9905, i + numOffset, GumpButtonType.Reply, 0); AddHtml(141, listY + 1, 440, 20, MC.ColorText(defaultTextColor, fileName), false, false); AddHtml(541, listY + 1, 100, 20, MC.ColorText(defaultTextColor, String.Format("<center>{0}</center>", fileVersion)), false, false); AddCheck(640, listY, 210, 211, (bool)FMCheckBoxesList[i], i); listY += 21; spaceLeft -= 21; } MC.DisplayBackground(this, BackgroundTypeConfig, 100, listY, 560, spaceLeft); }
private void AddButtonsPageOne() { if (!AddAccount) { AddHtml(141, 471, 300, 20, MC.ColorText(commandButtonsTextColor, "Delete Account"), false, false); AddButton(100, 470, 9904, 9905, 2, GumpButtonType.Reply, 0); AddHtml(141, 491, 300, 20, MC.ColorText(commandButtonsTextColor, "Update Account"), false, false); } else { AddHtml(141, 491, 300, 20, MC.ColorText(commandButtonsTextColor, "Submit Account"), false, false); } AddButton(100, 490, 9904, 9905, 3, GumpButtonType.Reply, 0); }
private void SetPage() { int listY = 122; int spaceLeft = listSpace; if (totalPages > pg) { AddHtml(431, 431, 100, 20, MC.ColorText(defaultTextColor, String.Format("Page {0}", (pg + 1))), false, false); AddButton(380, 430, 4005, 4007, -3, GumpButtonType.Reply, 0); } if (pg > 1) { int length = ((pg - 1).ToString().Length - 1) * 10; int pageX = 280 - length; AddHtml(pageX + 1, 431, 100, 20, MC.ColorText(defaultTextColor, String.Format("Page {0}", (pg - 1))), false, false); AddButton(340, 430, 4014, 4016, -4, GumpButtonType.Reply, 0); } GetOffsets(); for (int i = offsetMin; i <= offsetMax; i++) { string textColor = defaultTextColor; MC.DisplayBackground(this, BackgroundTypeConfig, 100, listY, 560, 20); ArrayList setting = (ArrayList)megaSpawner.SettingsList[i]; if (!MC.VerifySetting(setting)) { textColor = flagTextColor; } AddButton(100, listY, 9904, 9905, i + numOffset, GumpButtonType.Reply, 0); AddHtml(141, listY + 1, 520, 20, MC.ColorText(textColor, MC.GetSettingInfo(megaSpawner, setting)), false, false); AddCheck(640, listY, 210, 211, (bool)SettingsCheckBoxesList[i], i); listY += 21; spaceLeft -= 21; } MC.DisplayBackground(this, BackgroundTypeConfig, 100, listY, 560, spaceLeft); }
private void AddPages() { AddCommandButtons(); totalPages = (int)((InsideItemList.Count - 1) / amtPerPg) + 1; string pageNum = String.Format("{0}/{1}", pg, totalPages); AddLabel(540, 80, PageNumberTextColor, "Page:"); AddTextEntry(580, 80, 90, 20, PageNumberTextColor, 0, pageNum); if (Help) { AddButton(529, 85, 2104, 2103, -100, GumpButtonType.Reply, 0); } if (InsideItemList.Count == 0) { MC.DisplayBackground(this, BackgroundTypeConfig, 100, 100, 560, 330); AddHtml(100, 100, 560, 330, MC.ColorText(defaultTextColor, "There are no items on the item list."), false, false); } else { MC.DisplayBackground(this, BackgroundTypeConfig, 100, 100, 228, 20); MC.DisplayBackground(this, BackgroundTypeConfig, 330, 100, 118, 20); MC.DisplayBackground(this, BackgroundTypeConfig, 450, 100, 118, 20); MC.DisplayBackground(this, BackgroundTypeConfig, 570, 100, 68, 20); AddButton(640, 100, 211, 210, -9, GumpButtonType.Reply, 0); if (Help) { AddButton(209, 100, 2104, 2103, -101, GumpButtonType.Reply, 0); AddButton(384, 100, 2104, 2103, -102, GumpButtonType.Reply, 0); AddButton(504, 100, 2104, 2103, -103, GumpButtonType.Reply, 0); AddButton(599, 100, 2104, 2103, -104, GumpButtonType.Reply, 0); } AddHtml(101, 101, 230, 20, MC.ColorText(defaultTextColor, "<center>Item</center>"), false, false); AddHtml(331, 101, 120, 20, MC.ColorText(defaultTextColor, "<center>Min Stack Amount</center>"), false, false); AddHtml(451, 101, 120, 20, MC.ColorText(defaultTextColor, "<center>Max Stack Amount</center>"), false, false); AddHtml(571, 101, 70, 20, MC.ColorText(defaultTextColor, "<center>Entry #</center>"), false, false); SetPage(); } }
private void AddButtonsPageOne() { AddHtml(141, 451, 300, 20, MC.ColorText(commandButtonsTextColor, "Delete Selected Settings"), false, false); AddButton(100, 450, 9904, 9905, 1, GumpButtonType.Reply, 0); AddHtml(141, 471, 300, 20, MC.ColorText(commandButtonsTextColor, "Delete All Settings"), false, false); AddButton(100, 470, 9904, 9905, 2, GumpButtonType.Reply, 0); AddHtml(141, 491, 300, 20, MC.ColorText(commandButtonsTextColor, "Add New Setting"), false, false); AddButton(100, 490, 9904, 9905, 3, GumpButtonType.Reply, 0); AddHtml(391, 451, 300, 20, MC.ColorText(commandButtonsTextColor, "Select All Settings"), false, false); AddButton(350, 450, 9904, 9905, 4, GumpButtonType.Reply, 0); AddHtml(391, 471, 300, 20, MC.ColorText(commandButtonsTextColor, "Deselect All Settings"), false, false); AddButton(350, 470, 9904, 9905, 5, GumpButtonType.Reply, 0); }
private void AddPages() { AddCommandButtons(); totalPages = (int)((MC.AccountsList.Count - 1) / amtPerPg) + 1; if (pg > totalPages) { pg = totalPages; } string pageNum = String.Format("{0}/{1}", pg, totalPages); AddLabel(540, 80, PageNumberTextColor, "Page:"); AddTextEntry(580, 80, 90, 20, PageNumberTextColor, 0, pageNum); if (Help) { AddButton(529, 85, 2104, 2103, -100, GumpButtonType.Reply, 0); } if (MC.AccountsList.Count == 0) { MC.DisplayBackground(this, BackgroundTypeConfig, 100, 100, 560, 330); AddHtml(100, 100, 560, 330, MC.ColorText(defaultTextColor, "There are no accounts to display."), false, false); } else { MC.DisplayBackground(this, BackgroundTypeConfig, 100, 100, 338, 20); MC.DisplayBackground(this, BackgroundTypeConfig, 440, 100, 200, 20); AddButton(640, 100, 211, 210, -9, GumpButtonType.Reply, 0); if (Help) { // AddButton( 193, 100, 2104, 2103, -101, GumpButtonType.Reply, 0 ); } AddHtml(101, 101, 340, 20, MC.ColorText(defaultTextColor, "<center>Account Name</center>"), false, false); AddHtml(441, 101, 200, 20, MC.ColorText(defaultTextColor, "<center>Access Level</center>"), false, false); } SetPage(); }
private void AddButtonsPageOne() { AddHtml(141, 451, 300, 20, MC.ColorText(commandButtonsTextColor, "Manual Load File"), false, false); AddButton(100, 450, 9904, 9905, 1, GumpButtonType.Reply, 0); AddHtml(141, 471, 300, 20, MC.ColorText(commandButtonsTextColor, "Unload Selected Files"), false, false); AddButton(100, 470, 9904, 9905, 2, GumpButtonType.Reply, 0); AddHtml(141, 491, 300, 20, MC.ColorText(commandButtonsTextColor, "Unload All Files"), false, false); AddButton(100, 490, 9904, 9905, 3, GumpButtonType.Reply, 0); AddHtml(391, 451, 300, 20, MC.ColorText(commandButtonsTextColor, "Open File Browser"), false, false); AddButton(350, 450, 9904, 9905, 4, GumpButtonType.Reply, 0); AddHtml(391, 471, 300, 20, MC.ColorText(commandButtonsTextColor, "Save Selected From Spawner List"), false, false); AddButton(350, 470, 9904, 9905, 5, GumpButtonType.Reply, 0); AddHtml(391, 491, 300, 20, MC.ColorText(commandButtonsTextColor, "Save All Spawners"), false, false); AddButton(350, 490, 9904, 9905, 6, GumpButtonType.Reply, 0); }
public ConfirmDeleteSpawnersGump(Mobile mobile, ArrayList argsList, int select) : base(0, 0) { gumpMobile = mobile; Select = select; ArgsList = argsList; GetArgsList(); GetTextColors(); AddPage(0); // Page 0 MC.DisplayStyle(this, StyleTypeConfig, 180, 180, 380, 90); MC.DisplayBackground(this, BackgroundTypeConfig, 200, 200, 340, 20); MC.DisplayBackground(this, BackgroundTypeConfig, 200, 230, 340, 20); switch (Select) { case 1: { AddHtml(221, 181, 320, 20, MC.ColorText(titleTextColor, "Confirmation Of Deleting All Spawners"), false, false); break; } case 2: { AddHtml(221, 181, 320, 20, MC.ColorText(titleTextColor, "Confirmation Of Deleting Selected Spawners"), false, false); break; } case 3: { AddHtml(221, 181, 320, 20, MC.ColorText(titleTextColor, "Confirmation Of Deleting Imported Spawners"), false, false); break; } } switch (Select) { case 1: { AddHtml(201, 201, 340, 20, MC.ColorText(defaultTextColor, "Are you sure you want to delete all spawners?"), false, false); break; } case 2: { AddHtml(201, 201, 340, 20, MC.ColorText(defaultTextColor, "Are you sure you want to delete selected spawners?"), false, false); break; } case 3: { AddHtml(201, 201, 340, 20, MC.ColorText(defaultTextColor, "Are you sure you want to delete imported spawners?"), false, false); break; } } AddHtml(491, 231, 60, 20, MC.ColorText(defaultTextColor, "Cancel"), false, false); AddButton(450, 230, 4017, 4019, 0, GumpButtonType.Reply, 0); AddHtml(241, 231, 60, 20, MC.ColorText(defaultTextColor, "Ok"), false, false); AddButton(200, 230, 4023, 4025, 1, GumpButtonType.Reply, 0); }
private void AddCommandButtons() { switch (cpg) { case 1: { AddButtonsPageOne(); break; } } if (cpg != 1) // Next Command Page { AddHtml(441, 511, 150, 20, MC.ColorText(defaultTextColor, String.Format("Command Page {0}", ((int)cpg + 1))), false, false); AddButton(390, 510, 4005, 4007, -1, GumpButtonType.Reply, 0); } AddHtml(361, 511, 30, 20, MC.ColorText(defaultTextColor, String.Format("<center>{0}</center>", ((int)cpg))), false, false); if (cpg != 1) // Previous Command Page { AddHtml(211, 511, 150, 20, MC.ColorText(defaultTextColor, String.Format("Command Page {0}", ((int)cpg - 1))), false, false); AddButton(330, 510, 4014, 4016, -2, GumpButtonType.Reply, 0); } }
private void AddPages() { AddCommandButtons(); totalPages = (int)((MC.FileImportList.Count - 1) / amtPerPg) + 1; string pageNum = String.Format("{0}/{1}", pg, totalPages); AddLabel(540, 80, PageNumberTextColor, "Page:"); AddTextEntry(580, 80, 90, 20, PageNumberTextColor, 0, pageNum); if (Help) { AddButton(529, 85, 2104, 2103, -100, GumpButtonType.Reply, 0); } if (MC.FileImportList.Count == 0) { MC.DisplayBackground(this, BackgroundTypeConfig, 100, 100, 560, 330); AddHtml(100, 100, 560, 330, MC.ColorText(defaultTextColor, "There are no files on the import file list."), false, false); } else { MC.DisplayBackground(this, BackgroundTypeConfig, 100, 100, 438, 20); MC.DisplayBackground(this, BackgroundTypeConfig, 540, 100, 98, 20); AddButton(640, 100, 211, 210, -9, GumpButtonType.Reply, 0); if (Help) { AddButton(364, 100, 2104, 2103, -101, GumpButtonType.Reply, 0); } AddHtml(101, 101, 440, 20, MC.ColorText(defaultTextColor, "<center>File Name</center>"), false, false); AddHtml(541, 101, 100, 20, MC.ColorText(defaultTextColor, "<center>File Version</center>"), false, false); SetPage(); } }
public ConfirmAbandonChangesGump(Mobile mobile, ArrayList argsList, ArrayList spawnerList, int select) : base(0, 0) { gumpMobile = mobile; SpawnerList = spawnerList; Select = select; ArgsList = argsList; GetArgsList(); GetTextColors(); AddPage(0); // Page 0 MC.DisplayStyle(this, StyleTypeConfig, 180, 180, 380, 90); MC.DisplayBackground(this, BackgroundTypeConfig, 200, 200, 340, 20); MC.DisplayBackground(this, BackgroundTypeConfig, 200, 230, 340, 20); switch (Select) { case 1: { AddHtml(221, 181, 320, 20, MC.ColorText(titleTextColor, "Confirmation Of Abandon Spawner Workspace"), false, false); break; } case 2: { AddHtml(221, 181, 320, 20, MC.ColorText(titleTextColor, String.Format("Confirmation Of Abandon Changes To File: {0}", FileName)), false, false); break; } } switch (Select) { case 1: { AddHtml(201, 201, 340, 20, MC.ColorText(defaultTextColor, "Are you sure you want to abandon Spawner Workspace?"), false, false); break; } case 2: { AddHtml(201, 201, 340, 20, MC.ColorText(defaultTextColor, "Are you sure you want to abandon changes to file?"), false, false); break; } } AddHtml(491, 231, 60, 20, MC.ColorText(defaultTextColor, "Cancel"), false, false); AddButton(450, 230, 4017, 4019, 0, GumpButtonType.Reply, 0); AddHtml(241, 231, 60, 20, MC.ColorText(defaultTextColor, "Ok"), false, false); AddButton(200, 230, 4023, 4025, 1, GumpButtonType.Reply, 0); }
private void SetPage() { int listY = 122; int spaceLeft = listSpace; if (totalPages > pg) { AddHtml(431, 431, 100, 20, MC.ColorText(defaultTextColor, String.Format("Page {0}", (pg + 1))), false, false); AddButton(380, 430, 4005, 4007, -3, GumpButtonType.Reply, 0); } if (pg > 1) { int length = ((pg - 1).ToString().Length - 1) * 10; int pageX = 280 - length; AddHtml(pageX + 1, 431, 100, 20, MC.ColorText(defaultTextColor, String.Format("Page {0}", (pg - 1))), false, false); AddButton(340, 430, 4014, 4016, -4, GumpButtonType.Reply, 0); } GetOffsets(); for (int i = offsetMin; i <= offsetMax; i++) { MC.DisplayBackground(this, BackgroundTypeConfig, 100, listY, 560, 20); string searchResult = (string)SearchResultsList[i]; AddButton(100, listY, 9904, 9905, i + numOffset, GumpButtonType.Reply, 0); AddHtml(141, listY + 1, 520, 20, MC.ColorText(defaultTextColor, searchResult), false, false); listY += 21; spaceLeft -= 21; } MC.DisplayBackground(this, BackgroundTypeConfig, 100, listY, 560, spaceLeft); }
private void AddPages() { AddCommandButtons(); totalPages = (int)((megaSpawner.SettingsList.Count - 1) / amtPerPg) + 1; string pageNum = String.Format("{0}/{1}", pg, totalPages); AddLabel(540, 80, PageNumberTextColor, "Page:"); AddTextEntry(580, 80, 90, 20, PageNumberTextColor, 0, pageNum); if (Help) { AddButton(529, 85, 2104, 2103, -100, GumpButtonType.Reply, 0); } if (megaSpawner.SettingsList.Count == 0) { MC.DisplayBackground(this, BackgroundTypeConfig, 100, 100, 560, 330); AddHtml(100, 100, 560, 330, MC.ColorText(defaultTextColor, "There are no settings."), false, false); } else { MC.DisplayBackground(this, BackgroundTypeConfig, 100, 100, 560, 20); AddButton(640, 100, 211, 210, -9, GumpButtonType.Reply, 0); if (Help) { AddButton(130, 100, 2104, 2103, -101, GumpButtonType.Reply, 0); } AddHtml(141, 101, 300, 20, MC.ColorText(defaultTextColor, "Setting"), false, false); SetPage(); } }