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);
        }
Ejemplo n.º 2
0
        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();
        }
Ejemplo n.º 3
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();
            }
        }
Ejemplo n.º 4
0
        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);
        }
        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);
        }
        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);
        }
Ejemplo n.º 7
0
        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);
        }
Ejemplo n.º 8
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);
        }
Ejemplo n.º 9
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++)
            {
                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);
        }
Ejemplo n.º 10
0
        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);
        }
Ejemplo n.º 11
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();
        }
Ejemplo n.º 12
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, 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);
        }
Ejemplo n.º 13
0
        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();
            }
        }
Ejemplo n.º 14
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);
        }
Ejemplo n.º 15
0
        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();
            }
        }
Ejemplo n.º 16
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();
        }
Ejemplo n.º 17
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);
        }
Ejemplo n.º 18
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();
            }
        }
Ejemplo n.º 19
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);
        }
Ejemplo n.º 20
0
        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);
        }
Ejemplo n.º 21
0
        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();
            }
        }
Ejemplo n.º 22
0
        private void AddPages()
        {
            AddCommandButtons();

            totalPages = (int)((TotalEntries.Count - 2) / 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 (TotalEntries.Count == 0)
            {
                MC.DisplayBackground(this, BackgroundTypeConfig, 100, 100, 560, 330);

                AddHtml(100, 100, 560, 330, MC.ColorText(defaultTextColor, "There are no files or directories to display."), false, false);
            }
            else
            {
                MC.DisplayBackground(this, BackgroundTypeConfig, 100, 100, 560, 20);

                if (Help)
                {
                    AddButton(130, 100, 2104, 2103, -101, GumpButtonType.Reply, 0);
                }

                AddHtml(140, 101, 520, 20, MC.ColorTextDir(defaultTextColor, String.Format("Directory: {0}", CropCoreDirectory(DirectoryPath))), false, false);

                SetPage();
            }
        }
Ejemplo n.º 23
0
        public FileMenuGump(Mobile mobile, ArrayList argsList) : base(0, 0)
        {
            gumpMobile = mobile;

            ArgsList = argsList;
            GetArgsList();

            ArgsList[34] = (bool)true;                          // RefreshSpawnerLists

            GetTextColors();

            AddPage(0);             // Page 0

            MC.DisplayStyle(this, StyleTypeConfig, 80, 80, 600, 452);

            MC.DisplayBackground(this, BackgroundTypeConfig, 100, 450, 249, 19);
            MC.DisplayBackground(this, BackgroundTypeConfig, 350, 450, 279, 19);
            MC.DisplayBackground(this, BackgroundTypeConfig, 630, 450, 30, 19);
            MC.DisplayBackground(this, BackgroundTypeConfig, 100, 470, 249, 19);
            MC.DisplayBackground(this, BackgroundTypeConfig, 350, 470, 279, 19);
            MC.DisplayBackground(this, BackgroundTypeConfig, 630, 470, 30, 19);
            MC.DisplayBackground(this, BackgroundTypeConfig, 100, 490, 249, 20);
            MC.DisplayBackground(this, BackgroundTypeConfig, 350, 490, 279, 20);
            MC.DisplayBackground(this, BackgroundTypeConfig, 630, 490, 30, 20);

            MC.DisplayImage(this, StyleTypeConfig);

            AddButton(630, 490, 4017, 4019, 0, GumpButtonType.Reply, 0);
            AddHtml(121, 81, 560, 20, MC.ColorText(titleTextColor, "File Menu"), false, false);

            if (!Help)
            {
                AddButton(597, 429, 2033, 2032, -5, GumpButtonType.Reply, 0);
            }
            else
            {
                AddButton(597, 429, 2032, 2033, -5, GumpButtonType.Reply, 0);
            }

            if (DisplayMessages)
            {
                MC.DisplayStyle(this, StyleTypeConfig, 80, 540, 600, 122);
                MC.DisplayBackground(this, BackgroundTypeConfig, 100, 560, 560, 80);

                AddHtml(121, 541, 540, 20, MC.ColorText(titleTextColor, MessagesTitle), false, false);
                AddHtml(100, 560, 560, 80, MC.ColorText(messagesTextColor, Messages), false, true);
                AddHtml(531, 641, 100, 20, MC.ColorText(defaultTextColor, "Clear Messages"), false, false);

                AddButton(630, 640, 4017, 4019, -6, GumpButtonType.Reply, 0);
                AddButton(371, 645, 2436, 2435, -8, GumpButtonType.Reply, 0);
            }
            else
            {
                MC.DisplayStyle(this, StyleTypeConfig, 80, 530, 600, 20);

                AddButton(371, 535, 2438, 2437, -8, GumpButtonType.Reply, 0);
            }

            OldMessagesTitle = MessagesTitle;
            OldMessages      = Messages;

            AddHtml(151, 431, 60, 20, MC.ColorText(defaultTextColor, "Refresh"), false, false);
            AddButton(120, 433, 2118, 2117, -7, GumpButtonType.Reply, 0);

            SetFMCheckBoxes();

            AddPages();
        }
Ejemplo n.º 24
0
        private void SetPage()
        {
            if (totalPages > pgNum)
            {
                AddHtml(431, 431, 100, 20, MC.ColorText(defaultTextColor, String.Format("Page {0}", (pgNum + 1))), false, false);
                AddButton(380, 430, 4005, 4007, -3, GumpButtonType.Reply, 0);
            }

            if (pgNum > 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}", (pgNum - 1))), false, false);
                AddButton(340, 430, 4014, 4016, -4, GumpButtonType.Reply, 0);
            }

            switch (pg)
            {
            case 1:
            {
                AddHtml(100, 100, 560, 330, MC.ColorText(defaultTextColor, "Select a configuration from the command window below."), false, false);

                break;
            }

            case 2:
            {
                AddHtml(100, 100, 560, 330, MC.ColorText(messagesTextColor, "<center>Misc Configuration</center>\nThis is where you can configure misc settings.\n\nGo to page 2 to continue."), false, false);

                break;
            }

            case 3:
            {
                AddHtml(141, 101, 300, 20, MC.ColorText(defaultTextColor, "Staff Can Trigger Events"), false, false);
                AddCheck(100, 100, 210, 211, staffTriggerEventSwitch, 1);

                break;
            }

            case 4:
            {
                string pageInfo = "<center>Timer Configuration</center>\nThis is where you can adjust the timer in which the Mega Spawner System uses for spawning.";
                pageInfo = String.Format("{0} You may choose to use the master timer or personal timer. There are many different options to choose from for timer settings.", pageInfo);
                pageInfo = String.Format("{0}\n<center>Information</center>\nMaster Timer:\nThe master timer is designed to run all of the Mega Spawners with one timer. This option may use a little bit more CPU usage than", pageInfo);
                pageInfo = String.Format("{0} the personal timer. You can select from many different delay settings.", pageInfo);
                pageInfo = String.Format("{0}\n\nPersonal Timer:\nThe personal timer is designed to have each Mega Spawner use their own timer for spawn control. This option may use a little more system memory than the master timer.", pageInfo);
                pageInfo = String.Format("{0} Like the master timer, you can select any of the delay options or choose your own.", pageInfo);
                pageInfo = String.Format("{0}\n\nDelay Settings:\nYou can choose from any of the delay settings by clicking on the slider anywhere from \"Consistency\" to \"Save On CPU Usage\". The higher the delay setting you choose, the", pageInfo);
                pageInfo = String.Format("{0} less CPU usage is used to control the Mega Spawners. However, the spawns will be less consistent and more likely to fall out of their minimum and maximum delay range.", pageInfo);
                pageInfo = String.Format("{0} You can specify your own delay by choosing the \"Use Specified Delay\" option. There is also another personal timer option which is called \"Use Personal Timer(Random Entry Delay)\". With this option,", pageInfo);
                pageInfo = String.Format("{0} the system will randomly choose one of the entries on each Mega Spawner to create a random delay based on their minimum and maximum delay range.", pageInfo);
                pageInfo = String.Format("{0}\n\n<center>Recommendations</center>\nFast CPU and lots of ram:\nMaster Timer with a delay of 1.\n\nFast CPU and medium amount of ram:\nMaster Timer with delay of 12.\n\n", pageInfo);
                pageInfo = String.Format("{0}Fast CPU and little amount of ram:\nMaster Timer with a delay of 40-48.\n\nMedium CPU and lots of ram:\nPersonal Timer with delay of 1-4.\n\n", pageInfo);
                pageInfo = String.Format("{0}Medium CPU and medium amount of ram:\nPersonal Timer with a delay of 16-20.\n\nMedium CPU and little amount of ram:\nPersonal Timer with delay of 40-48.\n\n", pageInfo);
                pageInfo = String.Format("{0}Slow CPU and lots of ram:\nPersonal Timer with a delay of 12-16.\n\nSlow CPU and medium amount of ram:\nPersonal Timer with delay of 40-48.\n\n", pageInfo);
                pageInfo = String.Format("{0}Slow CPU and little amount of ram:\nPersonal Timer with a delay of 60+.", pageInfo);
                pageInfo = String.Format("{0}\n\nThese recommendations can change at any time, as more benchmarking is done.", pageInfo);
                pageInfo = String.Format("{0}\n\nGo to page 2 to continue.", pageInfo);

                AddHtml(100, 100, 560, 330, MC.ColorText(messagesTextColor, pageInfo), false, true);

                break;
            }

            case 5:
            {
                AddHtml(101, 101, 300, 20, MC.ColorText(defaultTextColor, "Timer Setting:"), false, false);
                AddHtml(101, 121, 300, 20, MC.ColorText(defaultTextColor, "Consistency"), false, false);
                AddHtml(541, 121, 300, 20, MC.ColorText(defaultTextColor, "Save On CPU Usage"), false, false);

                AddImageTiled(100, 140, 560, 20, 2604);

                AddGroup(1);

                AddImage(119, 144, 9024);
                AddRadio(100, 140, 9020, 9021, MC.Delay == 1, 1);

                AddImage(160, 144, 9024);
                AddRadio(141, 140, 9020, 9021, MC.Delay == 2, 2);

                AddImage(201, 144, 9024);
                AddRadio(182, 140, 9020, 9021, MC.Delay == 4, 3);

                AddImage(243, 144, 9024);
                AddRadio(224, 140, 9020, 9021, MC.Delay == 8, 4);

                AddImage(284, 144, 9024);
                AddRadio(265, 140, 9020, 9021, MC.Delay == 12, 5);

                AddImage(325, 144, 9024);
                AddRadio(306, 140, 9020, 9021, MC.Delay == 16, 6);

                AddImage(367, 144, 9024);
                AddRadio(348, 140, 9020, 9021, MC.Delay == 20, 7);

                AddImage(408, 144, 9024);
                AddRadio(389, 140, 9020, 9021, MC.Delay == 24, 8);

                AddImage(449, 144, 9024);
                AddRadio(430, 140, 9020, 9021, MC.Delay == 28, 9);

                AddImage(491, 144, 9024);
                AddRadio(472, 140, 9020, 9021, MC.Delay == 32, 10);

                AddImage(532, 144, 9024);
                AddRadio(513, 140, 9020, 9021, MC.Delay == 36, 11);

                AddImage(573, 144, 9024);
                AddRadio(554, 140, 9020, 9021, MC.Delay == 40, 12);

                AddImage(615, 144, 9024);
                AddRadio(596, 140, 9020, 9021, MC.Delay == 44, 13);

                AddRadio(637, 140, 9020, 9021, MC.Delay == 48, 14);

                AddHtml(101, 181, 300, 20, MC.ColorText(defaultTextColor, "Timer Delay In Seconds:"), false, false);
                MC.DisplayBackground(this, ActiveTEBGTypeConfig, 300, 181, 60, 18);
                AddTextEntry(300, 181, 60, 15, ActiveTextEntryTextColor, 1, MC.Delay.ToString());

                AddHtml(430, 181, 300, 20, MC.ColorText(defaultTextColor, "Use Specified Delay"), false, false);
                AddRadio(389, 180, 210, 211, !TimerSettingType(MC.Delay), 15);

                AddGroup(2);

                AddHtml(141, 221, 300, 20, MC.ColorText(defaultTextColor, "Use Master Timer"), false, false);
                AddHtml(141, 241, 300, 20, MC.ColorText(defaultTextColor, "Use Personal Timer (Normal)"), false, false);

                AddHtml(141, 281, 300, 20, MC.ColorText(defaultTextColor, "Use Personal Timer (Random Entry Delay)"), false, false);

                AddRadio(100, 220, 210, 211, timerTypeSwitch == TimerType.Master, 16);
                AddRadio(100, 240, 210, 211, timerTypeSwitch == TimerType.Personal, 17);

                AddRadio(100, 280, 210, 211, timerTypeSwitch == TimerType.RandomEntryDelay, 18);

                break;
            }
            }
        }
Ejemplo n.º 25
0
        private void SetPage()
        {
            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);
            }

            switch (pg)
            {
            case 1:
            {
                string textColor = null;

                AddHtml(101, 101, 100, 20, MC.ColorText(defaultTextColor, "Account Name:"), false, false);
                MC.DisplayBackground(this, ActiveTEBGTypeConfig, 300, 101, 190, 18);
                AddTextEntry(300, 101, 190, 15, ActiveTextEntryTextColor, 1, accountName);

                AddHtml(101, 121, 100, 20, MC.ColorText(defaultTextColor, "Access Level:"), false, false);

                if (GetAccessLevel >= Access.HeadAdmin)
                {
                    textColor = flagTextColor;
                    AddImage(100, 140, 9026);
                }
                else
                {
                    textColor = defaultTextColor;
                    AddRadio(100, 140, 9026, 9027, accessSwitch == Access.HeadAdmin, 1);
                }

                AddHtml(141, 141, 100, 20, MC.ColorText(textColor, "Head Admin"), false, false);

                if (GetAccessLevel >= Access.Admin)
                {
                    textColor = flagTextColor;
                    AddImage(100, 160, 9026);
                }
                else
                {
                    textColor = defaultTextColor;
                    AddRadio(100, 160, 9026, 9027, accessSwitch == Access.Admin, 2);
                }

                AddHtml(141, 161, 100, 20, MC.ColorText(textColor, "Admin"), false, false);

                AddHtml(141, 181, 100, 20, MC.ColorText(defaultTextColor, "User"), false, false);
                AddRadio(100, 180, 9026, 9027, accessSwitch == Access.User, 3);

                AddHtml(141, 201, 100, 20, MC.ColorText(defaultTextColor, "None"), false, false);
                AddRadio(100, 200, 9026, 9027, accessSwitch == Access.None, 4);

                AddHtml(101, 241, 160, 20, MC.ColorText(defaultTextColor, "Admin Menu Access:"), false, false);

                for (int i = 0; i < MenuAccessList.Count; i++)
                {
                    bool access = (bool)MenuAccessList[i];

                    if (i == 0 && !access)
                    {
                        textColor = flagTextColor;
                        AddImage(100, 260, 9026);
                    }
                    else if (i == 0)
                    {
                        textColor = defaultTextColor;
                        AddCheck(100, 260, 9026, 9027, accountsMgmtSwitch, 5);
                    }

                    if (i == 0)
                    {
                        AddHtml(141, 261, 160, 20, MC.ColorText(textColor, "Accounts Management"), false, false);
                    }

                    if (i == 1 && !access)
                    {
                        textColor = flagTextColor;
                        AddImage(100, 280, 9026);
                    }
                    else if (i == 1)
                    {
                        textColor = defaultTextColor;
                        AddCheck(100, 280, 9026, 9027, systemConfigSwitch, 6);
                    }

                    if (i == 1)
                    {
                        AddHtml(141, 281, 160, 20, MC.ColorText(textColor, "System Configuration"), false, false);
                    }
                }

                break;
            }
            }
        }
Ejemplo n.º 26
0
        public EditAccountGump(Mobile mobile, ArrayList argsList) : base(0, 0)
        {
            gumpMobile = mobile;

            ArgsList = argsList;
            GetArgsList();

            GetTextColors();

            AddPage(0);             // Page 0

            MC.DisplayStyle(this, StyleTypeConfig, 80, 80, 600, 452);

            MC.DisplayBackground(this, BackgroundTypeConfig, 100, 450, 249, 19);
            MC.DisplayBackground(this, BackgroundTypeConfig, 350, 450, 279, 19);
            MC.DisplayBackground(this, BackgroundTypeConfig, 630, 450, 30, 19);
            MC.DisplayBackground(this, BackgroundTypeConfig, 100, 470, 249, 19);
            MC.DisplayBackground(this, BackgroundTypeConfig, 350, 470, 279, 19);
            MC.DisplayBackground(this, BackgroundTypeConfig, 630, 470, 30, 19);
            MC.DisplayBackground(this, BackgroundTypeConfig, 100, 490, 249, 20);
            MC.DisplayBackground(this, BackgroundTypeConfig, 350, 490, 279, 20);
            MC.DisplayBackground(this, BackgroundTypeConfig, 630, 490, 30, 20);
            MC.DisplayBackground(this, BackgroundTypeConfig, 100, 100, 560, 330);

            MC.DisplayImage(this, StyleTypeConfig);

            AddButton(630, 490, 4017, 4019, 0, GumpButtonType.Reply, 0);

            if (AddAccount)
            {
                AddHtml(121, 81, 540, 20, MC.ColorText(titleTextColor, "Add Account"), false, false);
            }
            else
            {
                AddHtml(121, 81, 540, 20, MC.ColorText(titleTextColor, String.Format("Editting Account: \"{0}\"", accountName)), false, false);
            }

            if (!Help)
            {
                AddButton(597, 429, 2033, 2032, -5, GumpButtonType.Reply, 0);
            }
            else
            {
                AddButton(597, 429, 2032, 2033, -5, GumpButtonType.Reply, 0);
            }

            if (DisplayMessages)
            {
                MC.DisplayStyle(this, StyleTypeConfig, 80, 540, 600, 122);
                MC.DisplayBackground(this, BackgroundTypeConfig, 100, 560, 560, 80);

                AddHtml(121, 541, 540, 20, MC.ColorText(titleTextColor, MessagesTitle), false, false);
                AddHtml(100, 560, 560, 80, MC.ColorText(messagesTextColor, Messages), false, true);
                AddHtml(531, 641, 100, 20, MC.ColorText(defaultTextColor, "Clear Messages"), false, false);

                AddButton(630, 640, 4017, 4019, -6, GumpButtonType.Reply, 0);
                AddButton(371, 645, 2436, 2435, -8, GumpButtonType.Reply, 0);
            }
            else
            {
                MC.DisplayStyle(this, StyleTypeConfig, 80, 530, 600, 20);

                AddButton(371, 535, 2438, 2437, -8, GumpButtonType.Reply, 0);
            }

            OldMessagesTitle = MessagesTitle;
            OldMessages      = Messages;

            AddHtml(151, 431, 60, 20, MC.ColorText(defaultTextColor, "Refresh"), false, false);
            AddButton(120, 433, 2118, 2117, -7, GumpButtonType.Reply, 0);

            MenuAccessList = MC.GetMenuAccess(gumpMobile);

            AddPages();
        }
Ejemplo n.º 27
0
        public AddItemsToContainerGump(Mobile mobile, ArrayList argsList) : base(0, 0)
        {
            gumpMobile = mobile;

            ArgsList = argsList;
            GetArgsList();

            GetTextColors();

            AddPage(0);             // Page 0

            MC.DisplayStyle(this, StyleTypeConfig, 80, 80, 600, 452);

            MC.DisplayBackground(this, BackgroundTypeConfig, 100, 450, 249, 19);
            MC.DisplayBackground(this, BackgroundTypeConfig, 350, 450, 279, 19);
            MC.DisplayBackground(this, BackgroundTypeConfig, 630, 450, 30, 19);
            MC.DisplayBackground(this, BackgroundTypeConfig, 100, 470, 249, 19);
            MC.DisplayBackground(this, BackgroundTypeConfig, 350, 470, 279, 19);
            MC.DisplayBackground(this, BackgroundTypeConfig, 630, 470, 30, 19);
            MC.DisplayBackground(this, BackgroundTypeConfig, 100, 490, 249, 20);
            MC.DisplayBackground(this, BackgroundTypeConfig, 350, 490, 279, 20);
            MC.DisplayBackground(this, BackgroundTypeConfig, 630, 490, 30, 20);

            MC.DisplayImage(this, StyleTypeConfig);

            AddButton(630, 490, 4017, 4019, 0, GumpButtonType.Reply, 0);

            AddHtml(121, 81, 560, 20, MC.ColorText(titleTextColor, String.Format("Add {0} Item{1} To \"{2}\"", InsideItemList.Count, InsideItemList.Count == 1 ? "" : "s", addItem)), false, false);

            if (!Help)
            {
                AddButton(597, 429, 2033, 2032, -5, GumpButtonType.Reply, 0);
            }
            else
            {
                AddButton(597, 429, 2032, 2033, -5, GumpButtonType.Reply, 0);
            }

            if (DisplayMessages)
            {
                MC.DisplayStyle(this, StyleTypeConfig, 80, 540, 600, 122);
                MC.DisplayBackground(this, BackgroundTypeConfig, 100, 560, 560, 80);

                AddHtml(121, 541, 540, 20, MC.ColorText(titleTextColor, MessagesTitle), false, false);
                AddHtml(100, 560, 560, 80, MC.ColorText(messagesTextColor, Messages), false, true);
                AddHtml(531, 641, 100, 20, MC.ColorText(defaultTextColor, "Clear Messages"), false, false);

                AddButton(630, 640, 4017, 4019, -6, GumpButtonType.Reply, 0);
                AddButton(371, 645, 2436, 2435, -8, GumpButtonType.Reply, 0);
            }
            else
            {
                MC.DisplayStyle(this, StyleTypeConfig, 80, 530, 600, 20);

                AddButton(371, 535, 2438, 2437, -8, GumpButtonType.Reply, 0);
            }

            OldMessagesTitle = MessagesTitle;
            OldMessages      = Messages;

            AddHtml(151, 431, 60, 20, MC.ColorText(defaultTextColor, "Refresh"), false, false);
            AddButton(120, 433, 2118, 2117, -7, GumpButtonType.Reply, 0);

            GetOffsets();
            SetAITCCheckBoxes();

            AddPages();
        }
Ejemplo n.º 28
0
        public SearchEntryGump(Mobile mobile, ArrayList argsList) : base(0, 0)
        {
            gumpMobile = mobile;

            ArgsList = argsList;
            GetArgsList();

            GetTextColors();

            AddPage(0);             // Page 0

            MC.DisplayStyle(this, StyleTypeConfig, 80, 80, 600, 452);

            MC.DisplayBackground(this, BackgroundTypeConfig, 100, 450, 249, 19);
            MC.DisplayBackground(this, BackgroundTypeConfig, 350, 450, 279, 19);
            MC.DisplayBackground(this, BackgroundTypeConfig, 630, 450, 30, 19);
            MC.DisplayBackground(this, BackgroundTypeConfig, 100, 470, 249, 19);
            MC.DisplayBackground(this, BackgroundTypeConfig, 350, 470, 279, 19);
            MC.DisplayBackground(this, BackgroundTypeConfig, 630, 470, 30, 19);
            MC.DisplayBackground(this, BackgroundTypeConfig, 100, 490, 249, 20);
            MC.DisplayBackground(this, BackgroundTypeConfig, 350, 490, 279, 20);
            MC.DisplayBackground(this, BackgroundTypeConfig, 630, 490, 30, 20);

            MC.DisplayImage(this, StyleTypeConfig);

            AddButton(630, 490, 4017, 4019, 0, GumpButtonType.Reply, 0);

            string searchtype = "";

            switch (searchType)
            {
            case SearchType.MobileType: { searchtype = " Mobile"; break; }

            case SearchType.ItemType: { searchtype = " Item"; break; }
            }

            if (SearchFor == "")
            {
                AddHtml(121, 81, 560, 20, MC.ColorText(titleTextColor, String.Format("Entire Listing Of Valid{0} Types", searchtype)), false, false);
            }
            else
            {
                AddHtml(121, 81, 560, 20, MC.ColorText(titleTextColor, String.Format("Search Results For \"{0}\"", SearchFor)), false, false);
            }

            if (!Help)
            {
                AddButton(597, 429, 2033, 2032, -5, GumpButtonType.Reply, 0);
            }
            else
            {
                AddButton(597, 429, 2032, 2033, -5, GumpButtonType.Reply, 0);
            }

            if (DisplayMessages)
            {
                MC.DisplayStyle(this, StyleTypeConfig, 80, 540, 600, 122);
                MC.DisplayBackground(this, BackgroundTypeConfig, 100, 560, 560, 80);

                AddHtml(121, 541, 540, 20, MC.ColorText(titleTextColor, MessagesTitle), false, false);
                AddHtml(100, 560, 560, 80, MC.ColorText(messagesTextColor, Messages), false, true);
                AddHtml(531, 641, 100, 20, MC.ColorText(defaultTextColor, "Clear Messages"), false, false);

                AddButton(630, 640, 4017, 4019, -6, GumpButtonType.Reply, 0);
                AddButton(371, 645, 2436, 2435, -8, GumpButtonType.Reply, 0);
            }
            else
            {
                MC.DisplayStyle(this, StyleTypeConfig, 80, 530, 600, 20);

                AddButton(371, 535, 2438, 2437, -8, GumpButtonType.Reply, 0);
            }

            OldMessagesTitle = MessagesTitle;
            OldMessages      = Messages;

            AddHtml(151, 431, 60, 20, MC.ColorText(defaultTextColor, "Refresh"), false, false);
            AddButton(120, 433, 2118, 2117, -7, GumpButtonType.Reply, 0);

            SearchResultsList = GetSearchResults();

            AddPages();
        }
Ejemplo n.º 29
0
        private void SetPage()
        {
            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);
            }

            switch (pg)
            {
            case 1:
            {
                AddHtml(101, 101, 100, 20, MC.ColorText(defaultTextColor, "Search:"), false, false);
                MC.DisplayBackground(this, ActiveTEBGTypeConfig, 200, 101, 320, 18);
                AddTextEntry(200, 101, 320, 15, ActiveTextEntryTextColor, 1, sortSearchFor);

                AddHtml(101, 141, 300, 20, MC.ColorText(defaultTextColor, "Search Terms:"), false, false);

                AddHtml(141, 161, 300, 20, MC.ColorText(defaultTextColor, "None"), false, false);
                AddRadio(100, 160, 9026, 9027, sortSearchType == SortSearchType.None, 1);

                AddHtml(141, 181, 300, 20, MC.ColorText(defaultTextColor, "Spawner Name"), false, false);
                AddRadio(100, 180, 9026, 9027, sortSearchType == SortSearchType.Name, 2);

                AddHtml(141, 201, 300, 20, MC.ColorText(defaultTextColor, "Facet"), false, false);
                AddRadio(100, 200, 9026, 9027, sortSearchType == SortSearchType.Facet, 3);

                AddHtml(141, 221, 300, 20, MC.ColorText(defaultTextColor, "Location"), false, false);
                AddRadio(100, 220, 9026, 9027, sortSearchType == SortSearchType.Location, 4);

                AddHtml(141, 241, 300, 20, MC.ColorText(defaultTextColor, "Location X-axis"), false, false);
                AddRadio(100, 240, 9026, 9027, sortSearchType == SortSearchType.LocationX, 5);

                AddHtml(141, 261, 300, 20, MC.ColorText(defaultTextColor, "Location Y-axis"), false, false);
                AddRadio(100, 260, 9026, 9027, sortSearchType == SortSearchType.LocationY, 6);

                AddHtml(141, 281, 300, 20, MC.ColorText(defaultTextColor, "Location Z-axis"), false, false);
                AddRadio(100, 280, 9026, 9027, sortSearchType == SortSearchType.LocationZ, 7);

                AddHtml(141, 301, 300, 20, MC.ColorText(defaultTextColor, "Entry Name"), false, false);
                AddRadio(100, 300, 9026, 9027, sortSearchType == SortSearchType.EntryName, 8);

                AddHtml(401, 141, 300, 20, MC.ColorText(defaultTextColor, "Search Options:"), false, false);

                AddHtml(441, 161, 300, 20, MC.ColorText(defaultTextColor, "Case Sensitive"), false, false);
                AddCheck(400, 160, 9026, 9027, sortSearchCaseSensitive, 9);

                AddHtml(441, 181, 300, 20, MC.ColorText(defaultTextColor, "Flagged Spawners"), false, false);
                AddCheck(400, 180, 9026, 9027, sortSearchFlagged, 10);

                AddHtml(441, 201, 300, 20, MC.ColorText(defaultTextColor, "Spawners In Bad Location"), false, false);
                AddCheck(400, 200, 9026, 9027, sortSearchBadLocation, 11);

                AddHtml(441, 221, 300, 20, MC.ColorText(defaultTextColor, "Duped Spawners"), false, false);
                AddCheck(400, 220, 9026, 9027, sortSearchDupeSpawners, 12);

                break;
            }

            case 2:
            {
                AddGroup(1);

                AddHtml(101, 101, 300, 20, MC.ColorText(defaultTextColor, "Sort Terms:"), false, false);

                AddHtml(141, 121, 300, 20, MC.ColorText(defaultTextColor, "None"), false, false);
                AddRadio(100, 120, 9026, 9027, sortType == SortSearchType.None, 1);

                AddHtml(141, 141, 300, 20, MC.ColorText(defaultTextColor, "Spawner Name"), false, false);
                AddRadio(100, 140, 9026, 9027, sortType == SortSearchType.Name, 2);

                AddHtml(141, 161, 300, 20, MC.ColorText(defaultTextColor, "Facet"), false, false);
                AddRadio(100, 160, 9026, 9027, sortType == SortSearchType.Facet, 3);

                AddHtml(141, 181, 300, 20, MC.ColorText(defaultTextColor, "Location"), false, false);
                AddRadio(100, 180, 9026, 9027, sortType == SortSearchType.Location, 4);

                AddHtml(141, 201, 300, 20, MC.ColorText(defaultTextColor, "Location X-axis"), false, false);
                AddRadio(100, 200, 9026, 9027, sortType == SortSearchType.LocationX, 5);

                AddHtml(141, 221, 300, 20, MC.ColorText(defaultTextColor, "Location Y-axis"), false, false);
                AddRadio(100, 220, 9026, 9027, sortType == SortSearchType.LocationY, 6);

                AddHtml(141, 241, 300, 20, MC.ColorText(defaultTextColor, "Location Z-axis"), false, false);
                AddRadio(100, 240, 9026, 9027, sortType == SortSearchType.LocationZ, 7);

                AddGroup(2);

                AddHtml(101, 281, 300, 20, MC.ColorText(defaultTextColor, "Sort Order:"), false, false);

                AddHtml(141, 301, 300, 20, MC.ColorText(defaultTextColor, "Ascending"), false, false);
                AddRadio(100, 300, 9026, 9027, sortOrder == SortOrder.Ascending, 8);

                AddHtml(141, 321, 300, 20, MC.ColorText(defaultTextColor, "Descending"), false, false);
                AddRadio(100, 320, 9026, 9027, sortOrder == SortOrder.Descending, 9);

                break;
            }
            }
        }
Ejemplo n.º 30
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, 338, 20);
                MC.DisplayBackground(this, BackgroundTypeConfig, 440, listY, 200, 20);

                string accountName = (string)MC.AccountsList[i];
                string textColor   = defaultTextColor;

                if (MC.AccountNotExist(accountName) || MC.AccountBanned(accountName))
                {
                    textColor = flagTextColor;
                }

                AddButton(100, listY, 9904, 9905, i + numOffset, GumpButtonType.Reply, 0);
                AddHtml(141, listY + 1, 520, 20, MC.ColorText(textColor, accountName), false, false);

                string AccessLevel = null;
                Access accessLevel = (Access)MC.AccessList[i];

                switch (accessLevel)
                {
                case Access.MasterAdmin: { AccessLevel = "Master Admin"; break; }

                case Access.HeadAdmin: { AccessLevel = "Head Admin"; break; }

                case Access.Admin: { AccessLevel = "Admin"; break; }

                case Access.User: { AccessLevel = "User"; break; }

                case Access.None: { AccessLevel = "None"; break; }
                }

                AddHtml(441, listY + 1, 200, 20, MC.ColorText(textColor, String.Format("<center>{0}</center>", AccessLevel)), false, false);

                if (i > 1)
                {
                    AddCheck(640, listY, 210, 211, (bool)AMGCheckBoxesList[i], i);
                }
                else
                {
                    AddImage(640, listY, 210);
                }

                listY     += 21;
                spaceLeft -= 21;
            }

            MC.DisplayBackground(this, BackgroundTypeConfig, 100, listY, 560, spaceLeft);
        }