Пример #1
0
		protected override void CompileLayout(SuperGumpLayout layout)
		{
            layout.Add("body", () =>
            {
                AddBackground(0, 0, 275, 263, 5170);
                AddImage(24, 29, 23001);
                AddLabel(89, 43, 1271, "UO Forever Skill Scroll");
                AddLabel(24, 88, 0, "This scroll entitles the bearer or one");
                AddLabel(24, 108, 0, "of their pets to:");

                AddImageTiled(74, 151, 120, 2, 2620);
                AddLabel(75, 134, 1258, _SkillScroll.SkillName + ": +" + _SkillScroll.SkillBonus);
                AddItem(37, 134, _SkillScroll.ItemID, _SkillScroll.Hue);

                AddLabel(35, 164, 0, "Who do you wish to use this on?");

                AddLabel(47, 189, 1258, "Yourself?");
                AddButton(58, 211, 4023, 4025, b =>
                {
                    _SkillScroll.ApplySkilltoPlayer(User);
                });

                AddLabel(184, 189, 1258, "A pet?");
                AddButton(188, 211, 4023, 4025, b =>
                {
                    User.Target = new MobileSelectTarget<Mobile>((m, t) => _SkillScroll.GetPet(m, t), m => { });
                });
            });

		}
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            layout.Add(
                "background",
                () =>
                {
                    AddImageTiled(40, 80, 44, 458, 202);
                    AddImage(40, 39, 206);
                    AddImageTiled(80, 38, 422, 45, 201);
                    AddImage(40, 538, 204);
                    AddImageTiled(495, 71, 44, 469, 203);
                    AddImage(496, 39, 207);
                    AddImageTiled(84, 539, 417, 43, 233);
                    AddImageTiled(75, 82, 446, 459, 200);
                    AddImage(171, 16, 1419);
                    AddImage(248, -1, 1417);
                    AddImage(257, 8, 5545);
                    AddImage(496, 538, 205);
                });
            layout.Add("Help",
                () =>
                {
                    AddImageTiled(81, 92, 420, 12, 50);
                    AddHtml(126, 74, 325, 17,
                        String.Format("<BIG>{0}</BIG>", "Ultima Online: Forever Information System")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddImageTiled(81, 104, 404, 413, 2624);
                    AddHtml(86, 103, 414, 413, HTML, false, true);

                    AddImageTiled(81, 518, 420, 12, 50);
                });
        }
Пример #3
0
 protected override void CompileLayout(SuperGumpLayout layout)
 {
     AddBackground(685, 527, 122, 53, 9200);
     AddAlphaRegion(690, 534, 111, 39);
     AddLabel(695, 533, 137, @"Champion Score:");
     AddLabel(695, 552, 1258, _Score.ToString());
 }
 protected override void CompileLayout(SuperGumpLayout layout)
 {
     layout.Add(
         "background/main/",
         () =>
         {
             AddBackground(0, 0, 384, 443, 9200);
             AddItem(296, 22, 18491);
             AddItem(296, 65, 18494);
             AddItem(296, 108, 18497);
             AddItem(296, 151, 18515);
             AddLabel(145, 231, 1258, @"The Soulforge");
             AddHtml(5, 251, 372, 190, @"With your skilled eyes, you quickly recognize the runes on the base of the ancient hammer as relating to legends about the Soulforge.  On your journey to hone your crafting skills, you have encountered various books dedicated to discussing this legend.  While most think it a fairy tale, this anicent smithing hammer tells you there may be some credince to the legend after all.  You decide that it may be best to seek out one familiar with the legend of the Soulforge for further guidance.  A good place to start would be the Britain Library.  Perhaps Llewellyn, the Royal Archivist, could be of some assistance.".WrapUOHtmlTag("BIG"), true, true);
             AddItem(296, 194, 18518);
             AddItem(118, 64, 17003);
             AddItem(186, 20, 16996);
             AddItem(140, 20, 16999);
             AddItem(211, 64, 16997);
             AddItem(163, 8, 16995);
             AddItem(164, 32, 17000);
             AddItem(187, 74, 17001);
             AddItem(96, 65, 17007);
             AddItem(141, 74, 17004);
             AddItem(233, 65, 16998);
             AddItem(164, 97, 17005);
             AddItem(210, 72, 17002);
             AddItem(187, 115, 17006);
             AddItem(118, 72, 17008);
             AddItem(141, 116, 17009);
             AddItem(164, 121, 17010);
             AddButton(353, 8, 4017, 4020, OnCancel);
         });
 }
Пример #5
0
		protected override void CompileLayout(SuperGumpLayout layout)
		{
			base.CompileLayout(layout);

			layout.Add(
				"textentry/body/question",
				() => AddLabelCropped(25, Height - 45, Width - 80, 20, HighlightHue, "Accept or Decline?"));
		}
Пример #6
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            base.CompileLayout(layout);

            layout.Remove("html/body/info");

            layout.Remove("background/body/base");
            layout.Remove("background/header/base");

            layout.Remove("label/header/title");

            layout.Add("background/body/base1", () => AddBackground(28, 0, Width, 150, 9270));

            layout.AddReplace("image/body/icon", () => AddImage(42, 47, Icon));

            layout.Add("image/body/doodad", () => AddImage(0, 6, 1227));

            layout.Add("image/body/waxseal", () => AddImage(57, 123, 9005));

            layout.Add(
                "label/body/content",
                () =>
                {
                    AddLabel(116, 54, 2049, "Would you like to join the queue");
                    AddLabel(116, 75, 2049, "for this battle?");
                });

            layout.Add("background/header/base1", () => AddBackground(28, 0, Width, 40, 9270));

            layout.Add("label/header/title1", () => AddLabel(44, 10, 52, Title));

            layout.AddReplace(
                "button/header/cancel",
                () =>
                {
                    AddButton(295, 6, 2640, 2641, OnCancel);
                    AddTooltip(1006045);
                });

            layout.AddReplace(
                "button/body/cancel",
                () =>
                {
                    AddButton(250, 108, 2119, 2120, OnCancel);
                    AddTooltip(1006045);
                });

            layout.AddReplace(
                "button/body/accept",
                () =>
                {
                    AddButton(176, 108, 2128, 2129, OnAccept);
                    AddTooltip(1006044);
                });
        }
Пример #7
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            layout.Add(
                "Main",
                () =>
                {
                    AddBackground(0, 0, 418, 56, 5120);
                    AddBackground(37, 28, 350, 22, 9350);

                    AddHtml(9, 6, 408, 22, string.Format("<BIG><CENTER>{0}</CENTER></BIG>", "View This Hand on Ultima Online: Forever Legends").WrapUOHtmlColor(Color.Gold), false, false);
                    AddHtml(44, 29, 336, 22, string.Format("<CENTER><BIG><A HREF=\"{0}{1}\">{0}{1}</A></BIG></CENTER>", "legends.uoforever.com/pokerhands/".WrapUOHtmlColor(Color.Gold), HandId), false, false);
                });
        }
 protected override void CompileLayout(SuperGumpLayout layout)
 {
     layout.Add(
         "background/main/",
         () =>
         {
             AddBackground(5, 2, 203, 70, 9200);
             AddItem(9, 23, 18491);
             AddItem(41, 25, 18494);
             AddItem(81, 28, 18497);
             AddItem(118, 31, 18515);
             AddItem(155, 28, 18518);
         });
 }
Пример #9
0
		public override void CompileLayout(UOFCentralGump g, SuperGumpLayout layout)
		{
			base.CompileLayout(g, layout);

			if (g == null || layout == null)
			{
				return;
			}

			if (g.Edit)
			{
				layout.Add(
					"page/text",
					() =>
					{
						g.AddImageTiled(120, 160, 410, 200, 2624);
						g.AddButton(
							120,
							160,
							2640,
							2641,
							b =>
							{
								Text = String.Empty;
								g.Refresh(true);
							});
						g.AddTooltip(ButtonIconInfo.GetTooltip(ButtonIcon.Clear));
						g.AddImageTiled(150, 153, 385, 2, 30072);

						if (Background)
						{
							g.AddBackground(150, 160, 380, 200, 9350);
						}

						g.AddTextEntry(155, 165, 370, 190, g.TextHue, Text, (e, t) => Text = t);
					});
			}
			else
			{
				layout.Add(
					"page/text",
					() =>
					{
						string text = Text.ParseBBCode(TextColor.ToColor()).WrapUOHtmlColor(TextColor, false);

						g.AddImageTiled(120, 160, 410, 200, 2624);
						g.AddHtml(125, 165, 400, 190, text, Background, Scrollbar);
					});
			}
		}
Пример #10
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            layout.Add(
                "background/main/",
                () =>
                {
                    AddImageTiled(50, 20, 400, 400, 2624);
                    AddAlphaRegion(50, 20, 400, 400);

                    AddImage(90, 33, 9005);
                    AddHtml(130, 45, 270, 20, Title.WrapUOHtmlColor(Color.White).WrapUOHtmlTag("BIG"), false, false);
                        // Quest Offer
                    AddImageTiled(130, 65, 175, 1, 9101);

                    AddImage(140, 110, 1209);
                    AddHtml(160, 108, 250, 20, Title.WrapUOHtmlColor(Color.Orange).WrapUOHtmlTag("BIG"),
                        false, false);

                    AddHtml(98, 140, 312, 200, HTML.WrapUOHtmlTag("BIG"), false, true);

                    AddButton(85, 355, 247, 248, OnAccept);
                    AddHtml(157, 356, 280, 20, "I accept!".WrapUOHtmlColor(Color.White), false, false); // I accept!

                    AddButton(85, 385, 241, 243, OnCancel);
                    AddHtml(157, 387, 280, 20, "No thanks, I decline.".WrapUOHtmlColor(Color.White), false, false);
                        // No thanks, I decline.

                    AddImageTiled(50, 29, 30, 390, 10460);
                    AddImageTiled(34, 140, 17, 279, 9263);

                    AddImage(48, 135, 10411);
                    AddImage(-16, 285, 10402);
                    AddImage(0, 10, 10421);
                    AddImage(25, 0, 10420);

                    AddImageTiled(83, 15, 350, 15, 10250);

                    AddImage(34, 419, 10306);
                    AddImage(442, 419, 10304);
                    AddImageTiled(51, 419, 392, 17, 10101);

                    AddImageTiled(415, 29, 44, 390, 2605);
                    AddImageTiled(415, 29, 30, 390, 10460);
                    AddImage(425, 0, 10441);

                    AddImage(370, 50, 1417);
                    AddImage(379, 60, 0x15B5);
                });
        }
Пример #11
0
		protected override void CompileLayout(SuperGumpLayout layout)
		{
			base.CompileLayout(layout);

			layout.Add(
				"everything",
				() =>
				{
					AddImage(628, 14, 10410);
					AddBackground(27, 83, 633, 129, 9200);
					AddAlphaRegion(50, 89, 584, 118);
					AddImageTiled(27, 85, 21, 126, 10464);
					AddImageTiled(636, 85, 21, 126, 10464);
					AddImage(313, 44, 9000);
					AddLabel(60, 92, 1258, @"Ultima Online Forever Action Camera");

					AddLabel(409, 92, 2049, "Current Location:");

					AddLabelCropped(526, 92, 110, 16, 1258, String.IsNullOrWhiteSpace(User.Region.Name) ? "Unknown" : User.Region.Name);

					AddLabel(230, 149, 2049, @"TOTAL KILLS: ");
					AddLabel(335, 149, 137, ActionCams.CurrentDeathCount.ToString("#,0"));

					AddImageTiled(58, 111, 225, 1, 5410);

					AddLabel(62, 165, 2049, @"Total Player Murders: ");
					AddLabel(212, 165, 137, ActionCams.CurrentPlayerMurders.ToString("#,0"));

					AddLabel(62, 188, 2049, @"Top Murderer: ");

					if (ActionCams.TopPlayerMurderer != null)
					{
						AddLabel(155, 188, 137, ActionCams.TopPlayerMurderer.RawName);
					}

					AddLabel(409, 165, 2049, @"Total Monster Murders: ");
					AddLabel(573, 165, 137, ActionCams.CurrentMonsterMurders.ToString("#,0"));

					AddLabel(411, 188, 2049, @"Most Lethal Monster: ");

					if (ActionCams.TopMonsterMurderer != null)
					{
						AddLabelCropped(547, 188, 90, 16, 137, ActionCams.TopMonsterMurderer.RawName);
					}

					AddImage(627, 154, 10412);
				});
		}
		protected virtual void CompileNumericEntries(
			SuperGumpLayout layout,
			int width,
			int height,
			int lineHeight,
			int lineWidth,
			int halfHeight,
			int halfWidth,
			int eachWidth)
		{
			for (int idx = 0; idx < Numerics.Length; idx++)
			{
				CompileNumericEntry(
					layout, lineHeight, lineWidth, halfHeight, halfWidth, idx, Numerics[idx], 10 + (eachWidth * idx), 10);
			}
		}
Пример #13
0
		protected override void CompileLayout(SuperGumpLayout layout)
		{
			base.CompileLayout(layout);

			int lineHeight = (NumericHeight / 16),
				lineWidth = (NumericWidth / 9),
				halfHeight = (NumericHeight / 2),
				halfWidth = (NumericWidth / 2),
				eachWidth = (NumericWidth + halfWidth),
				width = 20 + (eachWidth * Numerics.Length),
				height = 20 + NumericHeight;

			layout.Add("background/body/base", () => AddBackground(0, 0, width, height, 9270));

			CompileNumericEntries(layout, width, height, lineHeight, lineWidth, halfHeight, halfWidth, eachWidth);
		}
Пример #14
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            layout.Add(
                "background/main/",
                () =>
                {
                    AddBackground(0, 0, 384, 492, 9200);
                    AddItem(296, 22, 18491);
                    AddItem(296, 65, 18494);
                    AddItem(296, 108, 18497);
                    AddItem(296, 151, 18515);
                    AddLabel(145, 231, 1258, @"The Soulforge");
                    AddHtml(5, 251, 372, 190,
                        @"With your notepad from Llewellyn in hand, you are able to make out the meaning of the runes at the base of the hammer. The runes state that you are to ground 20 dragonbone shards and mix it into the base materials of the Soulforge.

You are then to take two intact dragon hearts and place them at the center of the forge.

The next step states that you must place both the soul of the Harrower and the soul of the Devourer into the forge.

To complete the arcane construction of the Soulforge, you must throw the heart of Rikktor, the dragon-king, into the forge. But do so at a distance!

If all goes as planned, Rikktor's heart should act as a catalyst and cause the dragon hearts to ignite. The immense heat radiating from the dragon hearts should cause the Harrower's soul to begin slowly emitting some of its dreadful power. The Devourer's soul will soften the raw, untamed power and make it a malleable force to work with when crafting relics in your Soulforge."
                        .WrapUOHtmlTag("BIG"), true, true);
                    AddItem(296, 194, 18518);
                    AddItem(118, 64, 17003);
                    AddItem(186, 20, 16996);
                    AddItem(140, 20, 16999);
                    AddItem(211, 64, 16997);
                    AddItem(163, 8, 16995);
                    AddItem(164, 32, 17000);
                    AddItem(187, 74, 17001);
                    AddItem(96, 65, 17007);
                    AddItem(141, 74, 17004);
                    AddItem(233, 65, 16998);
                    AddItem(164, 97, 17005);
                    AddItem(210, 72, 17002);
                    AddItem(187, 115, 17006);
                    AddItem(118, 72, 17008);
                    AddItem(141, 116, 17009);
                    AddItem(164, 121, 17010);
                    AddLabel(16, 456, 1258, "Craft the Soulforge?");
                    AddButton(235, 455, 247, 248, OnAccept);
                    AddButton(316, 455, 241, 243, OnCancel);
                    AddButton(353, 8, 4017, 4020, OnCancel);
                });
        }
Пример #15
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            layout.Add(
                "background/main/",
                () =>
                {
                    AddBackground(0, 0, 374, 256, 9380);
                });
            layout.Add(
                "HTML/main/",
                () =>
                {
                    AddHtml(30, 43, 319, 250, String.Format(_Html)
						  .WrapUOHtmlTag("BIG")
						  .WrapUOHtmlColor(Color.DarkRed, false), false, false);
                });
        }
Пример #16
0
		protected override void CompileLayout(SuperGumpLayout layout)
		{
			base.CompileLayout(layout);

			if(Minimized)
			{
				return;
			}

			layout.AddReplace(
				"background/body/base",
				() =>
				{
					AddBackground(0, 55, 420, 210, 9270);
					AddImageTiled(10, 65, 400, 190, 2624);
				});
		}
Пример #17
0
		protected override void CompileLayout(SuperGumpLayout layout)
		{
			base.CompileLayout(layout);

			Width = 275;
			Height = 250;

            //Adds are not displaying properly unless they come before removes
            layout.Add("label/body/title", () => AddLabel(25, 75, 0, Title));

            if (_Value is Title)
            {
                CompileTitleLayout(layout, (Title)_Value);
            }
            else if (_Value is TitleHue)
            {
                CompileHueLayout(layout, (TitleHue)_Value);
            }

			layout.Remove("background/header/base");
			layout.Remove("html/body/info");
			layout.Remove("label/header/title");


			layout.AddReplace("background/body/base", () => AddBackground(0, 50, Width, Height, 5170));

			layout.AddReplace("image/body/icon", () => AddImage(20, 100, Icon));

			layout.AddReplace(
				"button/body/cancel",
				() =>
				{
					AddButton(Width - 90, Height - 10, 4018, 4019, OnCancel);
					AddTooltip(1006045);
				});

			layout.AddReplace(
				"button/body/accept",
				() =>
				{
					AddButton(Width - 50, Height - 10, 4015, 4016, OnAccept);
					AddTooltip(1006044);
				});
		}
Пример #18
0
		protected override void CompileLayout(SuperGumpLayout layout)
		{
			base.CompileLayout(layout);

			layout.Add("background/body/input", () => AddBackground(20, Height - 50, Width - 120, 30, 9350));

			layout.Add(
				"textentry/body/input",
				() =>
				{
					if (Limited)
					{
						AddTextEntryLimited(25, Height - 45, Width - 130, 20, TextHue, InputText, Limit, ParseInput);
					}
					else
					{
						AddTextEntry(25, Height - 45, Width - 130, 20, TextHue, InputText, ParseInput);
					}
				});
		}
Пример #19
0
		protected override void CompileLayout(SuperGumpLayout layout)
		{
			if (!m_displayErrorMessage)
			{
				AddBackground(10, 11, 264, 99, 9300); //Background
			}
			else
			{
				AddBackground(10, 11, 264, 121, 9300); //Background
				this.AddHtmlLabel(28, 103, FontHandling.FontSize.Medium, false, false, false, "#FF0000", "Invalid Name!");
			}

			AddImageTiled(27, 45, 230, 1, 2621); //Top Line
			AddImageTiled(24, 74, 230, 1, 2621); //Bottom Line
			AddLabel(116, 18, 47, @"Save As..."); //Save as heading Label
			AddImage(186, 80, 2463, 2171); //Save Button Background
			AddImage(113, 80, 2463, 2171); //Cancel Button Background
			AddBackground(26, 50, 229, 20, 9350); //Background 1

			AddTextEntry(30, 50, 224, 20, 0, m_state.RendererToEdit.Name, onGumpNameEntryUpdate);
			this.AddHyperlink(
				new WebColoredHyperLink(
					new Point2D(188, 78),
					Compendium.YELLOW_TEXT_WEB_COLOR,
					false,
					false,
					false,
					onSaveButtonClick,
					0,
					@" Save")); //Save Hyperlink
			this.AddHyperlink(
				new WebColoredHyperLink(
					new Point2D(115, 78),
					Compendium.YELLOW_TEXT_WEB_COLOR,
					false,
					false,
					false,
					onCancelButtonClick,
					0,
					@" Cancel")); //Save Hyperlink
		}
Пример #20
0
		protected override void CompileLayout(SuperGumpLayout layout)
		{
			base.CompileLayout(layout);

			layout.Add(
				"frame",
				() =>
				{
					if (BorderSize > 0 && BorderID >= 0)
					{
						AddImageTiled(0, 0, FrameWidth, FrameHeight, BorderID);

						if (BorderAlpha)
						{
							AddAlphaRegion(0, 0, FrameWidth, FrameHeight);
						}
					}

					if (FrameWidth > BorderSize * 2 && FrameHeight > BorderSize * 2 && BackgroundID >= 0)
					{
						AddImageTiled(BorderSize, BorderSize, FrameWidth - (BorderSize * 2), FrameHeight - (BorderSize * 2), BackgroundID);

						if (BackgroundAlpha)
						{
							AddAlphaRegion(BorderSize, BorderSize, FrameWidth - (BorderSize * 2), FrameHeight - (BorderSize * 2));
						}
					}

					if (Frame < FrameCount)
					{
						return;
					}

					string html = Html.ParseBBCode(HtmlColor).Replace("<br>", "\n").Replace("<BR>", "\n");

					AddHtml(
						BorderSize + HtmlIndent,
						BorderSize,
						(FrameWidth - (BorderSize * 2)) - HtmlIndent,
						FrameHeight - (BorderSize * 2),
						html.WrapUOHtmlColor(HtmlColor, false),
						false,
						FrameHeight >= GetSizeMax().Height);
				});
		}
Пример #21
0
        protected override void CompileEntryLayout(
            SuperGumpLayout layout,
            int length,
            int index,
            int pIndex,
            int yOffset,
            SkillName entry)
        {
            var xOffset = 0;

            if (pIndex < EntriesPerPage - 20)
            {
                xOffset = 10;
            }
            else if (pIndex < EntriesPerPage - 10)
            {
                xOffset = 145;
                yOffset = 70 + (pIndex - 10) * 30;
            }
            else if (pIndex < EntriesPerPage)
            {
                xOffset = 280;
                yOffset = 70 + (pIndex - 20) * 30;
            }

            layout.Replace(
                "check/list/select/" + index,
                () => AddButton(
                    xOffset,
                    yOffset,
                    5033,
                    5033,
                    b =>
            {
                if (SelectedSkills.Contains(entry))
                {
                    SelectedSkills.Remove(entry);
                }
                else
                {
                    if (SelectedSkills.Count < Limit)
                    {
                        SelectedSkills.Add(entry);
                    }
                    else
                    {
                        Send(
                            new NoticeDialogGump(
                                User,
                                Refresh(true),
                                title: "Limit Reached",
                                html:
                                "You have selected the maximum of " + Limit +
                                " skills.\nIf you are happy with your selection, click the 'Okay' button."));
                        return;
                    }
                }

                Refresh(true);
            }));

            if (SelectedSkills.Contains(entry))
            {
                layout.Add(
                    "imagetiled/list/entry/" + index,
                    () =>
                {
                    AddImageTiled(xOffset, yOffset, 128, 28, 3004);
                    AddImageTiled(4 + xOffset, 4 + yOffset, 120, 20, 9274);
                });
            }
            else
            {
                layout.Add("imagetiled/list/entry/" + index, () => AddImageTiled(xOffset, yOffset, 128, 28, 9274));
            }

            layout.Add(
                "html/list/entry/" + index,
                () =>
                AddHtml(
                    4 + xOffset,
                    4 + yOffset,
                    120,
                    20,
                    String.Format(
                        "<center><big><basefont color=#{0:X6}>{1}</big></center>",
                        GetLabelHue(index, pIndex, entry),
                        GetLabelText(index, pIndex, entry)),
                    false,
                    false));
        }
Пример #22
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            layout.Add(
                "background",
                () =>
            {
                AddBackground(27, 83, 424, 275, 9200);
                AddImageTiled(426, 87, 21, 269, 10464);
                AddImageTiled(29, 87, 21, 269, 10464);
                AddImage(208, 44, 9000, 1359);
                AddItem(227, 92, 9934, 1360);
                AddItem(202, 92, 9935, 1360);

                AddImage(419, 19, 10410);
                AddImage(419, 162, 10411);
                AddImage(420, 331, 10412);

                AddLabel(81, 149, 137, @"Ultima Online Forever 1st Annual Battles Tournament");
                AddImageTiled(64, 173, 345, 1, 5410);
            });

            layout.Add(
                "stats",
                () =>
            {
                AddBackground(53, 179, 371, 176, 9270);
                //AddAlphaRegion(65, 191, 345, 152);

                AddLabel(66, 195, 2049, @"Your Stats");
                AddImageTiled(64, 212, 76, 1, 5410);

                AddLabel(68, 225, 1258, @"Character Name");
                AddLabel(68, 250, 2049, UserProfile.DisplayCharacter.Name);

                AddLabel(229, 225, 1258, @"Rank");
                var Rank = EventScores.SortedProfiles().IndexOf(UserProfile) + 1;
                if (Rank.ToString().Length == 1)
                {
                    AddLabel(240, 250, 2049, Rank.ToString());
                }
                else if (Rank.ToString().Length == 2)
                {
                    AddLabel(235, 250, 2049, Rank.ToString());
                }
                else
                {
                    AddLabel(230, 250, 2049, Rank.ToString());
                }

                AddLabel(314, 225, 1258, @"Overall Points");

                if (UserProfile.OverallScore.ToString().Length == 1)
                {
                    AddLabel(352, 250, 2049, UserProfile.OverallScore.ToString());
                }
                else if (UserProfile.OverallScore.ToString().Length == 2)
                {
                    AddLabel(349, 250, 2049, UserProfile.OverallScore.ToString());
                }
                else if (UserProfile.OverallScore.ToString().Length == 3)
                {
                    AddLabel(347, 250, 2049, UserProfile.OverallScore.ToString());
                }
                else if (UserProfile.OverallScore.ToString().Length == 4)
                {
                    AddLabel(344, 250, 2049, UserProfile.OverallScore.ToString());
                }
                else
                {
                    AddLabel(341, 250, 2049, UserProfile.OverallScore.ToString());
                }

                AddLabel(68, 289, 1258, @"Battles Tournament Points");
                if (UserProfile.SpendablePoints.ToString().Length == 1)
                {
                    AddLabel(140, 314, 2049, UserProfile.SpendablePoints.ToString());
                }
                else if (UserProfile.SpendablePoints.ToString().Length == 2)
                {
                    AddLabel(137, 314, 2049, UserProfile.SpendablePoints.ToString());
                }
                else if (UserProfile.SpendablePoints.ToString().Length == 3)
                {
                    AddLabel(134, 314, 2049, UserProfile.SpendablePoints.ToString());
                }
                else if (UserProfile.SpendablePoints.ToString().Length == 4)
                {
                    AddLabel(131, 314, 2049, UserProfile.SpendablePoints.ToString());
                }
                else
                {
                    AddLabel(128, 314, 2049, UserProfile.SpendablePoints.ToString());
                }

                AddLabel(318, 289, 1258, @"Redeem Points");
                AddButton(326, 314, 247, 248, b =>
                {
                    var g = new BattlesRewardsUI(User, UserProfile, Refresh());
                    g.Send();
                });
            });
        }
Пример #23
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            base.CompileLayout(layout);

            layout.Remove("html/body/info");

            //Name
            layout.Add(
                "name",
                () =>
                {
                    AddLabel(100, 70, HighlightHue, "Name:");
                    AddBackground(100, 90, 150, 30, 9350);

                    if(LockMode)
                    {
                        AddLabelCropped(102, 100, 150, 20, ErrorHue, TemplateName);
                    }
                    else
                    {
                        AddTextEntryLimited(102, 100, 150, 20, TextHue, TemplateName, 20, (b, t) => TemplateName = t);
                    }
                });

            //Notes
            layout.Add(
                "notes",
                () =>
                {
                    AddLabel(25, 140, HighlightHue, "Notes:");
                    AddBackground(25, 160, 270, 125, 9350);

                    if(LockMode)
                    {
                        AddLabelCropped(27, 165, 265, 125, ErrorHue, TemplateName);
                    }
                    else
                    {
                        AddTextEntryLimited(27, 165, 265, 125, TextHue, TemplateNotes, 1000, (b, t) => TemplateNotes = t);
                    }
                });

            //Str
            layout.Add(
                "stat/str",
                () =>
                {
                    AddLabel(300, 100, HighlightHue, "Str:");
                    AddBackground(328, 100, 40, 20, 9350);

                    if(LockMode)
                    {
                        AddLabelCropped(330, 100, Width - 120, 20, ErrorHue, TemplateName);
                    }
                    else
                    {
                        AddTextEntryLimited(
                            330,
                            100,
                            Width - 120,
                            20,
                            TextHue,
                            TemplateStr.ToString(CultureInfo.InvariantCulture),
                            3,
                            (b, t) =>
                            {
                                int sStr;

                                if(Int32.TryParse(t, out sStr))
                                {
                                    TemplateStr = Math.Max(0, Math.Min(100, sStr));
                                }
                            });
                    }
                });

            //Dex
            layout.Add(
                "stat/dex",
                () =>
                {
                    AddLabel(300, 120, HighlightHue, "Dex:");
                    AddBackground(328, 120, 40, 20, 9350);

                    if(LockMode)
                    {
                        AddLabelCropped(330, 120, Width - 120, 20, ErrorHue, TemplateName);
                    }
                    else
                    {
                        AddTextEntryLimited(
                            330,
                            120,
                            Width - 120,
                            20,
                            TextHue,
                            TemplateDex.ToString(CultureInfo.InvariantCulture),
                            3,
                            (b, t) =>
                            {
                                int sDex;

                                if(Int32.TryParse(t, out sDex))
                                {
                                    TemplateDex = Math.Max(0, Math.Min(100, sDex));
                                }
                            });
                    }
                });

            //Int
            layout.Add(
                "stat/int",
                () =>
                {
                    AddLabel(300, 140, HighlightHue, "Int:");
                    AddBackground(328, 140, 40, 20, 9350);

                    if(LockMode)
                    {
                        AddLabelCropped(330, 140, Width - 120, 20, ErrorHue, TemplateName);
                    }
                    else
                    {
                        AddTextEntryLimited(
                            330,
                            140,
                            Width - 120,
                            20,
                            TextHue,
                            TemplateInt.ToString(CultureInfo.InvariantCulture),
                            3,
                            (b, t) =>
                            {
                                int sInt;

                                if(Int32.TryParse(t, out sInt))
                                {
                                    TemplateInt = Math.Max(0, Math.Min(100, sInt));
                                }
                            });
                    }
                });

            //menu
            layout.Add(
                "skills",
                () =>
                {
                    if(LockMode)
                    {
                        AddImage(300, 70, 2017);
                    }
                    else
                    {
                        AddButton(
                            300,
                            70,
                            2017,
                            2016,
                            button => Send(
                                new TemplateSkillsGump(User, this, 7, selected: TemplateSkills)
                                {
                                    Callback = skills =>
                                    {
                                        TemplateSkills = skills;
                                        Refresh(true);
                                    }
                                }));
                    }
                });
        }
Пример #24
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            base.CompileLayout(layout);

            layout.Remove("button/body/cancel");
        }
Пример #25
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            base.CompileLayout(layout);

            layout.Add(
                "background",
                () =>
            {
                AddBackground(0, 0, 430, 225, 9270);
                //AddBackground(10, 10, 410, 25, 9350);
                AddBackground(15, 40, 400, 140, 9350);

                /*if (Time != null)
                 * {
                 *      AddBackground(10, 185, 340, 28, 9350); //9350
                 * }*/
            });

            layout.Add(
                "title",
                () =>
            {
                if (!String.IsNullOrWhiteSpace(Title))
                {
                    var text = Title;
                    text     = text.ToUpper();
                    text     = text.WrapUOHtmlBold();
                    text     = text.WrapUOHtmlColor(TitleColor, false);

                    AddHtml(20, 15, 235, 40, text, false, false);
                }
            });

            layout.Add(
                "subtitle",
                () =>
            {
                if (!String.IsNullOrWhiteSpace(SubTitle))
                {
                    var text = SubTitle;
                    text     = text.ToUpper();
                    text     = text.WrapUOHtmlBold();
                    text     = text.WrapUOHtmlColor(SubTitleColor, false);
                    text     = text.WrapUOHtmlRight();

                    AddHtml(255, 15, 150, 40, text, false, false);
                }
            });

            layout.Add(
                "page/prev",
                () =>
            {
                if (HasPrevPage)
                {
                    AddButton(7, 150, 9910, 9911, PreviousPage);
                }
                else
                {
                    AddImage(7, 150, 9909);
                }
            });

            layout.Add(
                "page/next",
                () =>
            {
                if (HasNextPage)
                {
                    AddButton(401, 150, 9904, 9905, NextPage);
                }
                else
                {
                    AddImage(401, 150, 9903);
                }
            });

            var range = GetListRange();

            if (range.Count > 0)
            {
                CompileEntryLayout(layout, range);
            }
            else
            {
                layout.Add(
                    "empty",
                    () =>
                {
                    var text = EmptyText;
                    text     = text.WrapUOHtmlColor(EmptyTextColor, false);
                    text     = text.WrapUOHtmlCenter();

                    AddHtml(35, 150, 355, 40, text, false, false);
                });
            }

            layout.Add(
                "summary",
                () =>
            {
                if (Time != null)
                {
                    var time = Time.Value;

                    if (time < TimeSpan.Zero)
                    {
                        time = TimeSpan.Zero;
                    }

                    var text = SummaryText;
                    text     = text.ToUpper();
                    text     = text.WrapUOHtmlBold();
                    text     = text.WrapUOHtmlColor(SummaryTextColor, false);
                    text     = text.WrapUOHtmlCenter();

                    AddHtml(20, 192, 87, 40, text, false, false);
                    AddImage(112, 185, 30223);
                    AddImageTime(140, 185, time, 0x33);                             // 175 x 28
                    AddImage(315, 185, 30223);
                }
            });

            layout.Add("okay", () => AddButton(350, 187, 247, 248, Close));

            layout.Add(
                "tip",
                () =>
            {
                AddBackground(0, 225, 430, 40, 9270);

                var tip = "Tip: Click an available time boost to reduce the time left!";

                tip = tip.WrapUOHtmlSmall().WrapUOHtmlCenter().WrapUOHtmlColor(Color.Gold);

                AddHtml(20, 235, 390, 40, tip, false, false);
            });
        }
Пример #26
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            #region Borders and Dividers
            AddImage(1, 0, 2623, 1880);            //Content Left Border 1
            AddImage(1, 165, 2623, 1880);          //Content Left Border 2
            AddImage(1, 320, 2623, 1880);          //Content Left Border 2
            AddImage(261, 0, 2625, 1880);          //Content Right Border 1
            AddImage(261, 320, 2625, 1880);        //Content Right Border 2
            AddImage(261, 165, 2625, 1880);        //Content Right Border 2
            AddImage(6, 512, 2627, 1880);          //Content Bottom Border 3
            AddImage(7, 0, 2621, 1880);            //Content Top Border 3
            AddBackground(10, 11, 264, 507, 9300); //Background 53


            //Lines and Divisors
            AddImageTiled(256, 35, 1, 454, 2623); //Left Divisor
            AddImageTiled(27, 35, 1, 454, 2623);  //Right Divisor


            //AddImageTiled(105, 35, 1, 201, 2623); //Left Divisor
            AddImageTiled(27, 236, 230, 1, 2621); //Bottom Line
            AddImageTiled(27, 489, 230, 1, 2621); //Controls Bottom Border
            AddImageTiled(27, 35, 230, 1, 2621);  //Top Line
            AddImageTiled(27, 376, 230, 1, 2621); //Controls Top Border
            #endregion

            AddLabel(30, 14, 47, String.Format("Page Name: {0}", EditorState.RendererToEdit.Name)); //Properties Header

            #region Properties

            if (EditorState.SelectedElement != null)
            {
                List <ElementProperty> properties = EditorState.SelectedElement.GetElementPropertiesSnapshot();

                if (EditorState.PropertiesCurrentPageNumber > properties.Count / NUMBER_OF_PROPERTIES_PER_PAGE)
                {
                    EditorState.PropertiesCurrentPageNumber = 0;
                }
                int startingElementIndex = EditorState.PropertiesCurrentPageNumber * NUMBER_OF_PROPERTIES_PER_PAGE;
                int propertiesStartingY  = 39;
                for (int i = startingElementIndex; i < startingElementIndex + NUMBER_OF_PROPERTIES_PER_PAGE && i < properties.Count; ++i)
                {
                    AddLabel(35, propertiesStartingY, 47, properties[i].Display);

                    switch (properties[i].ElementInputType)
                    {
                    case ElementProperty.InputType.Book:
                    {
                        AddButton(134, propertiesStartingY, 5411, 5411, GumpButtonType.Reply, onBookEditTextButtonClick, i);
                    }
                    break;

                    case ElementProperty.InputType.RadioButton:
                    {
                        AddRadio(134, propertiesStartingY, 209, 208, properties[i].Checked, properties[i].Callback);
                    }
                    break;

                    case ElementProperty.InputType.Label:
                    {
                        this.AddHtmlLabel(134, propertiesStartingY, FontHandling.FontSize.Medium, false, false, false, Compendium.CONTENT_TEXT_WEB_COLOR, properties[i].Text);
                    }
                    break;

                    case ElementProperty.InputType.Blank:
                    {
                    }
                    break;

                    case ElementProperty.InputType.TextEntry:
                    {
                        if (properties[i].Callback != null)
                        {
                            int bgWidth    = 120;
                            int entryWidth = 137;
                            int number;
                            int.TryParse(properties[i].Text, out number);
                            if (properties[i].Display.ToLower().Contains("gump"))
                            {
                                bgWidth    -= 20;
                                entryWidth -= 20;
                                AddButton(231, propertiesStartingY, 0x8B0, 0x8B0, GumpButtonType.Reply, onBrowseItemButtonClick, number);
                            }
                            else if (properties[i].Display.ToLower().Contains("item"))
                            {
                                bgWidth    -= 20;
                                entryWidth -= 20;
                                AddButton(231, propertiesStartingY, 0x8B0, 0x8B0, GumpButtonType.Reply, onBrowseImageButtonClick, number);
                            }
                            AddBackground(130, propertiesStartingY, bgWidth, 20, 9350);
                            AddTextEntry(134, propertiesStartingY, entryWidth, 20, 0, properties[i].Callback, properties[i].Text);
                        }
                    }
                    break;

                    case ElementProperty.InputType.Checkbox:
                    {
                        AddCheck(134, propertiesStartingY, 210, 211, properties[i].Checked, properties[i].Callback);
                    }
                    break;
                    }

                    propertiesStartingY += 22;
                }

                if (EditorState.PropertiesCurrentPageNumber > 0)
                {
                    AddButton(30, 216, 5603, 5607, GumpButtonType.Reply, onPropertyPrevPageButtonClick);
                }

                int totalPages = (properties.Count / NUMBER_OF_PROPERTIES_PER_PAGE) + 1;

                if (EditorState.PropertiesCurrentPageNumber < totalPages - 1)
                {
                    AddButton(238, 216, 5601, 5605, GumpButtonType.Reply, onPropertyNextPageButtonClick);
                }

                AddImage(109, 216, 2463, 2171);
                this.AddHyperlink(new WebColoredHyperLink(new Point2D(109, 214), Compendium.YELLOW_TEXT_WEB_COLOR, false, false, false, onApplyPropertiesButtonClick, 0, "  Apply  "));
            }
            #endregion

            #region Bottom Buttons

            AddImage(27, 496, 2463, 2171);  //Save Button Background
            AddImage(189, 496, 2463, 2171); //Clone Button Background

            //Bottom Buttons
            this.AddHyperlink(new WebColoredHyperLink(new Point2D(27, 494), Compendium.YELLOW_TEXT_WEB_COLOR, false, false, false, onSavePageButtonClick, 0, "  Save   "));

            this.AddHyperlink(new WebColoredHyperLink(new Point2D(189, 494), Compendium.YELLOW_TEXT_WEB_COLOR, false, false, false, onSaveAsButtonClick, 0, " Save As..."));
            #endregion

            #region Image Elements Toolbar
            int startingRegElementIdx = EditorState.ElementToolbarPageNumber * NUMBER_OF_REGISTERED_ELEMENTS_PER_PAGE;
            for (int i = startingRegElementIdx; i < g_registeredElements.Count && i < startingRegElementIdx + NUMBER_OF_REGISTERED_ELEMENTS_PER_PAGE; ++i)
            {
                int x = i - startingRegElementIdx < NUMBER_OF_REGISTERED_ELEMENTS_PER_COLUMN ? 55 : 147;
                int y = i - startingRegElementIdx < NUMBER_OF_REGISTERED_ELEMENTS_PER_COLUMN ? 385 + ((i - startingRegElementIdx) * 20) : 385 + ((i - startingRegElementIdx - NUMBER_OF_REGISTERED_ELEMENTS_PER_COLUMN) * 20);

                AddImage(x, y, 2466, 2171);                                                                                                  //TextButton Background
                this.AddHyperlink(new WebColoredHyperLink(new Point2D(x, y), Compendium.YELLOW_TEXT_WEB_COLOR, false, false, false,
                                                          onAddElementButtonClick, i, g_registeredElements.ElementAt(i).Value.DisplayName)); //Item Label
            }

            if (EditorState.ElementToolbarPageNumber > 0)
            {
                AddButton(30, 426, 5603, 5607, GumpButtonType.Reply, onElementPrevPageButtonClick);
            }

            int totalElementPages = (int)Math.Ceiling((double)g_registeredElements.Count / (double)NUMBER_OF_REGISTERED_ELEMENTS_PER_PAGE);

            if (EditorState.ElementToolbarPageNumber < totalElementPages - 1)
            {
                AddButton(239, 426, 5601, 5605, GumpButtonType.Reply, onElementNextPageButtonClick);
            }


            #endregion

            #region Navigation

            AddImageTiled(87, 247, 1, 113, 2623);  //Navigation Left Border
            AddImageTiled(88, 247, 108, 1, 2621);  //Navigation Top Border
            AddImageTiled(88, 359, 108, 1, 2621);  //Navigation Bottom Border
            AddImageTiled(196, 247, 1, 113, 2623); //Navigation Right Border

            //Navigation Buttons
            if (EditorState.SelectedElement != null)
            {
                AddButton(152, 296, 5601, 5605, GumpButtonType.Reply, onNavigateButtonClick, (int)NavButtonDirection.Right);      //NavRight Button
                AddButton(117, 296, 5603, 5607, GumpButtonType.Reply, onNavigateButtonClick, (int)NavButtonDirection.Left);       //NavLeft Button
                AddButton(135, 314, 5602, 5606, GumpButtonType.Reply, onNavigateButtonClick, (int)NavButtonDirection.Down);       //NavDown Button
                AddButton(135, 279, 5600, 5604, GumpButtonType.Reply, onNavigateButtonClick, (int)NavButtonDirection.Up);         //NavUp Button
                AddButton(092, 296, 5603, 5607, GumpButtonType.Reply, onNavigateButtonClick, (int)NavButtonDirection.LeftLeft);   //NavLeft3 Button
                AddButton(176, 296, 5601, 5605, GumpButtonType.Reply, onNavigateButtonClick, (int)NavButtonDirection.RightRight); //NavRight3 Button
                AddButton(135, 339, 5602, 5606, GumpButtonType.Reply, onNavigateButtonClick, (int)NavButtonDirection.DownDown);   //NavDown3 Button
                AddButton(135, 255, 5600, 5604, GumpButtonType.Reply, onNavigateButtonClick, (int)NavButtonDirection.UpUp);       //NavUp3 Button
                AddButton(169, 296, 5601, 5605, GumpButtonType.Reply, onNavigateButtonClick, (int)NavButtonDirection.RightRight); //NavRight2 Button
                AddButton(135, 332, 5602, 5606, GumpButtonType.Reply, onNavigateButtonClick, (int)NavButtonDirection.DownDown);   //NavDown2 Button
                AddButton(135, 262, 5600, 5604, GumpButtonType.Reply, onNavigateButtonClick, (int)NavButtonDirection.UpUp);       //NavUp2 Button
                AddButton(099, 296, 5603, 5607, GumpButtonType.Reply, onNavigateButtonClick, (int)NavButtonDirection.LeftLeft);   //NavLeft2 Button
            }
            else
            {
                AddImage(152, 296, 5601, 1101); //NavRight Button
                AddImage(117, 296, 5603, 1101); //NavLeft Button
                AddImage(135, 314, 5602, 1101); //NavDown Button
                AddImage(135, 279, 5600, 1101); //NavUp Button
                AddImage(092, 296, 5603, 1101); //NavLeft3 Button
                AddImage(176, 296, 5601, 1101); //NavRight3 Button
                AddImage(135, 339, 5602, 1101); //NavDown3 Button
                AddImage(135, 255, 5600, 1101); //NavUp3 Button
                AddImage(169, 296, 5601, 1101); //NavRight2 Button
                AddImage(135, 332, 5602, 1101); //NavDown2 Button
                AddImage(135, 262, 5600, 1101); //NavUp2 Button
                AddImage(099, 296, 5603, 1101); //NavLeft2 Button
            }

            AddButton(136, 295, GRID_BUTTON_ID, GRID_BUTTON_ID, GumpButtonType.Reply, onOpenGridButtonClick, 0);
            #endregion

            AddButton(250, 15, 5003, 5003, GumpButtonType.Reply, onGumpCloseButtonClick); //Browser Close Button
        }
        protected virtual void CompileNumericEntry(
            SuperGumpLayout layout,
            int lineHeight,
            int lineWidth,
            int halfHeight,
            int halfWidth,
            int index,
            int numeric,
            int xOffset,
            int yOffset)
        {
            layout.Add(
                "imagetiled/bg" + index,
                () => AddImageTiled(xOffset, 10, NumericWidth + halfWidth, NumericHeight, DisplayID));

            if (HasLines(ref numeric, LCDLines.Top))
            {
                layout.Add(
                    "imagetiled/lines/t" + index,
                    () => AddImageTiled(xOffset, yOffset, NumericWidth, lineHeight, NumericDisplayID));
            }

            if (HasLines(ref numeric, LCDLines.TopLeft))
            {
                layout.Add(
                    "imagetiled/lines/tl" + index,
                    () => AddImageTiled(xOffset, yOffset, lineWidth, halfHeight, NumericDisplayID));
            }

            if (HasLines(ref numeric, LCDLines.TopRight))
            {
                layout.Add(
                    "imagetiled/lines/tr" + index,
                    () => AddImageTiled(xOffset + (NumericWidth - lineWidth), yOffset, lineWidth, halfHeight, NumericDisplayID));
            }

            if (HasLines(ref numeric, LCDLines.Middle))
            {
                layout.Add(
                    "imagetiled/lines/m" + index,
                    () => AddImageTiled(
                        xOffset,
                        yOffset + (halfHeight - (lineHeight / 2)),
                        NumericWidth,
                        lineHeight,
                        NumericDisplayID));
            }

            if (HasLines(ref numeric, LCDLines.BottomLeft))
            {
                layout.Add(
                    "imagetiled/lines/bl" + index,
                    () => AddImageTiled(xOffset, yOffset + halfHeight, lineWidth, halfHeight, 30073));
            }

            if (HasLines(ref numeric, LCDLines.BottomRight))
            {
                layout.Add(
                    "imagetiled/lines/br" + index,
                    () => AddImageTiled(
                        xOffset + (NumericWidth - lineWidth),
                        yOffset + halfHeight,
                        lineWidth,
                        halfHeight,
                        NumericDisplayID));
            }

            if (HasLines(ref numeric, LCDLines.Bottom))
            {
                layout.Add(
                    "imagetiled/lines/b" + index,
                    () => AddImageTiled(xOffset, yOffset + (NumericHeight - lineHeight), NumericWidth, lineHeight, NumericDisplayID));
            }
        }
Пример #28
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            layout.AddReplace(
                "button/header/minmax",
                () =>
            {
                if (Minimized)
                {
                    AddButton(0, 0, 2328, 2329, Maximize);
                    AddTooltip(3002086);
                }
                else
                {
                    AddButton(0, 0, 2328, 2329, Minimize);
                    AddTooltip(3002085);
                }
            });

            layout.Add("imagetiled/header/base", () => AddImageTiled(0, 0, 84, 56, Theme.TitleBackground));

            layout.AddReplace(
                "html/header/title",
                () =>
                AddHtml(
                    0,
                    0,
                    84,
                    56,
                    String.Format(
                        "<basefont color=#{0:X6}><center><big>{1}</big></center>",
                        Theme.TitleLabelColor.ToArgb(),
                        String.Format(
                            "{0} {1}", String.IsNullOrWhiteSpace(Title) ? DefaultTitle : Title, GlobalEdit ? "[GLOBAL]" : String.Empty)),
                    false,
                    false));

            layout.AddReplace(
                "button/header/options",
                () =>
            {
                AddButton(84, 0, Theme.EntryOptionsN, Theme.EntryOptionsP, ShowPositionSelect);
                AddButton(84, 28, Theme.EntryOptionsN, Theme.EntryOptionsP, ShowOptionMenu);
            });

            if (Minimized)
            {
                return;
            }

            int index = 0;

            State.ForEach(
                (x, y, entry) =>
            {
                int idx   = index;
                Point loc = new Point(x, y);

                layout.Add(
                    "button1/entry/" + idx, () => AddButton(110 + (loc.X * 130), (loc.Y * 28), 2445, 2445, b => SelectEntry(b, entry)));

                layout.Add(
                    "imagetiled/entry/" + idx,
                    () =>
                {
                    AddImageTiled(
                        106 + (loc.X * 130),
                        (loc.Y * 28),
                        112,
                        28,
                        (entry != null && entry.Highlight) ? Theme.EntryBackgroundH : Theme.EntryBackgroundN);
                    AddImageTiled(106 + (loc.X * 130) + 112, (loc.Y * 28), 18, 28, Theme.EntrySeparator);
                });

                layout.Add(
                    "html/entry/" + idx,
                    () =>
                    AddHtml(106 + (loc.X * 130) + 3, (loc.Y * 28) + 3, 112 - 6, 28 - 6, GetLabelText(idx, idx, entry), false, false));

                layout.Add(
                    "button2/entry/" + idx,
                    () => AddButton(
                        106 + (loc.X * 130) + 112,
                        (loc.Y * 28),
                        Theme.EntryOptionsN,
                        Theme.EntryOptionsP,
                        b =>
                {
                    Refresh();
                    SelectEntryMenu(b, loc, entry);
                }));

                index++;
            });
        }
Пример #29
0
 protected override void CompileLayout(SuperGumpLayout layout)
 {
     Renderer.Render(this);
 }
Пример #30
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            base.CompileLayout(layout);

            var sup  = SupportsUltimaStore;
            var ec   = IsEnhancedClient;
            var bgID = ec ? 83 : sup ? 40000 : 9270;

            layout.Add(
                "body/bg",
                () =>
            {
                AddBackground(0, 43, Width, Height, 9260);
                AddImage(15, 18, 1419);
                AddBackground(15, 58, 234, 50, bgID);
                AddImage(92, 0, 1417);
            });

            layout.Add("body/mainbutton", () => AddButton(101, 9, 5545, 5546, MainButtonHandler));

            layout.Add("panel/left", () => AddBackground(45, 115, 204, Height - 88, bgID));

            layout.Add(
                "panel/left/overlay",
                () =>
            {
                if (!ec)
                {
                    AddImageTiled(55, 125, 184, Height - 108, 2624);
                }
            });

            CompileTreeLayout(layout);

            layout.Add("panel/right", () => AddBackground(255, 58, Width - 270, Height - 30, bgID));

            layout.Add(
                "panel/right/overlay",
                () =>
            {
                if (!ec)
                {
                    AddImageTiled(265, 68, Width - 290, Height - 50, 2624);
                }
            });

            layout.Add(
                "title",
                () => AddHtml(25, 78, 215, 40, Title.WrapUOHtmlCenter().WrapUOHtmlColor(TitleColor, false), false, false));

            layout.Add("dragon", () => AddImage(Width - 33, 0, 10441, 0));

            if (SelectedNode.IsEmpty)
            {
                CompileEmptyNodeLayout(layout, 265, 70, Width - 290, Height - 55, List.IndexOf(SelectedNode), SelectedNode);
            }
            else
            {
                CompileNodeLayout(layout, 265, 70, Width - 290, Height - 55, List.IndexOf(SelectedNode), SelectedNode);
            }
        }
Пример #31
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            base.CompileLayout(layout);

            layout.Add("header/bg", () => AddBackground(0, 0, 400, 30, 5120));

            layout.Add(
                "header/button/view",
                () =>
            {
                AddButton(10, 5, CompactView ? 9906 : 9900, CompactView ? 9908 : 9902, ToggleView);
                AddTooltip(CompactView ? 3002086 : 3002085);
            });

            layout.Add(
                "header/title",
                () =>
            {
                AddBackground(35, 5, 150, 20, 5120);
                AddTooltip(1075159);

                var title = Dungeon.Name;

                title = title.WrapUOHtmlSmall().WrapUOHtmlCenter().WrapUOHtmlColor(Color.PaleGoldenrod, false);

                AddHtml(35, 5, 150, 40, title, false, false);
                AddTooltip(1075159);
            });

            layout.Add(
                "header/time",
                () =>
            {
                AddImage(195, 1, 30223);
                AddTooltip(1115782);

                AddBackground(225, 5, 65, 20, 5120);
                AddTooltip(1115782);

                var now    = DateTime.UtcNow;
                var time   = Dungeon.Deadline > now ? (Dungeon.Deadline - now) : TimeSpan.Zero;
                var dtText = time.ToSimpleString("d:h:m:s");

                dtText = dtText.WrapUOHtmlSmall().WrapUOHtmlCenter().WrapUOHtmlColor(Color.Yellow, false);

                AddHtml(225, 5, 65, 40, dtText, false, false);
                AddTooltip(1115782);
            });

            layout.Add(
                "header/group",
                () =>
            {
                AddImage(300, 1, 30098);
                AddTooltip(3000332);

                AddBackground(330, 5, 65, 20, 5120);
                AddTooltip(3000332);

                var dgText = String.Format(
                    "{0:#,0} / {1:#,0}",
                    List.Count(m => InstanceMaps.Instances.GetDungeon(m) == Dungeon),
                    Dungeon.GroupMax);

                dgText = dgText.WrapUOHtmlSmall().WrapUOHtmlCenter().WrapUOHtmlColor(Color.LawnGreen, false);

                AddHtml(330, 5, 65, 40, dgText, false, false);
                AddTooltip(3000332);
            });

            if (CompactView)
            {
                return;
            }

            layout.AddBefore(
                "header/bg",
                "body/bg",
                () =>
            {
                var h = Math.Max(220, 45 + (35 * Math.Min(EntriesPerPage, List.Count)));

                AddBackground(0, 0, 400, h, 5120);

                if (AlphaBG)
                {
                    AddAlphaRegion(0, 0, 400, h);
                }
            });

            layout.Add(
                "body/desc",
                () =>
            {
                AddBackground(10, 40, 175, 80, 5120);

                if (AlphaBG)
                {
                    AddAlphaRegion(10, 40, 175, 80);
                }

                AddTooltip(1079449);

                var desc = Dungeon.Desc.WrapUOHtmlSmall().WrapUOHtmlColor(Color.PaleGoldenrod, false);

                AddHtml(20, 45, 160, 70, desc, false, true);
                AddTooltip(1079449);
            });

            //DungeonCP?
            layout.Add(
                "body/panel",
                () =>
            {
                AddBackground(10, 130, 175, 80, 5120);

                if (AlphaBG)
                {
                    AddAlphaRegion(10, 130, 175, 80);
                }

                if (User != Dungeon.ActiveLeader)
                {
                    //AddHtml(20, 135, 160, 70, "?", false, true);
                    return;
                }

                AddButton(
                    20,
                    135,
                    4005,
                    4007,
                    b =>
                {
                    switch (Dungeon.LootMode)
                    {
                    case DungeonLootMode.Standard:
                        Dungeon.LootMode = DungeonLootMode.Advanced;
                        break;

                    case DungeonLootMode.Advanced:
                        Dungeon.LootMode = DungeonLootMode.Standard;
                        break;
                    }

                    Refresh(true);
                });

                var lootMode = "Loot: ";

                switch (Dungeon.LootMode)
                {
                case DungeonLootMode.Advanced:
                    lootMode += "Need or Greed";
                    break;

                default:
                    lootMode += Dungeon.LootMode.ToString().SpaceWords();
                    break;
                }

                AddHtml(55, 137, 125, 40, lootMode.WrapUOHtmlColor(Color.Gold, false), false, false);
            });

            layout.Add(
                "body/list",
                () =>
            {
                const int x = 195;
                const int y = 40;

                var range = GetListRange();

                var index = 0;

                foreach (var m in range.Values)
                {
                    var o = 35 * index;

                    var online    = m.IsOnline();
                    var inDungeon = InstanceMaps.Instances.GetDungeon(m) == Dungeon;

                    int icon, tooltip;

                    if (inDungeon)
                    {
                        if (!online)
                        {
                            icon    = 30224;
                            tooltip = 1153036;
                        }
                        else if (!m.Alive)
                        {
                            icon    = 30215;
                            tooltip = 1078368;
                        }
                        else if (m.InCombat())
                        {
                            icon    = 30233;
                            tooltip = 1078592;
                        }
                        else
                        {
                            icon    = 30210;
                            tooltip = 1112231;
                        }
                    }
                    else if (!online)
                    {
                        icon    = 30224;
                        tooltip = 1153036;
                    }
                    else
                    {
                        icon    = 30039;
                        tooltip = 1112231;
                    }

                    AddImage(x, y + o, icon);
                    AddTooltip(tooltip);

                    AddBackground(x + 30, y + o, 150, 20, 5120);

                    if (AlphaBG)
                    {
                        AddAlphaRegion(x + 30, y + o, 150, 20);
                    }

                    AddProperties(m);

                    var name = m.RawName.WrapUOHtmlCenter().WrapUOHtmlColor(Color.LawnGreen, false);

                    AddHtml(x + 30, y + o, 150, 40, name, false, false);
                    AddProperties(m);

                    AddImageTiled(x, y + 25 + o, 180, 3, online ? 30074 : 30072);
                    AddTooltip(1053042);

                    var bLength = (int)Math.Floor(180 * (m.Hits / (double)m.HitsMax));

                    if (bLength > 0)
                    {
                        AddImageTiled(x, y + 25 + o, bLength, 3, 30073);
                        AddTooltip(1053042);
                    }

                    ++index;
                }

                range.Clear();
            });

            layout.Add(
                "body/list/scroll",
                () =>
            {
                var h = Math.Max(170, 35 * Math.Min(EntriesPerPage, List.Count));

                AddBackground(378, 40, 16, h, 5120);

                if (AlphaBG)
                {
                    AddAlphaRegion(378, 40, 16, h);
                }

                AddScrollbarV(
                    379,
                    40,
                    PageCount,
                    Page,
                    PreviousPage,
                    NextPage,
                    new Rectangle(3, 15, 10, 140),
                    new Rectangle(0, 0, 16, 16),
                    new Rectangle(0, 155, 16, 16),
                    Tuple.Create(5124, 5104),
                    Tuple.Create(9760, 9761, 9760),
                    Tuple.Create(9764, 9765, 9764));
            });
        }
Пример #32
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            AddImage(1, 0, 2623, 1880);            //Content Left Border 1
            AddImage(1, 165, 2623, 1880);          //Content Left Border 2
            AddImage(2, 321, 2623, 1880);          //Content Left Border 2
            AddImage(261, 0, 2625, 1880);          //Content Right Border 1
            AddImage(261, 320, 2625, 1880);        //Content Right Border 2
            AddImage(261, 165, 2625, 1880);        //Content Right Border 2
            AddImage(6, 480, 2521, 2171);          //Below Content Background 3
            AddImage(6, 512, 2627, 1880);          //Bottom Border 3
            AddImage(106, 480, 2521, 2171);        //Below Content Background 3
            AddImage(7, 0, 2621, 1880);            //Content Top Border 3
            AddBackground(10, 11, 264, 474, 9300); //Background
            AddImageTiled(27, 45, 230, 1, 2621);   //Top Line
            AddImageTiled(24, 456, 230, 1, 2621);  //Bottom Line

            var elements = m_editorState.RendererToEdit.Elements.OrderBy(element => element.Z);

            int startingIdx = NUMBER_OF_ELEMENTS_PER_PAGE * m_editorState.ElementListGumpCurrentPageNumber;

            if (startingIdx > elements.Count() - 1)
            {
                startingIdx = 0;
                m_editorState.ElementListGumpCurrentPageNumber = 0;
            }

            int buttonLabelYCoord = 47;

            for (int i = startingIdx; i < startingIdx + NUMBER_OF_ELEMENTS_PER_PAGE && i < elements.Count(); ++i)
            {
                try
                {
                    this.AddHyperlink(new WebColoredHyperLink(new Point2D(28, buttonLabelYCoord),
                                                              elements.ElementAt(i) == m_editorState.SelectedElement ? "#FF0000" : Compendium.CONTENT_TEXT_WEB_COLOR,
                                                              false,
                                                              false,
                                                              elements.ElementAt(i) == m_editorState.SelectedElement ? true : false,
                                                              onSelectElementButtonClick, i, elements.ElementAt(i).Name));

                    //clone button(s)
                    AddButton(214, buttonLabelYCoord, 5411, 5411, GumpButtonType.Reply, onCloneButtonClick, i);
                    AddButton(208, buttonLabelYCoord + 3, 5411, 5411, GumpButtonType.Reply, onCloneButtonClick, i);

                    if (elements.Count() > 1)
                    {
                        if (i != 0)
                        {
                            AddButton(238, buttonLabelYCoord + 5, 2435, 2436, GumpButtonType.Reply, onElementZOrderChangeUpButtonClick, i); //Z Order Up Button
                        }

                        if (i != m_editorState.RendererToEdit.Elements.Count - 1)
                        {
                            AddButton(248, buttonLabelYCoord + 5, 2437, 2438, GumpButtonType.Reply, onElementZOrderChangeDownButtonClick, i); //Z Order Down Button
                        }
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }
                buttonLabelYCoord += 20;
            }


            #region Top, Delete, and Bottom Buttons
            int selectedElementIdx = LinqHelper.FindIndex(elements, element => element == m_editorState.SelectedElement);
            if (m_editorState.SelectedElement != null && selectedElementIdx < elements.Count() - 1)
            {
                AddImage(186, 461, 2463, 2171);
                this.AddHyperlink(new WebColoredHyperLink(new Point2D(186, 460), Compendium.YELLOW_TEXT_WEB_COLOR, false, false, false,
                                                          onBottomButtonClick, selectedElementIdx, " Bottom"));
            }

            if (m_editorState.SelectedElement != null && selectedElementIdx > 0)
            {
                AddImage(24, 461, 2463, 2171);
                this.AddHyperlink(new WebColoredHyperLink(new Point2D(24, 460), Compendium.YELLOW_TEXT_WEB_COLOR, false, false, false,
                                                          onTopButtonClick, selectedElementIdx, "   Top"));
            }

            if (m_editorState.SelectedElement != null)
            {
                AddImage(105, 461, 2463, 2171);
                this.AddHyperlink(new WebColoredHyperLink(new Point2D(105, 460), Compendium.YELLOW_TEXT_WEB_COLOR, false, false, false,
                                                          onDeleteButtonClick, selectedElementIdx, "  Delete  "));
            }
            #endregion


            #region Page Navigator

            if (m_editorState.ElementListGumpCurrentPageNumber > 0)
            {
                AddButton(12, 495, 5603, 5607, GumpButtonType.Reply, onPrevPageButtonClick, 0); //Next page Button
                AddLabel(34, 492, 47, @"Previous");                                             //Previous Page Label
            }
            else
            {
                AddImage(12, 495, 5603, 901);        //Previous Page Button
                AddLabel(34, 492, 901, @"Previous"); //Previous Page Label
            }

            int totalpages = (int)Math.Ceiling((double)m_editorState.RendererToEdit.Elements.Count / (double)NUMBER_OF_ELEMENTS_PER_PAGE);

            if (m_editorState.ElementListGumpCurrentPageNumber < totalpages - 1)
            {
                AddButton(255, 495, 5601, 5605, GumpButtonType.Reply, onNextPageButtonClick, 0); //Next page Button
                AddLabel(222, 492, 47, @"Next");                                                 //Next Page Label
            }
            else
            {
                AddImage(255, 495, 5601, 901);    //Previous Page Button
                AddLabel(222, 492, 901, @"Next"); //Next Page Label
            }

            AddLabel(128, 493, 47, string.Format("{0} of {1}", m_editorState.ElementListGumpCurrentPageNumber + 1, Math.Max(1, totalpages))); //Page Number Label

            AddLabel(116, 18, 47, @"Z Order");                                                                                                //Z Order heading Label
            #endregion
        }
Пример #33
0
        protected override void CompileEntryLayout(
            SuperGumpLayout layout, int length, int index, int pIndex, int yOffset, Template entry)
        {
            if (Profile == null)
            {
                return;
            }

            yOffset = yOffset + pIndex * 192;

            base.CompileEntryLayout(layout, length, index, pIndex, yOffset, entry);

            layout.Add("imagetiled/entry/vtit/" + index, () => AddImageTiled(100, yOffset - 4, 5, 25, 9275));
            layout.Add("imagetiled/entry/htit/" + index, () => AddImageTiled(10, yOffset + 20, 93, 5, 9277));

            //Deletes a template
            layout.Add("button/list/delete/" + index,
                       () => AddButton(379, yOffset - 3, 4017, 4018, b => DeleteEntry(entry)));

            layout.Remove("button/list/select/" + index);
            layout.AddReplace(
                "label/list/entry/" + index,
                () =>
                AddLabelCropped(15, yOffset, 75, 50, GetLabelHue(index, pIndex, entry),
                                GetLabelText(index, pIndex, entry)));

            //START STATS
            layout.Add(
                "label/list/entry/stats1" + index,
                () => AddLabelCropped(110, yOffset, 75, 50, 33, "Str: " + entry.Stats[StatType.Str]));

            layout.Add(
                "label/list/entry/stats2" + index,
                () => AddLabelCropped(180, yOffset, 75, 50, 33, "Dex: " + entry.Stats[StatType.Dex]));

            layout.Add(
                "label/list/entry/stats3" + index,
                () => AddLabelCropped(250, yOffset, 75, 50, 33, "Int: " + entry.Stats[StatType.Int]));
            //END STATS

            layout.Add(
                "html/body/info" + index,
                () => AddHtml(103, yOffset + 22, 190, 185, entry.Notes.ParseBBCode(DefaultHtmlColor, 3), true, true));

            layout.Add("image/list/entry/skills" + index, () => AddImage(310, yOffset, 2105));

            int iconIndex = 0;
            int idx       = 0;

            foreach (SkillName skill in entry.GetActiveSkills())
            {
                int    subIndex  = ++idx;
                string skillName = Profile.Owner != null
                    ? Profile.Owner.Skills[skill].Name
                    : skill.ToString().SpaceWords();

                layout.Add(
                    "label/list/entry/skill/" + index + "/" + subIndex,
                    () =>
                    AddLabelCropped(320, yOffset + (23 * subIndex), 80, 50, GetLabelHue(index, pIndex, entry),
                                    skillName));

                if ((iconIndex != 0 && iconIndex != 1) ||
                    (skill != SkillName.Macing && skill != SkillName.Archery && skill != SkillName.Fencing &&
                     skill != SkillName.Swords && skill != SkillName.Magery))
                {
                    continue;
                }

                int ySubOffset = 0;

                switch (++iconIndex)
                {
                case 1:
                    ySubOffset = yOffset + 23;
                    break;

                case 2:
                    ySubOffset = yOffset + 88;
                    break;
                }

                layout.Add(
                    "image/list/entry/skillicon/" + index + "/" + iconIndex,
                    () => AddImage(11, ySubOffset, GetIcon(skill), 0));
            }

            layout.Add(
                "button/list/choose/" + index,
                () => AddButton(15, yOffset + 165, 2124, 2122, button => SelectEntry(button, entry)));


            layout.Add(
                "button/list/choose/edit" + index,
                () =>
                AddButton(18, yOffset + 190, 4024, 4025,
                          b => Send(new ManageTemplateGump(User, Hide(true), Profile, entry)
            {
                AcceptHandler = a => Refresh(true),
                CancelHandler = c => Refresh(true)
            })));

            layout.Add("label/list/entry/edit" + index, () => AddLabelCropped(52, yOffset + 192, 75, 50, 33, "Edit"));

            if (pIndex < (length))
            {
                layout.AddReplace("imagetiled/body/hsep/" + index, () => AddImageTiled(10, yOffset - 8, 400, 5, 9277));
            }
        }
Пример #34
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            base.CompileLayout(layout);

            var w = 44 + (44 * ScrollWidth);
            var h = 44 + (44 * ScrollHeight);

            w = Math.Max(176, w);
            h = Math.Max(176, h);

            /* Layout:
             *  ___________
             * [___________|<]
             * |  |O O O O |^|
             * |  |O O O O | |
             * |  |O O O O | |
             * |  |________|v|
             * |__|<______>|>]
             */

            layout.Add("panel/top", () => AddBackground(0, 0, w + 100, 30, 2620));
            layout.Add("panel/left", () => AddBackground(0, 30, 100, h + 30, 2620));
            layout.Add("panel/center", () => AddBackground(100, 30, w, h, 2620));
            layout.Add("panel/right", () => AddBackground(w + 101, 30, 26, h, 2620));
            layout.Add("panel/bottom", () => AddBackground(100, h + 31, w, 30, 2620));

            layout.Add("title", () => AddLabelCropped(10, 5, w - 20, 20, TextHue, Title));

            layout.Add(
                "preview",
                () =>
            {
                AddHtml(
                    10,
                    45,
                    80,
                    40,
                    String.Format("<center><basefont color=#{0:X6}>{1}", Color.Gold.ToArgb(), GetHueLabel(Selected)),
                    false,
                    false);
                AddItem(20, 90, PreviewIcon, Selected);
            });

            CompileEntries(layout);

            layout.Add(
                "scrollX",
                () =>
                AddScrollbarH(
                    100,
                    38 + h,
                    Math.Max(0, (_HueGrid.Width + 1) - ScrollWidth),
                    ScrollX,
                    b => ScrollLeft(),
                    b => ScrollRight(),
                    new Rectangle2D(30, 0, w - 60, 16),
                    new Rectangle2D(7, 0, 16, 16),
                    new Rectangle2D(w - 25, 0, 16, 16),
                    Tuple.Create(9354, 9304),
                    Tuple.Create(5607, 5603, 5607),
                    Tuple.Create(5605, 5601, 5605)));

            layout.Add(
                "scrollY",
                () =>
                AddScrollbarV(
                    106 + w,
                    30,
                    Math.Max(0, (_HueGrid.Height + 1) - ScrollHeight),
                    ScrollY,
                    b => ScrollUp(),
                    b => ScrollDown(),
                    new Rectangle2D(0, 30, 16, h - 60),
                    new Rectangle2D(0, 10, 16, 16),
                    new Rectangle2D(0, h - 25, 16, 16),
                    Tuple.Create(9354, 9304),
                    Tuple.Create(5604, 5600, 5604),
                    Tuple.Create(5606, 5602, 5606)));

            layout.Add(
                "cancel",
                () =>
            {
                AddButton(w + 104, 4, 5538, 5539, OnCancel);
                AddTooltip(1006045);
            });

            layout.Add(
                "accept",
                () =>
            {
                AddButton(w + 104, h + 34, 5541, 5542, OnAccept);
                AddTooltip(1006044);
            });
        }
Пример #35
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            base.CompileLayout(layout);

            layout.AddReplace(
                "background/header/base",
                () =>
            {
                AddBackground(0, 0, 970, 50, 9270);
                AddImageTiled(10, 10, 950, 30, 2624);
            });

            layout.AddReplace("label/header/close", () => AddLabel(900, 15, 1287, "Close"));

            layout.AddReplace("button/header/minimize", () => AddButton(940, 20, 10740, 10742, Close));

            layout.AddReplace(
                "label/header/winners",
                () => AddLabel(400, 14, HighlightHue, "Winners: " + String.Join(", ", Winners.Select(t => t.Name))));

            if (Minimized)
            {
                return;
            }

            layout.AddReplace("imagetiled/body/spacer", () => AddImageTiled(0, 50, 970, 10, 9274));

            Dictionary <int, KeyValuePair <PlayerMobile, PvPProfileHistoryEntry> > range = GetListRange();

            if (range.Count == 0)
            {
                layout.AddReplace(
                    "background/body/base",
                    () =>
                {
                    AddBackground(0, 55, 960, 820, 9270);
                    AddImageTiled(10, 65, 940, 800, 2624);
                });

                layout.Remove("imagetiled/body/vsep/0");
            }
            else
            {
                layout.AddReplace(
                    "background/body/base",
                    () =>
                {
                    AddBackground(0, 55, 970, 47 + (range.Count * 30), 9270);
                    AddImageTiled(10, 65, 950, 25 + (range.Count * 30), 2624);
                });

                layout.Add(
                    "sort/header/crystalpoints",
                    () => AddButton(
                        440,
                        70,
                        0x7d3,
                        0x7d3,
                        b =>
                {
                    SortType = 6;
                    Refresh(true);
                }));

                layout.Add("imagetiled/header/crystalpoints", () => AddImageTiled(440, 70, 130, 24, 2624));

                layout.Add("label/header/crystalpoints", () => AddLabel(440, 70, GetSelectedHue(6), "Crystal Points"));

                layout.Add(
                    "sort/header/crystalassaults",
                    () => AddButton(
                        555,
                        70,
                        0x7d3,
                        0x7d3,
                        b =>
                {
                    SortType = 7;
                    Refresh(true);
                }));

                layout.Add("imagetiled/header/crystalassaults", () => AddImageTiled(555, 70, 130, 24, 2624));

                layout.Add("label/header/crystalassaults", () => AddLabel(555, 70, GetSelectedHue(7), "Crystal Assaults"));

                layout.AddReplace(
                    "sort/header/brazierassault",
                    () => AddButton(
                        680,
                        70,
                        0x7d3,
                        0x7d3,
                        b =>
                {
                    SortType = 8;
                    Refresh(true);
                }));

                layout.AddReplace("imagetiled/header/brazierassault", () => AddImageTiled(680, 70, 130, 24, 2624));

                layout.AddReplace("label/header/brazierassault", () => AddLabel(680, 70, GetSelectedHue(8), "Brazier Captures"));

                layout.AddReplace(
                    "sort/header/wallscast",
                    () => AddButton(
                        800,
                        70,
                        0x853,
                        0x853,
                        b =>
                {
                    SortType = 9;
                    Refresh(true);
                }));

                layout.AddReplace("imagetiled/header/wallscast", () => AddImageTiled(800, 70, 70, 24, 2624));

                layout.AddReplace("label/header/wallscast", () => AddLabel(800, 70, GetSelectedHue(9), "Walls Cast"));

                layout.AddReplace(
                    "sort/header/pointsgained",
                    () => AddButton(
                        890,
                        70,
                        0x853,
                        0x853,
                        b =>
                {
                    SortType = 5;
                    Refresh(true);
                }));

                layout.AddReplace("imagetiled/header/pointsgained", () => AddImageTiled(890, 70, 70, 24, 2624));

                layout.AddReplace("label/header/pointsgained", () => AddLabel(890, 70, GetSelectedHue(5), "PvP Rating"));

                layout.AddReplace("imagetiled/header/hsep", () => AddImageTiled(10, 95, 950, 5, 9277));

                layout.AddReplace(
                    "widget/body/scrollbar",
                    () =>
                    AddScrollbarH(
                        6,
                        46,
                        PageCount,
                        Page,
                        PreviousPage,
                        NextPage,
                        new Rectangle2D(30, 0, 898, 13),
                        new Rectangle2D(0, 0, 28, 13),
                        new Rectangle2D(930, 0, 28, 13)));

                layout.Remove("imagetiled/body/vsep/0");
            }
        }
Пример #36
0
		protected override void CompileLayout(SuperGumpLayout layout)
		{
			base.CompileLayout(layout);

			int x, y, w, h;
			GetBounds(out x, out y, out w, out h);

			var c = new Point2D(x + (w / 2), y + (h / 2));

			layout.Add("clock/bg", () => AddBackground(x - 15, y - 15, w + 30, h + 30, 2620));

			if (DisplayNumerals)
			{
				CompileNumerals(layout, c);
			}

			if (DisplayHourHand)
			{
				CompileHourHand(layout, c);
			}

			if (DisplayMinuteHand)
			{
				CompileMinuteHand(layout, c);
			}

			if (DisplaySecondHand)
			{
				CompileSecondHand(layout, c);
			}
		}
Пример #37
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            layout.Add(
                "background",
                () =>
            {
                AddImageTiled(40, 80, 44, 458, 202);
                AddImage(40, 39, 206);
                AddImageTiled(80, 38, 422, 45, 201);
                AddImage(40, 538, 204);
                AddImageTiled(495, 71, 44, 469, 203);
                AddImage(496, 39, 207);
                AddImageTiled(84, 539, 417, 43, 233);
                AddImageTiled(75, 82, 446, 459, 200);
                AddImage(171, 16, 1419);
                AddImage(248, -1, 1417);
                AddImage(257, 8, 5545);
                AddImage(496, 538, 205);
            });

            layout.Add("SideButtons",
                       () =>
            {
                if (GumpType == CentralGumpType.News)
                {
                    AddButton(0, 87, 223, 223, b =>
                    {
                        GumpType = CentralGumpType.News;
                        Refresh(true);
                    });
                }
                else
                {
                    AddButton(0, 87, 224, 223, b =>
                    {
                        GumpType = CentralGumpType.News;
                        Refresh(true);
                    });
                }

                if (GumpType == CentralGumpType.Links)
                {
                    AddButton(0, 154, 221, 221, b =>
                    {
                        GumpType = CentralGumpType.Links;
                        Refresh(true);
                    });
                }
                else
                {
                    AddButton(0, 154, 222, 221, b =>
                    {
                        GumpType = CentralGumpType.Links;
                        Refresh(true);
                    });
                }

                if (GumpType == CentralGumpType.Information)
                {
                    AddButton(0, 286, 219, 219, b =>
                    {
                        GumpType = CentralGumpType.Information;
                        Refresh(true);
                    });
                }
                else
                {
                    AddButton(0, 286, 220, 219, b =>
                    {
                        GumpType = CentralGumpType.Information;
                        Refresh(true);
                    });
                }

                if (GumpType == CentralGumpType.Commands)
                {
                    AddButton(0, 352, 217, 217, b =>
                    {
                        GumpType = CentralGumpType.Commands;
                        Refresh(true);
                    });
                }
                else
                {
                    AddButton(0, 352, 218, 217, b =>
                    {
                        GumpType = CentralGumpType.Commands;
                        Refresh(true);
                    });
                }

                if (GumpType == CentralGumpType.Profile)
                {
                    AddButton(525, 87, 229, 229, b =>
                    {
                        GumpType = CentralGumpType.Profile;
                        Refresh(true);
                    });
                }
                else
                {
                    AddButton(525, 87, 230, 229, b =>
                    {
                        GumpType = CentralGumpType.Profile;
                        Refresh(true);
                    });
                }

                if (GumpType == CentralGumpType.Options)
                {
                    AddButton(525, 154, 231, 231, b =>
                    {
                        GumpType = CentralGumpType.Options;
                        Refresh(true);
                    });
                }
                else
                {
                    AddButton(525, 154, 232, 231, b =>
                    {
                        GumpType = CentralGumpType.Options;
                        Refresh(true);
                    });
                }

                if (GumpType == CentralGumpType.Events)
                {
                    AddButton(525, 286, 227, 227, b =>
                    {
                        GumpType = CentralGumpType.Events;
                        Refresh(true);
                    });
                }
                else
                {
                    AddButton(525, 286, 228, 227, b =>
                    {
                        GumpType = CentralGumpType.Events;
                        Refresh(true);
                    });
                }

                AddButton(525, 352, 235, 234, b =>
                {
                    new CentralGumpUIList(User, Profile, X, Y).Send();
                });
            });

            switch (GumpType)
            {
            case CentralGumpType.News:
                layout.Add("News",
                           () =>
                {
                    AddImageTiled(81, 92, 420, 12, 50);
                    AddHtml(126, 74, 325, 17,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online: Forever News & Patch Notes")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddImageTiled(81, 104, 404, 413, 2624);
                    AddHtml(86, 103, 414, 413, News, false, true);

                    AddImageTiled(81, 518, 420, 12, 50);

                    AddImage(97, 530, 9004);
                    AddHtml(180, 541, 129, 18,
                            String.Format("<BIG>{0}</BIG>", "Receive on login?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite),
                            false, false);
                    AddCheck(147, 536, 2152, 2153, Profile.LoginGump, (b, t) => { Profile.LoginGump = t; });


                    if (User.AccessLevel >= AccessLevel.GameMaster)
                    {
                        AddHtml(385, 541, 113, 18,
                                String.Format("<BIG>{0}</BIG>", "Modify News?")
                                .WrapUOHtmlColor(KnownColor.GhostWhite),
                                false, false);
                        AddButton(351, 541, 4005, 4006, b => { Send(new NewsMessageListGump(User, Hide())); });
                    }
                });
                break;

            case CentralGumpType.Links:
                layout.Add("Links",
                           () =>
                {
                    AddImageTiled(81, 92, 420, 12, 50);
                    AddHtml(134, 74, 313, 18,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online: Forever - Important Links")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddHtml(135, 115, 400, 107,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online Forever Homepage")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    AddButton(99, 115, 4005, 4006, b =>
                    {
                        User.LaunchBrowser("http://www.uoforever.com");
                        Refresh();
                    });

                    AddHtml(135, 160, 400, 107,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online Forever Donation Page")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    AddButton(99, 160, 4005, 4006, b =>
                    {
                        User.LaunchBrowser("http://uoforever.com/donate.php");
                        Refresh();
                    });

                    AddHtml(135, 205, 400, 107,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online Forever Forums")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    AddButton(99, 205, 4005, 4006, b =>
                    {
                        User.LaunchBrowser("http://www.uoforum.com/");
                        Refresh();
                    });

                    AddHtml(135, 250, 400, 107,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online Forever Chatroom [IRC]")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    AddButton(99, 250, 4005, 4006, b =>
                    {
                        User.LaunchBrowser("http://uoforever.com/chat/");
                        Refresh();
                    });

                    AddHtml(135, 295, 400, 107,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online Forever Wiki")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddButton(99, 295, 4005, 4006, b =>
                    {
                        User.LaunchBrowser("http://www.uofwiki.com");
                        Refresh();
                    });

                    AddHtml(135, 340, 400, 107,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online Forever Frequently Asked Questions")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    AddButton(99, 340, 4005, 4006, b =>
                    {
                        User.LaunchBrowser("http://www.uoforum.com/faq/");
                        Refresh();
                    });

                    AddHtml(135, 385, 400, 107,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online Forever: Legends")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    AddButton(99, 385, 4005, 4006, b =>
                    {
                        User.LaunchBrowser("http://legends.uoforever.com");
                        Refresh();
                    });

                    AddHtml(135, 430, 400, 107,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online Forever Facebook Page")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddButton(99, 430, 4005, 4006, b =>
                    {
                        User.LaunchBrowser("https://www.facebook.com/UltimaOnlineForever");
                        Refresh();
                    });

                    AddHtml(135, 475, 400, 107,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online Forever Action Camera")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    AddButton(99, 475, 4005, 4006, b =>
                    {
                        User.LaunchBrowser("http://live.uoforever.com");
                        Refresh();
                    });

                    AddImageTiled(81, 518, 420, 12, 50);
                });
                break;

            case CentralGumpType.Information:
                layout.Add("Information",
                           () =>
                {
                    AddImageTiled(81, 92, 420, 12, 50);


                    AddHtml(124, 74, 513, 18,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online: Forever - Information and Options")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddLabel(85, 109, 2049, "Young Program");


                    AddLabel(120, 130, 2049, "General Information");
                    AddButton(85, 130, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungBenefitsString())
                        .Send();
                    });

                    AddLabel(120, 155, 2049, "Leaving the Program");
                    AddButton(85, 155, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungLeaveString()).Send
                            ();
                    });

                    AddLabel(120, 180, 2049, "The Defiled Crypt");
                    AddButton(85, 180, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungDungeonString())
                        .Send();
                    });

                    AddLabel(120, 205, 2049, "Companion Program");
                    AddButton(85, 205, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungDungeonString())
                        .Send();
                    });


                    AddLabel(85, 228, 2049, "Shopkeeper/NPC Information");


                    AddLabel(120, 250, 2049, "Banks");
                    AddButton(85, 250, 4005, 4007,
                              b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructBankString()).Send();
                    });

                    AddLabel(120, 275, 2049, "Bardic Guild");
                    AddButton(85, 275, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructBardicGuildString())
                        .Send();
                    });


                    AddLabel(120, 300, 2049, "The Blacksmith");
                    AddButton(85, 300, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructBlacksmithGuildString())
                        .Send();
                    });


                    AddLabel(120, 325, 2049, "Carpenter's Guild");
                    AddButton(85, 325, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructLumberjackGuildString())
                        .Send();
                    });

                    AddLabel(120, 350, 2049, "The Docks");
                    AddButton(85, 350, 4005, 4007,
                              b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructDocksString()).Send();
                    });


                    AddLabel(120, 375, 2049, "Healers");
                    AddButton(85, 375, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructHealersGuildString())
                        .Send();
                    });


                    AddLabel(120, 400, 2049, "Inns");
                    AddButton(85, 400, 4005, 4007,
                              b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructInnGuildString())
                        .Send();
                    });


                    AddLabel(120, 425, 2049, "Mage's Guild");
                    AddButton(85, 425, 4005, 4007,
                              b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructMageGuildString())
                        .Send();
                    });


                    AddLabel(120, 450, 2049, "Miner's Guild");
                    AddButton(85, 450, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructMinersGuildString())
                        .Send();
                    });


                    AddLabel(120, 475, 2049, "Stables");
                    AddButton(85, 475, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructStablesGuildString())
                        .Send();
                    });


                    AddLabel(120, 500, 2049, "Tailor Shop");
                    AddButton(85, 500, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructTailorGuildString())
                        .Send();
                    });

                    AddLabel(315, 109, 2049, "General Systems Information");

                    AddLabel(350, 130, 2049, "Battles System");
                    AddButton(315, 130, 4005, 4007,
                              b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructBattlesString())
                        .Send();
                    });

                    AddLabel(350, 155, 2049, "Conquest System");
                    AddButton(315, 155, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungDungeonString())
                        .Send();
                    });

                    AddLabel(350, 180, 2049, "Event Scoring System");
                    AddButton(315, 180, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungDungeonString())
                        .Send();
                    });

                    AddLabel(350, 205, 2049, "Invasion System");
                    AddButton(315, 205, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungDungeonString())
                        .Send();
                    });

                    AddLabel(350, 230, 2049, "Player Scoring System");
                    AddButton(315, 230, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungDungeonString())
                        .Send();
                    });

                    AddLabel(350, 255, 2049, "Portals System");
                    AddButton(315, 255, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungDungeonString())
                        .Send();
                    });

                    AddLabel(315, 280, 2049, "Housing Information");

                    AddLabel(350, 300, 2049, "Classic Houses");
                    AddButton(315, 300, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungDungeonString())
                        .Send();
                    });

                    AddLabel(350, 325, 2049, "Custom Houses");
                    AddButton(315, 325, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungDungeonString())
                        .Send();
                    });

                    AddLabel(350, 350, 2049, "House Ownership");
                    AddButton(315, 350, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungDungeonString())
                        .Send();
                    });

                    AddLabel(350, 375, 2049, "Player Run Vendors");
                    AddButton(315, 375, 4005, 4007, b =>
                    {
                        new CentralGumpInformationUI(User, Hide(), CentralGump.ConstructYoungDungeonString())
                        .Send();
                    });

                    AddLabel(350, 475, User.GuildMessageHue, "Guild Chat Color");
                    AddButton(315, 475, 4005, 4007,
                              b => { new CentralGump.GuildChatColorPicker(User, Profile).SendTo(User.NetState); });

                    AddLabel(350, 500, User.AllianceMessageHue, "Alliance Chat Color");
                    AddButton(315, 500, 4005, 4007,
                              b => { new CentralGump.AllianceChatColorPicker(User, Profile).SendTo(User.NetState); });


                    AddImageTiled(81, 523, 420, 12, 50);
                });
                break;

            case CentralGumpType.Commands:
                layout.Add("Commands",
                           () =>
                {
                    AddHtml(81, 74, 513, 18,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online: Forever - PvP Commands and Notifications")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddImageTiled(81, 92, 420, 12, 50);

                    AddCheck(60, 120, 2152, 2153, Profile.BuyHead,
                             (b, t) => { Profile.BuyHead = t; });
                    AddHtml(95, 125, 221, 18,
                            String.Format("<BIG>{0}</BIG>", "Buy head for 30k?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddCheck(283, 120, 2152, 2153, Profile.FactionPoint,
                             (b, t) => { Profile.FactionPoint = t; });
                    AddHtml(318, 125, 204, 18,
                            String.Format("<BIG>{0}</BIG>", "Ignore Faction Notifications?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddImageTiled(81, 518, 420, 12, 50);
                });
                break;

            case CentralGumpType.Profile:
                layout.Add("Profile",
                           () =>
                {
                    AddImageTiled(81, 92, 420, 12, 50);
                    AddHtml(140, 74, 313, 18,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online: Forever - Player Profile")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddHtml(79, 110, 186, 18,
                            String.Format("<BIG>{0}</BIG>", "Total Account Play Time")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    TimeSpan totaltime = TimeSpan.Zero;
                    var account        = User.Account as Account;

                    if (account != null)
                    {
                        totaltime =
                            account.Mobiles.Cast <PlayerMobile>()
                            .Where(player => player != null)
                            .Aggregate(totaltime, (current, player) => current + player.GameTime);
                    }

                    AddHtml(79, 135, 186, 18,
                            String.Format("<BIG>{0} Days</BIG>", (int)Math.Ceiling(totaltime.TotalDays))
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddHtml(345, 110, 175, 18,
                            String.Format("<BIG>{0}</BIG>", "Character Play Time")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddHtml(345, 135, 130, 18,
                            String.Format("<BIG>{0} Days</BIG>", (int)Math.Ceiling(User.GameTime.TotalDays))
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddHtml(79, 180, 105, 107,
                            String.Format("<BIG>{0}</BIG>", "Current Title")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    Title t;
                    TitleHue h;
                    CustomTitles.CustomTitles.GetTitle(User, out t);
                    CustomTitles.CustomTitles.GetTitleHue(User, out h);

                    if (t != null)
                    {
                        /*AddHtml(79, 205, 105, 107,
                         *  String.Format("<BIG>{0}</BIG>", User.Female ? t.FemaleTitle : t.MaleTitle)
                         *      .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);*/
                        AddLabel(79, 205, h != null ? h.Hue - 1 : 0, User.Female ? t.FemaleTitle : t.MaleTitle);
                    }
                    else
                    {
                        AddHtml(79, 205, 105, 107,
                                String.Format("<BIG>{0}</BIG>", "No title to display.")
                                .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    }

                    AddHtml(345, 180, 138, 17,
                            String.Format("<BIG>{0}</BIG>", "Current Title Hue")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    if (t != null && h != null)
                    {
                        /*AddHtml(345, 205, 105, 107,
                         *  String.Format("<BIG>{0}</BIG>", h.Hue)
                         *      .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);*/
                        AddLabel(345, 205, h.Hue - 1, h.Hue.ToString());
                    }
                    else
                    {
                        AddHtml(345, 205, 105, 107,
                                String.Format("<BIG>{0}</BIG>", "No title hue to display.")
                                .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    }

                    AddHtml(79, 250, 121, 18,
                            String.Format("<BIG>{0}</BIG>", "Conquest Points")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    ConquestProfile conquestprofile = Conquests.Conquests.EnsureProfile(User);
                    long points = conquestprofile.GetPointsTotal();

                    if (points == 0)
                    {
                        AddHtml(79, 275, 171, 107,
                                String.Format("<BIG>{0}</BIG>", "You have not completed any conquests.")
                                .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    }
                    else
                    {
                        AddHtml(79, 275, 121, 18,
                                String.Format("<BIG>{0}</BIG>", points)
                                .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    }

                    AddHtml(345, 250, 171, 107,
                            String.Format("<BIG>{0}</BIG>", "Invasion Points")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddHtml(79, 320, 171, 107,
                            String.Format("<BIG>{0}</BIG>", "Event Points")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    PlayerEventScoreProfile eventprofile = EventScores.EventScores.EnsureProfile(User);
                    points = eventprofile.OverallScore;

                    if (points == 0)
                    {
                        AddHtml(79, 345, 171, 107,
                                String.Format("<BIG>{0}</BIG>", "You have not competed in any events.")
                                .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    }
                    else
                    {
                        AddHtml(79, 345, 121, 18,
                                String.Format("<BIG>{0}</BIG>", points)
                                .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                    }

                    AddHtml(345, 320, 111, 17,
                            String.Format("<BIG>{0}</BIG>", "Portals Points")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddImageTiled(81, 393, 420, 12, 50);

                    AddButton(79, 415, 4005, 4006,
                              b => { Send(new PvPProfileOverviewGump(User, AutoPvP.EnsureProfile(User), Hide())); });

                    AddHtml(117, 415, 111, 17,
                            String.Format("<BIG>{0}</BIG>", "Battles Profile")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddButton(79, 460, 4005, 4006,
                              b => { Send(new ConquestStatesGump(User, Hide(), conquestprofile)); });

                    AddHtml(117, 460, 111, 17,
                            String.Format("<BIG>{0}</BIG>", "Conquests Profile")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddButton(79, 505, 4005, 4006, b => { Send(new BattlesTUI(User, Hide(), eventprofile)); });

                    AddHtml(117, 505, 111, 17,
                            String.Format("<BIG>{0}</BIG>", "Events Profile")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddButton(345, 415, 4005, 4006, b => { Refresh(); });

                    AddHtml(383, 415, 111, 17,
                            String.Format("<BIG>{0}</BIG>", "Invasions Profile")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddButton(345, 460, 4005, 4006, b =>
                    {
                        User.LaunchBrowser("http://uoforever.com/legends/?action=player&s=" + User.Serial.Value);
                        Refresh();
                    });

                    AddHtml(383, 460, 111, 17,
                            String.Format("<BIG>{0}</BIG>", "Legends Profile")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddButton(345, 505, 4005, 4006, b => { Refresh(); });

                    AddHtml(383, 505, 111, 17,
                            String.Format("<BIG>{0}</BIG>", "Portals Profile")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);
                });
                break;

            case CentralGumpType.Options:
                layout.Add("Options",
                           () =>
                {
                    AddImageTiled(81, 92, 420, 12, 50);


                    AddHtml(119, 74, 513, 18,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online: Forever - Player Profile Options")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);


                    AddCheck(60, 120, 2152, 2153, Profile.IgnoreBattles,
                             (b, t) => { Profile.IgnoreBattles = t; });
                    AddHtml(95, 125, 221, 18,
                            String.Format("<BIG>{0}</BIG>", "Ignore Battles Prompts?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddCheck(283, 120, 2152, 2153, Profile.IgnoreNotifies,
                             (b, t) => { Profile.IgnoreNotifies = t; });
                    AddHtml(318, 125, 204, 18,
                            String.Format("<BIG>{0}</BIG>", "Ignore Staff Notifications?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddCheck(60, 190, 2152, 2153, Profile.IgnoreTournament,
                             (b, t) => { Profile.IgnoreTournament = t; });
                    AddHtml(95, 195, 256, 18,
                            String.Format("<BIG>{0}</BIG>", "Ignore Tourny Prompts?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddCheck(283, 190, 2152, 2153, Profile.IgnoreConquests,
                             (b, t) => { Profile.IgnoreConquests = t; });
                    AddHtml(318, 195, 232, 18,
                            String.Format("<BIG>{0}</BIG>", "Ignore Conquest Notification?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddCheck(60, 260, 2152, 2153, Profile.IgnoreMoongates,
                             (b, t) => { Profile.IgnoreMoongates = t; });
                    AddHtml(95, 265, 202, 18,
                            String.Format("<BIG>{0}</BIG>", "Ignore Moongate Prompt?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddCheck(283, 260, 2152, 2153, Profile.PublicLegends,
                             (b, t) => { Profile.PublicLegends = t; });
                    AddHtml(318, 265, 202, 18,
                            String.Format("<BIG>{0}</BIG>", "Show UOF Legends?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    /*AddCheck(283, 260, 2152, 2153, Profile.IgnoreMoongates,
                    *   (b, t) => { Profile.IgnoreMoongates = t; });
                    *  AddHtml(318, 265, 250, 18,
                    *   String.Format("<BIG>{0}</BIG>", "Auto Buy Head for 30k?")
                    *       .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);*/

                    AddCheck(60, 330, 2152, 2153, Profile.FameTitle, (b, t) => { Profile.FameTitle = t; });
                    AddHtml(95, 335, 155, 18,
                            String.Format("<BIG>{0}</BIG>", "Display Fame Title?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddCheck(283, 330, 2152, 2153, User.KarmaLocked, (b, t) => { User.KarmaLocked = t; });
                    AddHtml(318, 335, 147, 20,
                            String.Format("<BIG>{0}</BIG>", "Lock Your Karma?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddCheck(60, 400, 2152, 2153, User.DisplayChampionTitle,
                             (b, t) => { User.DisplayChampionTitle = t; });
                    AddHtml(95, 405, 186, 18,
                            String.Format("<BIG>{0}</BIG>", "Display Champion Title?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddCheck(283, 400, 2152, 2153, Profile.MiniGump, (b, t) => { Profile.MiniGump = t; });
                    AddHtml(318, 405, 186, 18,
                            String.Format("<BIG>{0}</BIG>", "Display Mini Score Gump")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddCheck(60, 470, 2152, 2153, Profile.DisablePvPTemplate,
                             (b, t) => { Profile.DisablePvPTemplate = t; });
                    AddHtml(95, 475, 183, 18,
                            String.Format("<BIG>{0}</BIG>", "Disable PvP Templates?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddCheck(283, 470, 2152, 2153, Profile.DisableTemplateEquipment,
                             (b, t) => { Profile.DisableTemplateEquipment = t; });
                    AddHtml(318, 475, 255, 18,
                            String.Format("<BIG>{0}</BIG>", "Disable Template Equipment?")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);


                    AddImageTiled(81, 518, 420, 12, 50);
                });
                break;

            case CentralGumpType.Events:
                layout.Add("Events",
                           () =>
                {
                    AddHtml(154, 74, 513, 18,
                            String.Format("<BIG>{0}</BIG>", "Ultima Online: Forever - Events Page")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddImageTiled(81, 92, 420, 12, 50);
                    AddHtml(85, 109, 325, 17,
                            String.Format("<BIG>{0}</BIG>", "There are currently no events at this time.")
                            .WrapUOHtmlColor(KnownColor.GhostWhite), false, false);

                    AddImageTiled(81, 518, 420, 12, 50);
                });
                break;
            }
        }
Пример #38
0
		protected virtual void CompileMinuteHand(SuperGumpLayout layout, Point2D center)
		{
			layout.Add(
				"clock/hand/minute",
				() =>
				{
					var ma = 2.0f * Math.PI * (Time.Minutes + Time.Seconds / 60.0f) / 60.0f;
					var mhp = center.Clone2D((int)(Radius * Math.Sin(ma)), (int)(-Radius * Math.Cos(ma)));

					AddLine(center, mhp, ColorMinuteHand, 3);
				});
		}
Пример #39
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            if (IsDisposed)
            {
                return;
            }

            layout.Add(
                "background/body",
                () =>
            {
                AddBackground(0, 0, 457, 478, 9380);
                AddBackground(28, 41, 401, 401, 3500);
            });

            layout.Add(
                "images/body",
                () =>
            {
                AddImageTiled(49, 406, 359, 37, 93);
                AddImage(407, 404, 94);
                AddImageTiled(66, 81, 328, 1, 5174);
                AddImage(48, 54, 113);
                AddImage(378, 54, 113);
            });

            layout.Add(
                "labels/body",
                () =>
            {
                AddLabel(89, 63, 2049, @"Points Scoreboard for:");
                if (Invasion != null)
                {
                    AddLabelCropped(243, 63, 155, 16, 1287, Invasion.InvasionName);
                }
            });

            layout.Add(
                "buttons/body",
                () =>
            {
                AddButton(412, 1, 4017, 4018, 0, GumpButtonType.Reply, 0);     //exit

                if (PageCount - 1 > Page)
                {
                    AddLabel(337, 409, 0, @"Next");
                    AddButton(371, 409, 4005, 4006, NextPage);     //right
                }

                if (Page > 0)
                {
                    AddLabel(91, 411, 0, @"Previous");
                    AddButton(57, 409, 4014, 4015, 2, PreviousPage);     //left
                }
            });


            Dictionary <int, KeyValuePair <PlayerMobile, int> > range = GetListRange();

            CompileEntryLayout(layout, range);
        }
Пример #40
0
		protected virtual void CompileNumerals(SuperGumpLayout layout, Point2D center)
		{
			for (var i = 1; i <= 12; i++)
			{
				CompileNumeral(layout, center, i);
			}
		}
Пример #41
0
        protected virtual void CompileEntryLayout(
            SuperGumpLayout layout,
            int length,
            int index,
            int pIndex,
            int xOffset,
            ITimeBoost boost)
        {
            layout.Add(
                "boosts/" + index,
                () =>
            {
                int hue  = boost.Hue, bellID = 10850;
                var text = String.Empty;

                if (boost.Value.Hours != 0)
                {
                    bellID = 10810;                             //Blue Gem
                    text   = "Hour";
                }
                else if (boost.Value.Minutes != 0)
                {
                    bellID = 10830;                             //Green Gem
                    text   = "Min";
                }
                else
                {
                    hue = 2999;
                }

                if (!String.IsNullOrWhiteSpace(text) && boost.RawValue != 1)
                {
                    text += "s";
                }

                if (hue == 2999)
                {
                    AddImage(xOffset + 7, 56, bellID, hue);                             //Left Bell
                    AddImage(xOffset + 57, 56, bellID, hue);                            //Right Bell
                }
                else
                {
                    AddImage(xOffset + 7, 56, bellID);                             //Left Bell
                    AddImage(xOffset + 57, 56, bellID);                            //Right Bell
                }

                AddImage(xOffset, 45, 30058, hue);                         //Hammer

                if (Profile != null)
                {
                    AddButton(xOffset + 5, 65, 1417, 1417, b => SelectBoost(boost));                             //Disc
                }

                AddImage(xOffset + 5, 65, 1417, hue);                         //Disc
                AddImage(xOffset + 14, 75, 5577, 2999);                       //Blackout

                AddImageNumber(xOffset + 44, 99, boost.RawValue, hue, Axis.Both);

                if (!String.IsNullOrWhiteSpace(text))
                {
                    text = text.WrapUOHtmlSmall();
                    text = text.WrapUOHtmlCenter();
                    text = text.WrapUOHtmlColor(BoostTextColor, false);

                    AddHtml(xOffset + 20, 110, 50, 40, text, false, false);
                }

                if (hue == 2999)
                {
                    AddImage(xOffset, 130, 30062, hue);                             //Feet
                }
                else
                {
                    if (Profile != null)
                    {
                        AddBackground(xOffset + 10, 143, 70, 30, 9270);                                 //9300
                    }

                    AddImage(xOffset, 130, 30062);                             //Feet

                    if (Profile != null)
                    {
                        text = Profile[boost].ToString("#,0");
                        text = text.WrapUOHtmlBold();
                        text = text.WrapUOHtmlCenter();
                        text = text.WrapUOHtmlColor(BoostCountColor, false);

                        AddHtml(xOffset + 12, 150, 65, 40, text, false, false);
                    }
                }
            });
        }
Пример #42
0
		protected override void CompileLayout(SuperGumpLayout layout)
		{
			base.CompileLayout(layout);

			layout.Remove("button/body/cancel");
		}
Пример #43
0
            protected virtual void CompileEntryLayout(SuperGumpLayout layout, int x, int y, int index)
            {
                layout.Add(
                    "heads/" + index,
                    () =>
                {
                    var n = Altar.Dungeon.Infos[index].Left;
                    var h = Altar.Dungeon.Infos[index].Right;

                    var o = ArtExtUtility.GetImageOffset(0x2DB4);
                    var s = ArtExtUtility.GetImageSize(0x2DB4);

                    var c = Color.White;

                    switch (index)
                    {
                    case 0:
                        c = Color.RosyBrown;
                        break;

                    case 1:
                        c = Color.OrangeRed;
                        break;

                    case 2:
                        c = Color.SkyBlue;
                        break;

                    case 3:
                        c = Color.GreenYellow;
                        break;

                    case 4:
                        c = Color.MediumPurple;
                        break;
                    }

                    if (Altar.Heads[index])
                    {
                        AddRectangle(x, y, 54, 54, Color.Empty, c, 2);
                        AddItem(x + 5 + o.X, y + (30 - (s.Height / 2)), 11700, h);
                    }
                    else
                    {
                        AddButton(
                            x,
                            y,
                            2183,
                            2183,
                            b =>
                        {
                            if (!Altar.Heads[index])
                            {
                                var head = User.Backpack.FindItemByType(ElementalAspectHead.Types[index]);

                                if (head == null && User.AccessLevel >= AccessLevel.Administrator)
                                {
                                    head = ElementalAspectHead.CreateInstance(index, n, h);

                                    User.GiveItem(head, GiveFlags.Pack, false);
                                }

                                if (head != null && !head.Deleted && head.Amount > 0)
                                {
                                    User.SendMessage(85, "You place {0} in to {1}.", head.ResolveName(User), Altar.ResolveName(User));

                                    Altar.Heads[index] = true;

                                    head.Consume();

                                    if (Altar.HeadCount >= Altar.HeadMax)
                                    {
                                        Altar.DoSummon();

                                        Close(true);
                                        return;
                                    }
                                }
                                else
                                {
                                    User.SendMessage(
                                        34,
                                        "This slot is engraved with '{0}' and it seems the head of a dragon would fit in it.",
                                        n);
                                }
                            }

                            Refresh(true);
                        });
                        AddRectangle(x, y, 54, 54, Color.Empty, c, 2);
                    }

                    var name = n.WrapUOHtmlCenter().WrapUOHtmlColor(c, false);

                    AddHtml(x, index % 2 == 0 ? y + 55 : y - 20, 54, 40, name, false, false);
                });
            }
Пример #44
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            base.CompileLayout(layout);

            layout.Add(
                "image/spellbook",
                () => { AddImage(0, 0, Ethic is HeroEthic ? 11009 : 11008); });

            if (Page == 0)
            {
                int count = 0;
                foreach (Power power in Ethic.Definition.Powers)
                {
                    int count1 = count;
                    int xoffset;
                    if (count <= 3)
                    {
                        xoffset = 57;
                    }
                    else
                    {
                        count1  = count1 - 4;
                        xoffset = 225;
                    }
                    Power power1 = power;
                    layout.Add(
                        "power/spellbook" + count,
                        () =>
                    {
                        AddLabel(xoffset + 19, 33 + 33 * count1, 0,
                                 power1.Definition.Name);
                        AddButton(xoffset, 36 + 33 * count1, 1209, 1210, btn =>
                        {
                            if (power1.CheckInvoke(PlayerState))
                            {
                                User.Say(true, power1.Definition.Phrase);
                                power1.BeginInvoke(PlayerState);
                            }
                        });
                    });
                    count++;
                }
            }

            if (Page == 0)
            {
                layout.Add(
                    "label/lifeforce",
                    () =>
                {
                    AddLabel(59, 158, 1258, "Life Force:");
                    AddLabel(59, 176, Ethic is HeroEthic ? 2049 : 1100, PlayerState.Power + "/100");
                });
                layout.Add(
                    "label/rank",
                    () =>
                {
                    AddLabel(227, 158, 1258, "Current Rank:");
                    AddLabel(227, 176, Ethic is HeroEthic ? 2049 : 1100,
                             Ethic.Definition.Ranks[PlayerState.Rank].Title);
                });
            }

            if (PageCount > 0 && Page + 1 != PageCount)
            {
                layout.Add(
                    "button/next",
                    () => { AddButton(321, 9, 2236, 2236, NextPage); });
            }

            if (PageCount > 0 && Page != 0)
            {
                layout.Add(
                    "button/previous",
                    () => { AddButton(50, 9, 2235, 2235, PreviousPage); });
            }


            if (Page != 0)
            {
                Dictionary <int, Power> range = GetListRange();
                CompileSpellLayout(layout, range);
            }
        }
Пример #45
0
 protected virtual void CompileSpellLayout(SuperGumpLayout layout, Dictionary <int, Power> range)
 {
     range.For((i, kv) => CompileSpellLayout(layout, range.Count, kv.Key, i, 138 + (i * 91), kv.Value));
 }
Пример #46
0
        protected override void CompileEntryLayout(
            SuperGumpLayout layout, int length, int index, int pIndex, int yOffset, SkillName entry)
        {
            int xOffset = 0;

            if (pIndex < 6)
            {
                xOffset = 10;
            }
            else if (pIndex < 12)
            {
                xOffset = 145;
                yOffset = 70 + (pIndex - 6) * 30;
            }
            else if (pIndex < EntriesPerPage)
            {
                xOffset = 280;
                yOffset = 70 + (pIndex - 12) * 30;
            }

            layout.AddReplace(
                "check/list/select/" + index,
                () => AddButton(
                    xOffset,
                    yOffset,
                    5033,
                    5033,
                    b =>
            {
                if (SelectedSkills.Contains(entry))
                {
                    SelectedSkills.Remove(entry);
                }
                else
                {
                    if (SelectedSkills.Count < Limit)
                    {
                        SelectedSkills.Add(entry);
                    }
                    else
                    {
                        new NoticeDialogGump(
                            User,
                            Refresh(true),
                            title: "Limit Reached",
                            html:
                            "You have selected the maximum of " + Limit +
                            " skills.\nIf you are happy with your selection, click the 'Okay' button.").Send();
                        return;
                    }
                }

                Refresh(true);
            }));

            if (SelectedSkills.Contains(entry))
            {
                layout.Add(
                    "imagetiled/list/entry/" + index,
                    () =>
                {
                    AddImageTiled(xOffset, yOffset, 128, 28, 3004);
                    AddImageTiled(4 + xOffset, 4 + yOffset, 120, 20, 2624);
                });
            }
            else
            {
                layout.Add("imagetiled/list/entry/" + index, () => AddImageTiled(xOffset, yOffset, 128, 28, 2624));
            }

            layout.Add(
                "html/list/entry/" + index,
                () =>
                AddHtml(
                    4 + xOffset,
                    4 + yOffset,
                    120,
                    20,
                    GetLabelText(index, pIndex, entry).WrapUOHtmlTag("center").WrapUOHtmlColor(DefaultHtmlColor),
                    false,
                    false));
        }
Пример #47
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            base.CompileLayout(layout);

            var sup  = SupportsUltimaStore;
            var ec   = IsEnhancedClient;
            var pad  = ec || sup ? 15 : 10;
            var bgID = ec ? 83 : sup ? 40000 : 2620;

            var w = 44 + (44 * ScrollWidth);
            var h = 44 + (44 * ScrollHeight);

            w = Math.Max(176, w);
            h = Math.Max(176, h);

            w += pad * 2;
            h += pad * 2;

            /* Layout:
             *  ___________
             * [___________|<]
             * |  |O O O O |^|
             * |  |O O O O | |
             * |  |O O O O | |
             * |  |________|v|
             * |__|<______>|>]
             */

            var width  = 135 + w;
            var height = 70 + h;

            layout.Add(
                "bg",
                () =>
            {
                AddBackground(0, 0, width, height, bgID);
                AddBackground(0, 35, 100, height - 35, bgID);
                AddBackground(100, 35, width - 135, height - 70, bgID);
                AddImageTiled(100 + pad, 35 + pad, width - (135 + (pad * 2)), height - (70 + (pad * 2)), bgID + 4);
            });

            layout.Add(
                "title",
                () =>
            {
                var title = Title;

                title = title.WrapUOHtmlBig();
                title = title.WrapUOHtmlColor(Color.Gold, false);

                AddHtml(pad, pad, width - (pad * 2), 40, title, false, false);
            });

            layout.Add(
                "preview",
                () =>
            {
                var label = GetHueLabel(Selected);

                label = label.WrapUOHtmlBig();
                label = label.WrapUOHtmlCenter();
                label = label.WrapUOHtmlColor(Color.Gold, false);

                AddHtml(pad, 35 + pad, 100 - (pad * 2), 40, label, false, false);

                if (PreviewIcon >= 0)
                {
                    var s = ArtExtUtility.GetImageSize(PreviewIcon);

                    if (Selected > 0)
                    {
                        AddItem((100 - s.Width) / 2, 35 + pad + 40, PreviewIcon, Selected);
                    }
                    else
                    {
                        AddItem((100 - s.Width) / 2, 35 + pad + 40, PreviewIcon);
                    }
                }
            });

            CompileEntries(layout, 100 + pad, 35 + pad);

            layout.Add(
                "scrollY",
                () =>
            {
                var value = Math.Max(0, (_HueGrid.Height + 1) - ScrollHeight);

                AddScrollbarV(
                    width - (16 + pad),
                    35 + pad,
                    value,
                    ScrollY,
                    b => ScrollUp(),
                    b => ScrollDown(),
                    new Rectangle(0, 20, 16, height - (110 + (pad * 2))),
                    new Rectangle(0, 0, 16, 16),
                    new Rectangle(0, 20 + (height - (110 + (pad * 2))) + 4, 16, 16),
                    Tuple.Create(9354, 9304),
                    Tuple.Create(5604, 5600, 5604),
                    Tuple.Create(5606, 5602, 5606));
            });

            layout.Add(
                "scrollX",
                () =>
            {
                var value = Math.Max(0, (_HueGrid.Width + 1) - ScrollWidth);

                AddScrollbarH(
                    100 + pad,
                    height - (16 + pad),
                    value,
                    ScrollX,
                    b => ScrollLeft(),
                    b => ScrollRight(),
                    new Rectangle(20, 0, width - (175 + (pad * 2)), 16),
                    new Rectangle(0, 0, 16, 16),
                    new Rectangle(20 + (width - (175 + (pad * 2))) + 4, 0, 16, 16),
                    Tuple.Create(9354, 9304),
                    Tuple.Create(5607, 5603, 5607),
                    Tuple.Create(5605, 5601, 5605));
            });

            layout.Add(
                "cancel",
                () =>
            {
                AddButton(width - (15 + pad), pad, 11410, 11411, OnCancel);
                AddTooltip(1006045);
            });

            layout.Add(
                "accept",
                () =>
            {
                AddButton(width - (15 + pad), height - (15 + pad), 11400, 11401, OnAccept);
                AddTooltip(1006044);
            });
        }
Пример #48
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            base.CompileLayout(layout);

            const int w = 600, h = 400;

            layout.Add("bg", () => AddBackground(0, 0, w, h, SupportsUltimaStore ? 40000 : 9270));

            layout.Add(
                "title",
                () =>
            {
                var label = "Discord Bot Settings";

                label = label.WrapUOHtmlBig();
                label = label.WrapUOHtmlCenter();
                label = label.WrapUOHtmlColor(Color.Gold, false);

                AddHtml(15, 10, w - 30, 40, label, false, false);
            });

            layout.Add(
                "webhook/live",
                () =>
            {
                var label = "Live Webhook";

                label = label.WrapUOHtmlRight();
                label = label.WrapUOHtmlColor(Color.Gold, false);

                const int ww = (w - 30) / 4;

                AddHtml(15, 40, ww, 40, label, false, false);

                AddImageTiled(15 + (ww + 10), 40, (w - 30) - (ww + 10), 20, 2624);

                AddTextEntry(
                    15 + (ww + 15),
                    40,
                    (w - 30) - (ww + 20),
                    20,
                    TextHue,
                    DiscordBot.GetWebhookUri(false),
                    (e, t) => DiscordBot.SetWebhook(t, false));
            });

            layout.Add(
                "webhook/debug",
                () =>
            {
                var label = "Debug Webhook";

                label = label.WrapUOHtmlRight();
                label = label.WrapUOHtmlColor(Color.Gold, false);

                const int ww = (w - 30) / 4;

                AddHtml(15, 60, ww, 40, label, false, false);

                AddImageTiled(15 + (ww + 10), 60, (w - 30) - (ww + 10), 20, 2624);

                AddTextEntry(
                    15 + (ww + 15),
                    60,
                    (w - 30) - (ww + 20),
                    20,
                    TextHue,
                    DiscordBot.GetWebhookUri(true),
                    (e, t) => DiscordBot.SetWebhook(t, true));
            });

            layout.Add(
                "options",
                () =>
            {
                var xx = 15;
                var yy = 90;

                const int ww = (w - 30) / 4;

                var col = DiscordBot.CMOptions.FilterSaves ? Color.LawnGreen : Color.OrangeRed;

                AddHtmlButton(
                    xx,
                    yy,
                    ww,
                    25,
                    b =>
                {
                    DiscordBot.CMOptions.FilterSaves = !DiscordBot.CMOptions.FilterSaves;
                    Refresh(true);
                },
                    "Saves Filter".WrapUOHtmlCenter(),
                    col,
                    Color.Black,
                    Color.Silver,
                    1);

                xx += ww;

                col = DiscordBot.CMOptions.FilterRepeat ? Color.LawnGreen : Color.OrangeRed;

                AddHtmlButton(
                    xx,
                    yy,
                    ww,
                    25,
                    b =>
                {
                    DiscordBot.CMOptions.FilterRepeat = !DiscordBot.CMOptions.FilterRepeat;
                    Refresh(true);
                },
                    "Repeat Filter".WrapUOHtmlCenter(),
                    col,
                    Color.Black,
                    col,
                    1);

                xx  = 15;
                yy += 35;

                col = DiscordBot.CMOptions.HandleBroadcast ? Color.LawnGreen : Color.OrangeRed;

                AddHtmlButton(
                    xx,
                    yy,
                    ww,
                    25,
                    b =>
                {
                    DiscordBot.CMOptions.HandleBroadcast = !DiscordBot.CMOptions.HandleBroadcast;
                    Refresh(true);
                },
                    "Handle Broadcasts".WrapUOHtmlCenter(),
                    col,
                    Color.Black,
                    Color.Silver,
                    1);

                xx += ww;

                col = DiscordBot.CMOptions.HandleNotify ? Color.LawnGreen : Color.OrangeRed;

                AddHtmlButton(
                    xx,
                    yy,
                    ww,
                    25,
                    b =>
                {
                    DiscordBot.CMOptions.HandleNotify = !DiscordBot.CMOptions.HandleNotify;
                    Refresh(true);
                },
                    "Handle Notifications".WrapUOHtmlCenter(),
                    col,
                    Color.Black,
                    col,
                    1);

                xx += ww;

                col = DiscordBot.CMOptions.HandleBattles ? Color.LawnGreen : Color.OrangeRed;

                AddHtmlButton(
                    xx,
                    yy,
                    ww,
                    25,
                    b =>
                {
                    DiscordBot.CMOptions.HandleBattles = !DiscordBot.CMOptions.HandleBattles;
                    Refresh(true);
                },
                    "Handle PvP Battles".WrapUOHtmlCenter(),
                    col,
                    Color.Black,
                    col,
                    1);

                xx += ww;

                col = DiscordBot.CMOptions.HandleStatus ? Color.LawnGreen : Color.OrangeRed;

                AddHtmlButton(
                    xx,
                    yy,
                    ww,
                    25,
                    b =>
                {
                    DiscordBot.CMOptions.HandleStatus = !DiscordBot.CMOptions.HandleStatus;
                    Refresh(true);
                },
                    "Handle Server Status".WrapUOHtmlCenter(),
                    col,
                    Color.Black,
                    col,
                    1);

                xx  = 15;
                yy += 35;

                AddHtmlButton(
                    xx,
                    yy,
                    ww,
                    25,
                    b =>
                {
                    Refresh();
                    User.SendGump(new PropertiesGump(User, DiscordBot.CMOptions));
                },
                    "Module Config".WrapUOHtmlCenter(),
                    Color.Gold,
                    Color.Black,
                    Color.Gold,
                    1);

                xx  = 0;
                yy += 35;

                AddBackground(xx, yy, w, h - yy, SupportsUltimaStore ? 40000 : 9270);

                xx += 15;
                yy += 10;

                var label = "Information";

                label = label.WrapUOHtmlBig();
                label = label.WrapUOHtmlCenter();
                label = label.WrapUOHtmlColor(Color.Gold, false);

                AddHtml(xx, yy, w - 30, 40, label, false, false);

                yy += 35;

                label = Information;

                label = label.WrapUOHtmlColor(Color.PaleGoldenrod, false);

                AddHtml(xx, yy, w - 30, (h - 20) - yy, label, false, true);
            });
        }
Пример #49
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            base.CompileLayout(layout);

            int w = 50 + (70 * ScrollWidth);
            int h = 50 + (70 * ScrollHeight);

            /* Layout:
             *  ___________
             * [___________|<]
             * |  |O O O O |^|
             * |  |O O O O | |
             * |  |O O O O | |
             * |  |________|v|
             * |__|<______>|>]
             */

            layout.Add("panel/top", () => AddBackground(0, 0, w + 200, 30, 2620));

            if (!Minimized)
            {
                layout.Add("panel/left", () => AddBackground(0, 30, 200, h + 30, 2620));
                layout.Add("panel/center", () => AddBackground(200, 30, w, h, 2620));
                layout.Add("panel/right", () => AddBackground(w + 201, 30, 26, h, 2620));
                layout.Add("panel/bottom", () => AddBackground(200, h + 31, w, 30, 2620));
            }

            layout.Add("title", () => AddLabelCropped(10, 5, 180 + (w - 100), 20, TextHue, Title));

            var ui = UI;

            if ((ui.Mode == RuneCodex.UICache.ViewMode.Categories && Codex.CanEditCategories(User)) ||
                (ui.Mode == RuneCodex.UICache.ViewMode.Entries && Codex.CanEditEntries(User)))
            {
                layout.Add(
                    "edit",
                    () =>
                {
                    ui = UI;

                    AddButton(
                        w + 120,
                        10,
                        2362,
                        2362,
                        b =>
                    {
                        ui          = UI;
                        ui.EditMode = !ui.EditMode;
                        Refresh(true);
                    });
                    AddTooltip(!ui.EditMode ? 3000414 : 3000415);
                });
            }

            layout.Add(
                "help",
                () =>
            {
                ui = UI;

                AddButton(
                    w + 150,
                    10,
                    2361,
                    2361,
                    b =>
                {
                    ui          = UI;
                    ui.EditMode = false;

                    switch (ui.Mode)
                    {
                    case RuneCodex.UICache.ViewMode.Categories:
                        ui.Category = null;
                        goto case RuneCodex.UICache.ViewMode.Entries;

                    case RuneCodex.UICache.ViewMode.Entries:
                        ui.Entry = null;
                        break;
                    }

                    Refresh(true);
                });
                AddTooltip(1046004);
            });

            layout.Add(
                "minimize",
                () =>
            {
                AddButton(
                    w + 180,
                    10,
                    2360,
                    2360,
                    b =>
                {
                    if (Minimized)
                    {
                        Maximize(b);
                    }
                    else
                    {
                        Minimize(b);
                    }
                });
                AddTooltip(!Minimized ? 3002085 : 3002086);
            });

            if (Minimized)
            {
                return;
            }

            layout.Add(
                "preview",
                () =>
            {
                ui = UI;

                switch (ui.Mode)
                {
                case RuneCodex.UICache.ViewMode.Categories:
                    {
                        if (ui.Category == null)
                        {
                            AddHtml(
                                10,
                                50,
                                190,
                                h - 10,
                                "Select or add a category using the grid on the right.\nTo view the runes in a category, click the accept button in the bottom-right corner.\n\nClone: Create new rune books containing the runes from the selected category.\nThe runes are not removed from the codex."
                                .WrapUOHtmlColor(Color.LawnGreen),
                                false,
                                true);
                            break;
                        }

                        var cat = ui.Category;

                        if (ui.EditMode)
                        {
                            AddLabelCropped(10, 50, 180, 20, HighlightHue, "Name: (20 Chars)");
                            AddTextEntryLimited(10, 80, 180, 20, TextHue, cat.Name, 20, (e, s) => cat.Name = s);

                            AddLabelCropped(10, 110, 180, 20, HighlightHue, "Description: (60 Chars)");
                            AddTextEntryLimited(10, 130, 180, 60, TextHue, cat.Description, 60, (e, s) => cat.Description = s);

                            AddLabelCropped(10, 200, 180, 20, HighlightHue, "Hue: (0 - 2999)");
                            AddTextEntryLimited(
                                10,
                                220,
                                180,
                                20,
                                TextHue,
                                cat.Hue.ToString(CultureInfo.InvariantCulture),
                                4,
                                (e, s) =>
                            {
                                int hue;

                                if (Int32.TryParse(s, out hue))
                                {
                                    cat.Hue = Math.Max(0, Math.Min(2999, hue));
                                }
                            });

                            AddButton(
                                10,
                                280,
                                2714,
                                2715,
                                b =>
                            {
                                cat.UseDefaults();
                                Refresh(true);
                            });
                            AddLabelCropped(30, 280, 160, 20, HighlightHue, "Use Defaults");

                            if (Codex.CanRemoveEntries(User))
                            {
                                AddButton(
                                    10,
                                    300,
                                    2708,
                                    2709,
                                    b =>
                                {
                                    cat.Empty();
                                    Codex.InvalidateProperties();
                                    Refresh(true);
                                });
                                AddLabelCropped(30, 300, 160, 20, ErrorHue, "Empty Entries");
                            }

                            if (Codex.CanRemoveCategories(User) && cat != Codex.Categories[0, 0])
                            {
                                AddButton(
                                    10,
                                    320,
                                    2708,
                                    2709,
                                    b =>
                                {
                                    ui = UI;

                                    if (Codex.Remove(cat))
                                    {
                                        ui.Category = null;
                                    }

                                    Refresh(true);
                                });
                                AddLabelCropped(30, 320, 160, 20, ErrorHue, "Remove");
                            }
                        }
                        else
                        {
                            AddLabelCropped(10, 50, 180, 20, cat.Hue, GetCategoryLabel(cat));
                            AddHtml(10, 80, 190, 110, cat.ToHtmlString(User), false, true);

                            int cost = Codex.CloneEntryChargeCost * cat.Entries.Count;

                            AddButton(
                                10,
                                200,
                                2714,
                                2715,
                                b =>
                            {
                                Codex.Drop(User, cat, true);
                                Refresh(true);
                            });
                            AddLabelCropped(
                                30,
                                200,
                                160,
                                20,
                                HighlightHue,
                                String.Format("Clone ({0:#,0} charge{1})", cost, cost != 1 ? "s" : String.Empty));

                            if (Codex.CanRemoveCategories(User) && cat != Codex.Categories[0, 0])
                            {
                                AddButton(
                                    10,
                                    320,
                                    2708,
                                    2709,
                                    b =>
                                {
                                    ui = UI;

                                    if (Codex.Remove(cat))
                                    {
                                        ui.Category = null;
                                    }

                                    Refresh(true);
                                });
                                AddLabelCropped(30, 320, 160, 20, ErrorHue, "Remove");
                            }
                        }
                    }
                    break;

                case RuneCodex.UICache.ViewMode.Entries:
                    {
                        if (ui.Entry == null)
                        {
                            AddHtml(
                                10,
                                50,
                                190,
                                h - 10,
                                "Select or add a rune using the grid on the right.\n\nYou can add:\n* Marked Recall Runes\n* Rune Books\n\nAdding an item will extract the location(s) and destroy the item.\n\nYou can also drop items directly to this codex.\nThey will be added to the last category you selected.\n\nClone: Create a recall rune for the selected rune.\nThe rune is not removed from the codex."
                                .WrapUOHtmlColor(Color.LawnGreen),
                                false,
                                true);
                            break;
                        }

                        var entry = ui.Entry;

                        if (ui.EditMode)
                        {
                            AddLabelCropped(10, 50, 180, 20, HighlightHue, "Name: (20 Chars)");
                            AddTextEntryLimited(10, 80, 180, 20, TextHue, entry.Name, 20, (e, s) => entry.Name = s);

                            AddLabelCropped(10, 110, 180, 20, HighlightHue, "Description: (60 Chars)");
                            AddTextEntryLimited(10, 130, 180, 60, TextHue, entry.Description, 60, (e, s) => entry.Description = s);

                            AddButton(
                                10,
                                300,
                                2714,
                                2715,
                                b =>
                            {
                                entry.UseDefaults();
                                Codex.InvalidateProperties();
                                Refresh(true);
                            });
                            AddLabelCropped(30, 300, 160, 20, HighlightHue, "Use Defaults");

                            if (Codex.CanRemoveEntries(User))
                            {
                                AddButton(
                                    10,
                                    320,
                                    2708,
                                    2709,
                                    b =>
                                {
                                    ui = UI;

                                    if (ui.Category.Remove(entry))
                                    {
                                        ui.Entry = null;
                                        Codex.InvalidateProperties();
                                    }

                                    Refresh(true);
                                });
                                AddLabelCropped(30, 320, 160, 20, ErrorHue, "Remove");
                            }
                        }
                        else
                        {
                            AddLabelCropped(10, 50, 180, 20, ui.Category.Hue, GetEntryLabel(ui.Entry));
                            AddHtml(10, 80, 190, 110, ui.Entry.ToHtmlString(User), false, true);

                            AddButton(
                                10,
                                200,
                                2714,
                                2715,
                                b =>
                            {
                                Codex.Recall(User, entry, true);
                                Minimized = true;
                                Refresh(true);
                            });
                            AddLabelCropped(
                                30,
                                200,
                                160,
                                20,
                                HighlightHue,
                                String.Format(
                                    "Recall ({0:#,0} charge{1})", Codex.RecallChargeCost, Codex.RecallChargeCost != 1 ? "s" : String.Empty));

                            AddButton(
                                10,
                                220,
                                2714,
                                2715,
                                b =>
                            {
                                Codex.Gate(User, entry, true);
                                Minimized = true;
                                Refresh(true);
                            });
                            AddLabelCropped(
                                30,
                                220,
                                160,
                                20,
                                HighlightHue,
                                String.Format(
                                    "Gate ({0:#,0} charge{1})", Codex.GateChargeCost, Codex.GateChargeCost != 1 ? "s" : String.Empty));

                            AddButton(
                                10,
                                240,
                                2714,
                                2715,
                                b =>
                            {
                                Codex.Drop(User, entry, true);
                                Refresh(true);
                            });
                            AddLabelCropped(
                                30,
                                240,
                                160,
                                20,
                                HighlightHue,
                                String.Format(
                                    "Clone ({0:#,0} charge{1})", Codex.CloneEntryChargeCost, Codex.CloneEntryChargeCost != 1 ? "s" : String.Empty));

                            if (Codex.CanRemoveEntries(User))
                            {
                                AddButton(
                                    10,
                                    320,
                                    2708,
                                    2709,
                                    b =>
                                {
                                    ui = UI;

                                    if (ui.Category.Remove(entry))
                                    {
                                        ui.Entry = null;
                                        Codex.InvalidateProperties();
                                    }

                                    Refresh(true);
                                });
                                AddLabelCropped(30, 320, 160, 20, ErrorHue, "Remove");
                            }
                        }
                    }
                    break;
                }
            });

            CompileGrid(layout);

            layout.Add(
                "scrollX",
                () =>
            {
                ui = UI;

                switch (ui.Mode)
                {
                case RuneCodex.UICache.ViewMode.Categories:
                    AddScrollbarH(
                        200,
                        38 + h,
                        Math.Max(0, (Codex.Categories.Width + 1) - ScrollWidth),
                        ui.CategoryScroll.X,
                        b => ScrollLeft(),
                        b => ScrollRight(),
                        new Rectangle2D(30, 0, w - 60, 16),
                        new Rectangle2D(7, 0, 16, 16),
                        new Rectangle2D(w - 25, 0, 16, 16),
                        Tuple.Create(9354, 9304),
                        Tuple.Create(5607, 5603, 5607),
                        Tuple.Create(5605, 5601, 5605));
                    break;

                case RuneCodex.UICache.ViewMode.Entries:
                    AddScrollbarH(
                        200,
                        38 + h,
                        Math.Max(0, (ui.Category.Entries.Width + 1) - ScrollWidth),
                        ui.EntryScroll.X,
                        b => ScrollLeft(),
                        b => ScrollRight(),
                        new Rectangle2D(30, 0, w - 60, 16),
                        new Rectangle2D(7, 0, 16, 16),
                        new Rectangle2D(w - 25, 0, 16, 16),
                        Tuple.Create(9354, 9304),
                        Tuple.Create(5607, 5603, 5607),
                        Tuple.Create(5605, 5601, 5605));
                    break;
                }
            });

            layout.Add(
                "scrollY",
                () =>
            {
                ui = UI;

                switch (ui.Mode)
                {
                case RuneCodex.UICache.ViewMode.Categories:
                    AddScrollbarV(
                        206 + w,
                        30,
                        Math.Max(0, (Codex.Categories.Height + 1) - ScrollHeight),
                        ui.CategoryScroll.Y,
                        b => ScrollUp(),
                        b => ScrollDown(),
                        new Rectangle2D(0, 30, 16, h - 60),
                        new Rectangle2D(0, 10, 16, 16),
                        new Rectangle2D(0, h - 25, 16, 16),
                        Tuple.Create(9354, 9304),
                        Tuple.Create(5604, 5600, 5604),
                        Tuple.Create(5606, 5602, 5606));
                    break;

                case RuneCodex.UICache.ViewMode.Entries:
                    AddScrollbarV(
                        206 + w,
                        30,
                        Math.Max(0, (ui.Category.Entries.Height + 1) - ScrollHeight),
                        ui.EntryScroll.Y,
                        b => ScrollUp(),
                        b => ScrollDown(),
                        new Rectangle2D(0, 30, 16, h - 60),
                        new Rectangle2D(0, 10, 16, 16),
                        new Rectangle2D(0, h - 25, 16, 16),
                        Tuple.Create(9354, 9304),
                        Tuple.Create(5604, 5600, 5604),
                        Tuple.Create(5606, 5602, 5606));
                    break;
                }
            });

            layout.Add(
                "cancel",
                () =>
            {
                AddButton(w + 204, 4, 5538, 5539, OnCancel);
                AddTooltip(1006045);
            });

            if (ui.Mode == RuneCodex.UICache.ViewMode.Categories)
            {
                layout.Add(
                    "accept",
                    () =>
                {
                    AddButton(w + 204, h + 34, 5541, 5542, OnAccept);
                    AddTooltip(1006044);
                });
            }
        }
Пример #50
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            layout.Add(
                "background",
                () =>
            {
                AddBackground(0, 0, 426, 338, 9380);
                AddBackground(15, 30, 397, 283, 3500);
            });

            layout.Add(
                "TalismanIcon",
                () =>
            {
                AddLabel(40, 50, 2059, @"Talisman");
                AddItem(40, 70, 12123, MetaTalisman.Hue);
            });

            layout.Add(
                "Stage",
                () =>
            {
                AddLabel(40, 115, 0, @"Stage");
                AddLabel(40, 135, 0, MetaTalisman.Stage + "/" + MetaTalisman.MaxStage);

                const int width = 109;

                var wOffset = (int)Math.Ceiling(width * (MetaTalisman.Stage / (double)MetaTalisman.MaxStage));

                if (wOffset >= width)
                {
                    AddImageTiled(35, 155, width, 17, 2062);
                }
                else
                {
                    AddImageTiled(35, 155, width, 17, 2061);

                    if (wOffset > 0)
                    {
                        AddImageTiled(35, 155, wOffset, 17, 2062);
                    }
                }
            });

            layout.Add(
                "Progress",
                () =>
            {
                AddLabel(40, 180, 0, @"Current Progress");
                if (MetaTalisman.Stage != MetaTalisman.MaxStage)
                {
                    AddLabel(40, 200, 0, MetaTalisman.EvoXp + "/" + MetaTalisman.NextEvolution);

                    const int width = 109;

                    var wOffset =
                        (int)Math.Ceiling(width * (MetaTalisman.EvoXp / (double)MetaTalisman.NextEvolution));

                    if (wOffset >= width)
                    {
                        AddImageTiled(35, 220, width, 17, 2062);
                    }
                    else
                    {
                        AddImageTiled(35, 220, width, 17, 2061);

                        if (wOffset > 0)
                        {
                            AddImageTiled(35, 220, wOffset, 17, 2062);
                        }
                    }
                }
                else
                {
                    AddLabel(40, 200, 0, "MAX");
                    AddImageTiled(35, 220, 109, 17, 2062);
                }
            });

            layout.Add(
                "AbilitySlots",
                () =>
            {
                AddLabel(40, 245, 0, @"Ability Slots");
                if (MetaTalisman.MaxAbilities > 0)
                {
                    AddLabel(40, 265, 0, MetaTalisman.CurrentAbilities + "/" + MetaTalisman.MaxAbilities);
                }
                else
                {
                    AddLabel(40, 265, 0, "No ability slots available.");
                }
            });

            layout.Add(
                "Skills",
                () =>
            {
                AddLabel(205, 50, 2059, @"Talisman-Skills");
                AddLabel(355, 49, 2059, @"Level");
                AddLabel(235, 283, 1258, @"Apply Relic?");
                AddButton(319, 282, 247, 248, b =>
                {
                    MetaTalisman.GetTargetRelic(User);
                    Refresh(true);
                });

                if (MetaTalisman.MetaTalismanskills.Count == 0)
                {
                    AddLabel(205, 80, 0, "No learned skills.");
                }
            });

            Dictionary <int, BaseMetaTalismanSkill> range = GetListRange();


            if (range.Count > 0)
            {
                CompileEntryLayout(layout, range);
            }
        }
Пример #51
0
		protected override void CompileLayout(SuperGumpLayout layout)
		{
			#region Borders and Dividers
			AddImage(1, 0, 2623, 1880); //Content Left Border 1
			AddImage(1, 165, 2623, 1880); //Content Left Border 2
			AddImage(1, 320, 2623, 1880); //Content Left Border 2
			AddImage(261, 0, 2625, 1880); //Content Right Border 1
			AddImage(261, 320, 2625, 1880); //Content Right Border 2
			AddImage(261, 165, 2625, 1880); //Content Right Border 2
			AddImage(6, 512, 2627, 1880); //Content Bottom Border 3
			AddImage(7, 0, 2621, 1880); //Content Top Border 3
			AddBackground(10, 11, 264, 507, 9300); //Background 53

			//Lines and Divisors
			AddImageTiled(256, 35, 1, 454, 2623); //Left Divisor
			AddImageTiled(27, 35, 1, 454, 2623); //Right Divisor

			//AddImageTiled(105, 35, 1, 201, 2623); //Left Divisor
			AddImageTiled(27, 236, 230, 1, 2621); //Bottom Line
			AddImageTiled(27, 489, 230, 1, 2621); //Controls Bottom Border
			AddImageTiled(27, 35, 230, 1, 2621); //Top Line
			AddImageTiled(27, 376, 230, 1, 2621); //Controls Top Border
			#endregion

			AddLabel(30, 14, 47, String.Format("Page Name: {0}", EditorState.RendererToEdit.Name)); //Properties Header

			#region Properties
			if (EditorState.SelectedElement != null)
			{
				var properties = EditorState.SelectedElement.GetElementPropertiesSnapshot();

				if (EditorState.PropertiesCurrentPageNumber > properties.Count / NUMBER_OF_PROPERTIES_PER_PAGE)
				{
					EditorState.PropertiesCurrentPageNumber = 0;
				}
				var startingElementIndex = EditorState.PropertiesCurrentPageNumber * NUMBER_OF_PROPERTIES_PER_PAGE;
				var propertiesStartingY = 39;
				for (var i = startingElementIndex;
					i < startingElementIndex + NUMBER_OF_PROPERTIES_PER_PAGE && i < properties.Count;
					++i)
				{
					AddLabel(35, propertiesStartingY, 47, properties[i].Display);

					var index = i;

					switch (properties[i].ElementInputType)
					{
						case ElementProperty.InputType.Book:
						{
							AddButton(134, propertiesStartingY, 5411, 5411, b => onBookEditTextButtonClick(b, index));
						}
							break;

						case ElementProperty.InputType.RadioButton:
						{
							AddRadio(
								134,
								propertiesStartingY,
								209,
								208,
								properties[i].Checked,
								(r, s) =>
								{
									if (properties[index].Callback != null)
									{
										properties[index].Callback(r, s);
									}
								});
						}
							break;

						case ElementProperty.InputType.Label:
						{
							this.AddHtmlLabel(
								134,
								propertiesStartingY,
								FontHandling.FontSize.Medium,
								false,
								false,
								false,
								Compendium.CONTENT_TEXT_WEB_COLOR,
								properties[i].Text);
						}
							break;

						case ElementProperty.InputType.Blank:
						{ }
							break;

						case ElementProperty.InputType.TextEntry:
						{
							if (properties[i].Callback != null)
							{
								AddBackground(130, propertiesStartingY, 120, 20, 9350);
								AddTextEntry(
									134,
									propertiesStartingY,
									137,
									20,
									0,
									properties[i].Text,
									(e, t) =>
									{
										if (properties[index].Callback != null)
										{
											properties[index].Callback(e, t);
										}
									});
							}
						}
							break;

						case ElementProperty.InputType.Checkbox:
						{
							AddCheck(
								134,
								propertiesStartingY,
								210,
								211,
								properties[i].Checked,
								(r, s) =>
								{
									if (properties[index].Callback != null)
									{
										properties[index].Callback(r, s);
									}
								});
						}
							break;
					}

					propertiesStartingY += 22;
				}

				if (EditorState.PropertiesCurrentPageNumber > 0)
				{
					AddButton(30, 216, 5603, 5607, onPropertyPrevPageButtonClick);
				}

				var totalPages = (properties.Count / NUMBER_OF_PROPERTIES_PER_PAGE) + 1;

				if (EditorState.PropertiesCurrentPageNumber < totalPages - 1)
				{
					AddButton(238, 216, 5601, 5605, onPropertyNextPageButtonClick);
				}

				AddImage(109, 216, 2463, 2171);
				this.AddHyperlink(
					new WebColoredHyperLink(
						new Point2D(109, 214),
						Compendium.YELLOW_TEXT_WEB_COLOR,
						false,
						false,
						false,
						(b, p) => onApplyPropertiesButtonClick(b),
						0,
						"  Apply  "));
			}
			#endregion

			#region Bottom Buttons
			AddImage(27, 496, 2463, 2171); //Save Button Background
			AddImage(189, 496, 2463, 2171); //Clone Button Background

			//Bottom Buttons
			this.AddHyperlink(
				new WebColoredHyperLink(
					new Point2D(27, 494),
					Compendium.YELLOW_TEXT_WEB_COLOR,
					false,
					false,
					false,
					(b, p) => onSavePageButtonClick(b),
					0,
					"  Save   "));

			this.AddHyperlink(
				new WebColoredHyperLink(
					new Point2D(189, 494),
					Compendium.YELLOW_TEXT_WEB_COLOR,
					false,
					false,
					false,
					(b, p) => onSaveAsButtonClick(b),
					0,
					" Save As..."));
			#endregion

			#region Image Elements Toolbar
			var startingRegElementIdx = EditorState.ElementToolbarPageNumber * NUMBER_OF_REGISTERED_ELEMENTS_PER_PAGE;
			for (var i = startingRegElementIdx;
				i < g_registeredElements.Count && i < startingRegElementIdx + NUMBER_OF_REGISTERED_ELEMENTS_PER_PAGE;
				++i)
			{
				var x = i - startingRegElementIdx < NUMBER_OF_REGISTERED_ELEMENTS_PER_COLUMN ? 55 : 147;
				var y = i - startingRegElementIdx < NUMBER_OF_REGISTERED_ELEMENTS_PER_COLUMN
					? 385 + ((i - startingRegElementIdx) * 20)
					: 385 + ((i - startingRegElementIdx - NUMBER_OF_REGISTERED_ELEMENTS_PER_COLUMN) * 20);

				AddImage(x, y, 2466, 2171); //TextButton Background
				this.AddHyperlink(
					new WebColoredHyperLink(
						new Point2D(x, y),
						Compendium.YELLOW_TEXT_WEB_COLOR,
						false,
						false,
						false,
						onAddElementButtonClick,
						i,
						g_registeredElements.ElementAt(i).Value.DisplayName)); //Item Label
			}

			if (EditorState.ElementToolbarPageNumber > 0)
			{
				AddButton(30, 426, 5603, 5607, onElementPrevPageButtonClick);
			}

			var totalElementPages =
				(int)Math.Ceiling(g_registeredElements.Count / (double)NUMBER_OF_REGISTERED_ELEMENTS_PER_PAGE);

			if (EditorState.ElementToolbarPageNumber < totalElementPages - 1)
			{
				AddButton(239, 426, 5601, 5605, onElementNextPageButtonClick);
			}
			#endregion

			#region Navigation
			AddImageTiled(87, 247, 1, 113, 2623); //Navigation Left Border
			AddImageTiled(88, 247, 108, 1, 2621); //Navigation Top Border
			AddImageTiled(88, 359, 108, 1, 2621); //Navigation Bottom Border
			AddImageTiled(196, 247, 1, 113, 2623); //Navigation Right Border

			//Navigation Buttons
			if (EditorState.SelectedElement != null)
			{
				AddButton(152, 296, 5601, 5605, b => onNavigateButtonClick(b, NavButtonDirection.Right));
				//NavRight Button
				AddButton(117, 296, 5603, 5607, b => onNavigateButtonClick(b, NavButtonDirection.Left));
				//NavLeft Button
				AddButton(135, 314, 5602, 5606, b => onNavigateButtonClick(b, NavButtonDirection.Down));
				//NavDown Button
				AddButton(135, 279, 5600, 5604, b => onNavigateButtonClick(b, NavButtonDirection.Up));
				//NavUp Button
				AddButton(092, 296, 5603, 5607, b => onNavigateButtonClick(b, NavButtonDirection.LeftLeft));
				//NavLeft3 Button
				AddButton(176, 296, 5601, 5605, b => onNavigateButtonClick(b, NavButtonDirection.RightRight));
				//NavRight3 Button
				AddButton(135, 339, 5602, 5606, b => onNavigateButtonClick(b, NavButtonDirection.DownDown));
				//NavDown3 Button
				AddButton(135, 255, 5600, 5604, b => onNavigateButtonClick(b, NavButtonDirection.UpUp));
				//NavUp3 Button
				AddButton(169, 296, 5601, 5605, b => onNavigateButtonClick(b, NavButtonDirection.RightRight));
				//NavRight2 Button
				AddButton(135, 332, 5602, 5606, b => onNavigateButtonClick(b, NavButtonDirection.DownDown));
				//NavDown2 Button
				AddButton(135, 262, 5600, 5604, b => onNavigateButtonClick(b, NavButtonDirection.UpUp));
				//NavUp2 Button
				AddButton(099, 296, 5603, 5607, b => onNavigateButtonClick(b, NavButtonDirection.LeftLeft));
				//NavLeft2 Button
			}
			else
			{
				AddImage(152, 296, 5601, 1101); //NavRight Button
				AddImage(117, 296, 5603, 1101); //NavLeft Button
				AddImage(135, 314, 5602, 1101); //NavDown Button
				AddImage(135, 279, 5600, 1101); //NavUp Button
				AddImage(092, 296, 5603, 1101); //NavLeft3 Button
				AddImage(176, 296, 5601, 1101); //NavRight3 Button
				AddImage(135, 339, 5602, 1101); //NavDown3 Button
				AddImage(135, 255, 5600, 1101); //NavUp3 Button
				AddImage(169, 296, 5601, 1101); //NavRight2 Button
				AddImage(135, 332, 5602, 1101); //NavDown2 Button
				AddImage(135, 262, 5600, 1101); //NavUp2 Button
				AddImage(099, 296, 5603, 1101); //NavLeft2 Button
			}

			AddButton(136, 295, GRID_BUTTON_ID, GRID_BUTTON_ID, b => onOpenGridButtonClick(b, 0));
			#endregion

			AddButton(250, 15, 5003, 5003, onGumpCloseButtonClick); //Browser Close Button
		}
Пример #52
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            base.CompileLayout(layout);

            layout.Add(
                "background/header/base",
                () =>
            {
                AddBackground(0, 0, Width, 50, 9270);
                AddImageTiled(10, 10, Width - 20, 30, 2624);
                //AddAlphaRegion(10, 10, Width - 20, 30);
            });

            layout.Add(
                "button/header/options",
                () =>
            {
                AddButton(15, 15, 2008, 2007, ShowOptionMenu);
                AddTooltip(1015326);
            });

            layout.Add(
                "button/header/minimize",
                () =>
            {
                if (Minimized)
                {
                    AddButton(Width - 30, 20, 10740, 10742, Maximize);
                    AddTooltip(3002086);
                }
                else
                {
                    AddButton(Width - 30, 20, 10741, 10742, Minimize);
                    AddTooltip(3002085);
                }
            });

            layout.Add(
                "label/header/title",
                () => AddLabelCropped(90, 15, Width - 135, 20, GetTitleHue(), String.IsNullOrEmpty(Title) ? "Panel View" : Title));

            if (Minimized)
            {
                return;
            }

            layout.Add(
                "background/body/base",
                () =>
            {
                AddBackground(0, 50, Width, Height, 9270);
                AddImageTiled(10, 60, Width - 20, Height - 20, 2624);
                //AddAlphaRegion(10, 60, Width - 20, Height - 20);
            });

            if (Selected == null)
            {
                layout.Add(
                    "label/list/empty",
                    () =>
                    AddLabelCropped(
                        15,
                        67,
                        Width - 30,
                        20,
                        ErrorHue,
                        String.IsNullOrEmpty(EmptyText) ? "No entry to display." : EmptyText));
            }
        }
Пример #53
0
		protected virtual void CompileHourHand(SuperGumpLayout layout, Point2D center)
		{
			layout.Add(
				"clock/hand/hour",
				() =>
				{
					var ha = 2.0f * Math.PI * (Time.Hours + Time.Minutes / 60.0f) / 12.0f;
					var hhp = center.Clone2D((int)(Radius * Math.Sin(ha) / 1.5f), (int)(-Radius * Math.Cos(ha) / 1.5f));

					AddLine(center, hhp, ColorHourHand, 3);
				});
		}
Пример #54
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            layout.Add(
                "background",
                () =>
            {
                AddBackground(0, 40, 775, 525, 2600);
                AddImage(269, 18, 1419);
                AddImage(346, 0, 1417);
                AddImage(355, 9, 9012);
                AddBackground(35, 100, 703, 413, 9270);
                AddBackground(49, 112, 676, 389, 9200);
                AddBackground(362, 119, 354, 377, 9260);

                AddLabel(59, 463, 0, @"Generate Invasion?");
                AddButton(185, 462, 247, 248, OnAccept);
            });

            layout.Add(
                "InvasionName",
                () =>
            {
                AddBackground(58, 122, 195, 66, 9260);
                AddBackground(70, 148, 171, 30, 3000);
                AddLabel(73, 132, 0, @"Invasion Name");

                AddTextEntryLimited(73, 155, 161, 24, TextHue, InvasionName, 30, (b, t) => InvasionName = t);
            });

            layout.Add(
                "Region",
                () =>
            {
                AddBackground(58, 197, 195, 66, 9260);
                AddBackground(70, 223, 171, 30, 3000);
                AddLabel(73, 207, 0, @"Region to Invade");

                AddTextEntryLimited(73, 231, 161, 24, TextHue, InvasionRegion, 20, (b, t) => InvasionRegion = t);
            });

            /*layout.Add(
             *  "InvaderTitles",
             *  () =>
             *  {
             *      AddBackground(58, 272, 195, 66, 9260);
             *      AddBackground(70, 299, 171, 30, 3000);
             *      AddLabel(73, 283, 0, @"Invader Titles");
             *
             *      AddTextEntryLimited(73, 308, 161, 24, TextHue, InvaderTitles, 20, (b, t) => InvaderTitles = t);
             *  });*/

            layout.Add(
                "Gates",
                () =>
            {
                AddLabel(60, 280, 0, @"Spawn moongates in towns?");

                AddCheck(240, 281, 210, 211, false, (b, t) => Gates = t);
            });

            layout.Add(
                "LevelsCategory",
                () =>
            {
                AddLabel(390, 131, 0, @"Levels");

                AddLabel(383, 156, 0, @"Level");
                AddLabel(428, 156, 0, @"Creatures");
                AddLabel(508, 156, 0, @"Duration");
                AddLabel(576, 156, 0, @"Kills");
                AddLabel(618, 156, 0, @"Edit");
                AddLabel(657, 156, 0, @"Delete");

                AddLabel(382, 444, 0, @"Create New Level?");
                AddButton(379, 462, 247, 248, b => Send(new EditLevelUI(User, Hide(true), NewLevel)
                {
                    AcceptHandler = a =>
                    {
                        if (NewLevel != null && NewLevel.Creatures.Count > 0 && NewLevel.SpawnAmount > 0 &&
                            (NewLevel.TimeLimit.TotalHours > 0 || NewLevel.KillAmount > 0))
                        {
                            Levels.Add(NewLevel);
                            NewLevel = new Level(TimeSpan.Zero, 0, 0, null, 0);
                        }
                        Refresh(true);
                    },
                    CancelHandler = c => Refresh(true)
                }));
            });

            Dictionary <int, Level> range = GetListRange();

            if (range.Count > 0)
            {
                CompileEntryLayout(layout, range);
            }
        }
Пример #55
0
		protected virtual void CompileSecondHand(SuperGumpLayout layout, Point2D center)
		{
			layout.Add(
				"clock/hand/second",
				() =>
				{
					var sa = 2.0f * Math.PI * Time.Seconds / 60.0f;
					var shp = center.Clone2D((int)(Radius * Math.Sin(sa)), (int)(-Radius * Math.Cos(sa)));

					AddLine(center, shp, ColorSecondHand, 1);
				});
		}
Пример #56
0
        private void CompilePlayLayout(SuperGumpLayout layout)
        {
            layout.Add(
                "window/play",
                () =>
            {
                AddBackground(133, 100, 450, 350, 9200);
                AddBackground(142, 130, 435, 315, 9300);
            });

            layout.Add(
                "window/play/info",
                () =>
            {
                if (Engine.State == TrapSweeperState.Lose)
                {
                    AddImage(325, 55, 7034, 34);
                    AddImage(270, 32, 50562);
                }
                else
                {
                    AddImage(325, 55, 7034);
                }

                AddImage(230, 60, 30082, HighlightHue);
                AddImage(315, 45, 30061, HighlightHue);
                AddImage(390, 60, 30080, HighlightHue);
            });

            layout.Add(
                "window/play/info/traps",
                () =>
            {
                AddImage(260, 50, 20999);
                AddBackground(185, 50, 75, 44, 9300);

                var count = Engine.Traps - Engine.Marked;

                AddHtml(185, 65, 75, 40, count.ToString("#,0").WrapUOHtmlCenter(), false, false);
            });

            layout.Add(
                "window/play/info/time",
                () =>
            {
                AddImage(415, 50, 23000);
                AddBackground(460, 50, 75, 44, 9300);

                TimeSpan time;

                switch (Engine.State)
                {
                case TrapSweeperState.Lose:
                    time = Engine.Ended - Engine.Started;
                    break;

                default:
                    time = DateTime.UtcNow - Engine.Started;
                    break;
                }

                AddHtml(460, 65, 75, 40, time.ToSimpleString("h:m:s").WrapUOHtmlCenter(), false, false);
            });

            layout.Add(
                "window/play/game/grid",
                () =>
            {
                var w = Engine.Width * 19;
                var h = Engine.Height * 20;

                var xo = 148 + ((418 - w) / 2);
                var yo = 137 + ((300 - h) / 2);

                foreach (var t in Engine.AllTiles())
                {
                    if (t == null)
                    {
                        return;
                    }

                    if (Engine.State == TrapSweeperState.Play && !t.Visible)
                    {
                        AddButton(xo + (t.X * 19), yo + (t.Y * 20), t.Marked ? t.MarkID : t.HiddenID, t.ClickID, b => t.Click());
                    }
                    else
                    {
                        AddImage(xo + (t.X * 19), yo + (t.Y * 20), t.DisplayID, t.Hue);
                    }

                    AddImage(xo + (t.X * 19), yo + (t.Y * 20), 9028, t.Marked ? HighlightHue : 0);
                }
            });

            switch (Engine.State)
            {
            case TrapSweeperState.Play:
            {
                layout.Add(
                    "window/play/mark",
                    () =>
                    {
                        var text = "MARK";

                        text = text.WrapUOHtmlBold().WrapUOHtmlCenter().WrapUOHtmlColor(Color.PaleGoldenrod, false);

                        AddHtml(45, 355, 80, 40, text, false, false);
                        AddButton(50, 380, 7031, 7031, b => Engine.DoMark());

                        if (Engine.Mark)
                        {
                            AddImage(50, 380, 7031, HighlightHue);
                        }
                    });
            }
            break;

            case TrapSweeperState.Win:
            {
                layout.Add("window/play/results", () => AddAlphaRegion(142, 130, 435, 315));

                layout.Add(
                    "window/play/collect",
                    () =>
                    {
                        var text = "COLLECT";

                        text = text.WrapUOHtmlBold().WrapUOHtmlCenter().WrapUOHtmlColor(Color.LawnGreen, false);

                        AddHtml(45, 355, 80, 40, text, false, false);
                        AddButton(50, 380, 7012, 7012, b => Engine.DoCollect());
                        AddImage(50, 380, 7012, 85);
                    });
            }
            break;

            case TrapSweeperState.Lose:
            {
                layout.Add(
                    "window/play/menu",
                    () =>
                    {
                        var text = "RESURRECT";

                        text = text.WrapUOHtmlBold().WrapUOHtmlCenter().WrapUOHtmlColor(Color.Orange, false);

                        AddHtml(45, 355, 80, 40, text, false, false);
                        AddButton(50, 380, 7007, 7007, b => Engine.DoMenu());
                        AddImage(50, 380, 7007, HighlightHue);
                    });

                layout.Add(
                    "window/play/blood",
                    () =>
                    {
                        AddItem(65, 73, 7572);
                        AddItem(273, 59, 7574);
                        AddItem(348, 58, 4655);
                        AddItem(599, 37, 7573);
                        AddItem(585, 310, 4652);
                        AddItem(603, 327, 4653);
                        AddItem(594, 450, 4650);
                    });
            }
            break;
            }
        }
Пример #57
0
		protected virtual void CompileNumeral(SuperGumpLayout layout, Point2D center, int num)
		{
			layout.Add(
				"clock/numeral/" + num,
				() =>
				{
					var x = center.X - (RomanNumerals ? 20 : 10);
					x += (int)(-1 * (Radius * Math.Cos((Math.PI / 180.0f) * (num * 30 + 90))));

					var y = center.Y - 10;
					y += (int)(-1 * (Radius * Math.Sin((Math.PI / 180.0f) * (num * 30 + 90))));

					var n = GetNumeralString(num).WrapUOHtmlCenter().WrapUOHtmlColor(ColorNumerals);

					AddHtml(x, y, RomanNumerals ? 40 : 20, 40, n, false, false);
				});
		}
Пример #58
0
        private void CompileMenuLayout(SuperGumpLayout layout)
        {
            layout.Add(
                "window/menu/start",
                () =>
            {
                AddImage(354, 256, 4501, HighlightHue);
                AddButton(351, 254, 4501, 4501, b => Engine.DoPlay());

                AddHtml(
                    140,
                    300,
                    435,
                    40,
                    "START SWEEPING!".WrapUOHtmlBold().WrapUOHtmlCenter().WrapUOHtmlColor(Color.Gold, false),
                    false,
                    false);
            });

            layout.Add(
                "window/menu/option/easy",
                () =>
            {
                var s = false;

                // EASY
                if (Engine.Mode != TrapSweeperMode.Easy)
                {
                    AddImage(155, 330, 1417);
                    AddButton(164, 339, 5575, 5576, b => Engine.DoMode(TrapSweeperMode.Easy));
                    AddButton(145, 420, 5403, 5403, b => Engine.DoMode(TrapSweeperMode.Easy));
                }
                else
                {
                    AddImage(155, 330, 1417, HighlightHue);
                    AddImage(164, 339, 5576);

                    s = true;
                }

                var text = "ROOKIE";

                text = s ? text.WrapUOHtmlTag("U") : text;
                text = text.WrapUOHtmlBig().WrapUOHtmlCenter().WrapUOHtmlColor(Color.Green, false);

                AddBackground(145, 415, 100, 30, 9350);
                AddHtml(145, 420, 100, 40, text, false, false);
            });

            layout.Add(
                "window/menu/option/normal",
                () =>
            {
                var s = false;

                // NORMAL
                if (Engine.Mode != TrapSweeperMode.Normal)
                {
                    AddImage(262, 330, 1417);
                    AddButton(271, 339, 5587, 5588, b => Engine.DoMode(TrapSweeperMode.Normal));
                    AddButton(252, 420, 5403, 5403, b => Engine.DoMode(TrapSweeperMode.Normal));
                }
                else
                {
                    AddImage(262, 330, 1417, HighlightHue);
                    AddImage(271, 339, 5588);

                    s = true;
                }

                var text = "GUARD";

                text = s ? text.WrapUOHtmlTag("U") : text;
                text = text.WrapUOHtmlBig().WrapUOHtmlCenter().WrapUOHtmlColor(Color.Yellow, false);

                AddBackground(252, 415, 100, 30, 9350);
                AddHtml(252, 420, 100, 40, text, false, false);
            });

            layout.Add(
                "window/menu/option/hard",
                () =>
            {
                var s = false;

                // HARD
                if (Engine.Mode != TrapSweeperMode.Hard)
                {
                    AddImage(368, 330, 1417);
                    AddButton(377, 339, 5547, 5548, b => Engine.DoMode(TrapSweeperMode.Hard));
                    AddButton(358, 420, 5403, 5403, b => Engine.DoMode(TrapSweeperMode.Hard));
                }
                else
                {
                    AddImage(368, 330, 1417, HighlightHue);
                    AddImage(377, 339, 5548);

                    s = true;
                }

                var text = "KNIGHT";

                text = s ? text.WrapUOHtmlTag("U") : text;
                text = text.WrapUOHtmlBig().WrapUOHtmlCenter().WrapUOHtmlColor(Color.Red, false);

                AddBackground(358, 415, 100, 30, 9350);
                AddHtml(358, 420, 100, 40, text, false, false);
            });

            layout.Add(
                "window/menu/option/random",
                () =>
            {
                var s = false;

                // RANDOM
                if (Engine.Mode != TrapSweeperMode.Random)
                {
                    AddImage(475, 330, 1417);
                    AddButton(484, 339, 5583, 5584, b => Engine.DoMode(TrapSweeperMode.Random));
                    AddButton(465, 420, 5403, 5403, b => Engine.DoMode(TrapSweeperMode.Random));
                }
                else
                {
                    AddImage(475, 330, 1417, HighlightHue);
                    AddImage(484, 339, 5584);

                    s = true;
                }

                var text = "RANDOM";

                text = s ? text.WrapUOHtmlTag("U") : text;
                text = text.WrapUOHtmlBig().WrapUOHtmlCenter().WrapUOHtmlColor(Color.Blue, false);

                AddBackground(465, 415, 100, 30, 9350);
                AddHtml(465, 420, 100, 40, text, false, false);
            });
        }
Пример #59
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            AddImage(1, 0, 2623, 1880); //Content Left Border 1
            AddImage(1, 165, 2623, 1880); //Content Left Border 2
            AddImage(2, 321, 2623, 1880); //Content Left Border 2
            AddImage(261, 0, 2625, 1880); //Content Right Border 1
            AddImage(261, 320, 2625, 1880); //Content Right Border 2
            AddImage(261, 165, 2625, 1880); //Content Right Border 2
            AddImage(6, 480, 2521, 2171); //Below Content Background 3
            AddImage(6, 512, 2627, 1880); //Bottom Border 3
            AddImage(106, 480, 2521, 2171); //Below Content Background 3
            AddImage(7, 0, 2621, 1880); //Content Top Border 3
            AddBackground(10, 11, 264, 474, 9300); //Background
            AddImageTiled(27, 45, 230, 1, 2621); //Top Line
            AddImageTiled(24, 456, 230, 1, 2621); //Bottom Line

            var elements = m_editorState.RendererToEdit.Elements.OrderBy(element => element.Z);

            int startingIdx = NUMBER_OF_ELEMENTS_PER_PAGE * m_editorState.ElementListGumpCurrentPageNumber;
            if (startingIdx > elements.Count() - 1)
            {
                startingIdx = 0;
                m_editorState.ElementListGumpCurrentPageNumber = 0;
            }

            int buttonLabelYCoord = 47;
            for (int i = startingIdx; i < startingIdx + NUMBER_OF_ELEMENTS_PER_PAGE && i < elements.Count(); ++i)
            {
                try
                {
                    this.AddHyperlink(new WebColoredHyperLink(new Point2D(28, buttonLabelYCoord),
                        elements.ElementAt(i) == m_editorState.SelectedElement ? "#FF0000" : Compendium.CONTENT_TEXT_WEB_COLOR,
                        false,
                        false,
                        elements.ElementAt(i) == m_editorState.SelectedElement ? true : false,
                        onSelectElementButtonClick, i, elements.ElementAt(i).Name));

                    //clone button(s)
                    AddButton(214, buttonLabelYCoord, 5411, 5411, GumpButtonType.Reply, onCloneButtonClick, i);
                    AddButton(208, buttonLabelYCoord + 3, 5411, 5411, GumpButtonType.Reply, onCloneButtonClick, i);
                    
                    if (elements.Count() > 1)
                    {
                        if (i != 0)
                        {
                            AddButton(238, buttonLabelYCoord + 5, 2435, 2436, GumpButtonType.Reply, onElementZOrderChangeUpButtonClick, i); //Z Order Up Button
                        }

                        if (i != m_editorState.RendererToEdit.Elements.Count - 1)
                        {
                            AddButton(248, buttonLabelYCoord + 5, 2437, 2438, GumpButtonType.Reply, onElementZOrderChangeDownButtonClick, i); //Z Order Down Button
                        }
                    }
                }
                catch (Exception e)
                {
                    Console.WriteLine(e);
                }
                buttonLabelYCoord += 20;
            }


            #region Top, Delete, and Bottom Buttons
            int selectedElementIdx = LinqHelper.FindIndex(elements, element => element == m_editorState.SelectedElement);
            if (m_editorState.SelectedElement != null && selectedElementIdx < elements.Count() - 1)
            {
                AddImage(186, 461, 2463, 2171);
                this.AddHyperlink(new WebColoredHyperLink(new Point2D(186, 460), Compendium.YELLOW_TEXT_WEB_COLOR, false, false, false,
                    onBottomButtonClick, selectedElementIdx, " Bottom"));
            }

            if (m_editorState.SelectedElement != null && selectedElementIdx > 0)
            {
                AddImage(24, 461, 2463, 2171);
                this.AddHyperlink(new WebColoredHyperLink(new Point2D(24, 460), Compendium.YELLOW_TEXT_WEB_COLOR, false, false, false,
                    onTopButtonClick, selectedElementIdx, "   Top"));
            }

            if (m_editorState.SelectedElement != null)
            {
                AddImage(105, 461, 2463, 2171);
                this.AddHyperlink(new WebColoredHyperLink(new Point2D(105, 460), Compendium.YELLOW_TEXT_WEB_COLOR, false, false, false,
                    onDeleteButtonClick, selectedElementIdx, "  Delete  "));
            }
            #endregion


            #region Page Navigator

            if (m_editorState.ElementListGumpCurrentPageNumber > 0)
            {
                AddButton(12, 495, 5603, 5607, GumpButtonType.Reply, onPrevPageButtonClick, 0); //Next page Button
                AddLabel(34, 492, 47, @"Previous"); //Previous Page Label
            }
            else
            {
                AddImage(12, 495, 5603, 901); //Previous Page Button
                AddLabel(34, 492, 901, @"Previous"); //Previous Page Label
            }

            int totalpages = (int)Math.Ceiling((double)m_editorState.RendererToEdit.Elements.Count / (double)NUMBER_OF_ELEMENTS_PER_PAGE);

            if (m_editorState.ElementListGumpCurrentPageNumber < totalpages - 1)
            {
                AddButton(255, 495, 5601, 5605, GumpButtonType.Reply, onNextPageButtonClick, 0); //Next page Button
                AddLabel(222, 492, 47, @"Next"); //Next Page Label
            }
            else
            {
                AddImage(255, 495, 5601, 901); //Previous Page Button
                AddLabel(222, 492, 901, @"Next"); //Next Page Label
            }

            AddLabel(128, 493, 47, string.Format("{0} of {1}", m_editorState.ElementListGumpCurrentPageNumber + 1, Math.Max(1,totalpages))); //Page Number Label

            AddLabel(116, 18, 47, @"Z Order"); //Z Order heading Label
            #endregion
        }
Пример #60
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            layout.Add(
                "background",
                () =>
            {
                AddBackground(0, 57, 740, 513, 9200);
                AddImageTiled(4, 60, 21, 507, 10464);
                AddImageTiled(715, 61, 21, 507, 10464);
                AddImage(708, 0, 10441, 1160);
                AddImage(342, 19, 9000, 1160);
                AddItem(337, 68, 9935, 1161);
                AddItem(360, 68, 9934, 1161);
                AddImageTiled(43, 151, 325, 1, 5410);
                AddLabel(195, 135, 137, @"Battles Tournament Rewards");
                AddLabel(49, 135, 1258, @"Ultima Online Forever:");

                AddLabel(528, 69, 137, @"Battle Tournament Points");
                AddImageTiled(530, 85, 161, 1, 5410);

                if (UserProfile.SpendablePoints.ToString().Length == 1)
                {
                    AddLabel(608, 96, 2049, UserProfile.SpendablePoints.ToString());
                }
                else if (UserProfile.SpendablePoints.ToString().Length == 2)
                {
                    AddLabel(605, 96, 2049, UserProfile.SpendablePoints.ToString());
                }
                else if (UserProfile.SpendablePoints.ToString().Length == 3)
                {
                    AddLabel(602, 96, 2049, UserProfile.SpendablePoints.ToString());
                }
                else if (UserProfile.SpendablePoints.ToString().Length == 4)
                {
                    AddLabel(599, 96, 2049, UserProfile.SpendablePoints.ToString());
                }
                else
                {
                    AddLabel(596, 96, 2049, UserProfile.SpendablePoints.ToString());
                }
            });

            layout.Add(
                "tierrewards",
                () =>
            {
                AddImageTiled(35, 184, 207, 1, 5410);
                AddLabel(36, 167, 1258, @"1st Tier Rewards");
                AddLabel(168, 166, 1258, @"[25 Pts]");

                AddLabel(36, 193, 0, @"Battleborn Skin Dye: Red");
                AddItem(212, 193, 2540, 1157);
                AddButton(253, 192, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                {
                    if (UserProfile.SpendablePoints >= 25)
                    {
                        UserProfile.SpendablePoints -= 25;
                        var dye = new BattlesPaint(1157);
                        if (User.BankBox != null)
                        {
                            User.BankBox.DropItem(dye);
                        }
                        User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                        Refresh(true);
                    }
                    else
                    {
                        User.SendMessage(54,
                                         "You do not have enough spendable battle points to purchase this item.");
                        Refresh(true);
                    }
                })
                {
                    Title     = "Confirm Purchase",
                    Html      = "Are you sure you wish to purchase: Battleborn Skin Dye: Red for 25 Points?",
                    HtmlColor = DefaultHtmlColor
                }.Send());

                AddLabel(36, 216, 0, @"Battleborn Skin Dye: Shadow");
                AddItem(212, 217, 2540, 2019);
                AddButton(253, 216, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                {
                    if (UserProfile.SpendablePoints >= 25)
                    {
                        UserProfile.SpendablePoints -= 25;
                        var dye = new BattlesPaint(1175);
                        if (User.BankBox != null)
                        {
                            User.BankBox.DropItem(dye);
                        }
                        User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                        Refresh(true);
                    }
                    else
                    {
                        User.SendMessage(54,
                                         "You do not have enough spendable battle points to purchase this item.");
                        Refresh(true);
                    }
                })
                {
                    Title     = "Confirm Purchase",
                    Html      = "Are you sure you wish to purchase: Battleborn Skin Dye: Shadow for 25 Points?",
                    HtmlColor = DefaultHtmlColor
                }.Send());

                AddImageTiled(35, 262, 207, 1, 5410);
                AddLabel(36, 245, 1258, @"2nd Tier Rewards");
                AddLabel(168, 244, 1258, @"[75 Pts]");

                AddLabel(36, 269, 1194, @"Title Hue: #1195");
                AddItem(212, 271, 10289, 1195);
                AddButton(253, 269, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                {
                    if (UserProfile.SpendablePoints >= 75)
                    {
                        UserProfile.SpendablePoints -= 75;
                        var scroll = new HueScroll(1195);
                        if (User.BankBox != null)
                        {
                            User.BankBox.DropItem(scroll);
                        }
                        User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                        Refresh(true);
                    }
                    else
                    {
                        User.SendMessage(54,
                                         "You do not have enough spendable battle points to purchase this item.");
                        Refresh(true);
                    }
                })
                {
                    Title     = "Confirm Purchase",
                    Html      = "Are you sure you wish to purchase: Title Hue: #1195 for 75 Points?",
                    HtmlColor = DefaultHtmlColor
                }.Send());

                AddLabel(36, 296, 1281, @"Title Hue: #1282");
                AddItem(212, 298, 10289, 1195);
                AddButton(253, 296, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                {
                    if (UserProfile.SpendablePoints >= 75)
                    {
                        UserProfile.SpendablePoints -= 75;
                        var scroll = new HueScroll(1282);
                        if (User.BankBox != null)
                        {
                            User.BankBox.DropItem(scroll);
                        }
                        User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                        Refresh(true);
                    }
                    else
                    {
                        User.SendMessage(54,
                                         "You do not have enough spendable battle points to purchase this item.");
                        Refresh(true);
                    }
                })
                {
                    Title     = "Confirm Purchase",
                    Html      = "Are you sure you wish to purchase: Title Hue: #1282 for 75 Points?",
                    HtmlColor = DefaultHtmlColor
                }.Send());

                AddImageTiled(35, 340, 207, 1, 5410);
                AddLabel(35, 323, 1258, @"3rd Tier Rewards");
                AddLabel(168, 322, 1258, @"[150 Pts]");

                AddLabel(35, 348, 0, @"Title: The Gladiator");
                AddItem(212, 349, 10289, 1195);
                AddButton(253, 347, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                {
                    if (UserProfile.SpendablePoints >= 150)
                    {
                        UserProfile.SpendablePoints -= 150;
                        var scroll = new TitleScroll("The Gladiator");
                        if (User.BankBox != null)
                        {
                            User.BankBox.DropItem(scroll);
                        }
                        User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                        Refresh(true);
                    }
                    else
                    {
                        User.SendMessage(54,
                                         "You do not have enough spendable battle points to purchase this item.");
                        Refresh(true);
                    }
                })
                {
                    Title     = "Confirm Purchase",
                    Html      = "Are you sure you wish to purchase: Title: The Gladiator for 150 Points?",
                    HtmlColor = DefaultHtmlColor
                }.Send());

                AddLabel(35, 375, 0, @"Title: The Conqueror");
                AddItem(212, 377, 10289, 1195);
                AddButton(253, 374, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                {
                    if (UserProfile.SpendablePoints >= 150)
                    {
                        UserProfile.SpendablePoints -= 150;
                        var scroll = new TitleScroll("The Conqueror");
                        if (User.BankBox != null)
                        {
                            User.BankBox.DropItem(scroll);
                        }
                        User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                        Refresh(true);
                    }
                    else
                    {
                        User.SendMessage(54,
                                         "You do not have enough spendable battle points to purchase this item.");
                        Refresh(true);
                    }
                })
                {
                    Title     = "Confirm Purchase",
                    Html      = "Are you sure you wish to purchase: Title: The Conqueror for 150 Points?",
                    HtmlColor = DefaultHtmlColor
                }.Send());

                AddImageTiled(34, 420, 207, 1, 5410);
                AddLabel(35, 403, 1258, @"4th Tier Rewards");
                AddLabel(168, 402, 1258, @"[300 Pts]");

                AddLabel(36, 425, 0, @"Battleborn Hair Dye: Red");
                AddItem(221, 428, 6195);
                AddButton(253, 425, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                {
                    if (UserProfile.SpendablePoints >= 300)
                    {
                        UserProfile.SpendablePoints -= 300;
                        var reward = new BattleBornHairDye();
                        if (User.BankBox != null)
                        {
                            User.BankBox.DropItem(reward);
                        }
                        User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                        Refresh(true);
                    }
                    else
                    {
                        User.SendMessage(54,
                                         "You do not have enough spendable battle points to purchase this item.");
                        Refresh(true);
                    }
                })
                {
                    Title     = "Confirm Purchase",
                    Html      = "Are you sure you wish to purchase: Battleborn Hair Dye: Red for 300 Points?",
                    HtmlColor = DefaultHtmlColor
                }.Send());

                AddLabel(36, 452, 0, @"Battleborn Beard Dye: Red");
                AddItem(203, 454, 6191);
                AddButton(253, 452, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                {
                    if (UserProfile.SpendablePoints >= 300)
                    {
                        UserProfile.SpendablePoints -= 300;
                        var reward = new BattleBornBeardDye();
                        if (User.BankBox != null)
                        {
                            User.BankBox.DropItem(reward);
                        }
                        User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                        Refresh(true);
                    }
                    else
                    {
                        User.SendMessage(54,
                                         "You do not have enough spendable battle points to purchase this item.");
                        Refresh(true);
                    }
                })
                {
                    Title     = "Confirm Purchase",
                    Html      = "Are you sure you wish to purchase: Battleborn Beard Dye: Red for 300 Points?",
                    HtmlColor = DefaultHtmlColor
                }.Send());

                AddImageTiled(35, 496, 207, 1, 5410);
                AddLabel(35, 479, 1258, @"Fifth Tier Rewards");
                AddLabel(168, 478, 1258, @"[350 Pts]");

                AddLabel(35, 502, 0, @"Mungbat[Pet]: Red");
                AddItem(193, 499, 8441, 1157);
                AddButton(253, 502, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                {
                    if (UserProfile.SpendablePoints >= 350)
                    {
                        if (User.Followers == 0)
                        {
                            UserProfile.SpendablePoints -= 350;
                            var mungbat = new Mungbat
                            {
                                ControlMaster = User,
                                Controlled    = true,
                                IsBonded      = true,
                                Hue           = 1157
                            };
                            mungbat.MoveToWorld(User.Location, User.Map);
                            Refresh(true);
                        }
                        else
                        {
                            User.SendMessage(54, "You must stable your pets before claiming this prize.");
                        }

                        Refresh(true);
                    }
                    else
                    {
                        User.SendMessage(54,
                                         "You do not have enough spendable battle points to purchase this pet.");
                        Refresh(true);
                    }
                })
                {
                    Title     = "Confirm Purchase",
                    Html      = "Are you sure you wish to purchase: Mungbat[Pet]: Red for 350 Points?",
                    HtmlColor = DefaultHtmlColor
                }.Send());

                AddLabel(35, 528, 0, @"Mungbat[Pet]: Shadow");
                AddItem(221, 525, 8441, 1175);
                AddButton(253, 530, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                {
                    if (UserProfile.SpendablePoints >= 350)
                    {
                        if (User.Followers == 0)
                        {
                            UserProfile.SpendablePoints -= 350;
                            var mungbat = new Mungbat
                            {
                                ControlMaster = User,
                                Controlled    = true,
                                IsBonded      = true,
                                Hue           = 1175
                            };
                            mungbat.MoveToWorld(User.Location, User.Map);
                            Refresh(true);
                        }
                        else
                        {
                            User.SendMessage(54, "You must stable your pets before claiming this prize.");
                        }

                        Refresh(true);
                    }
                    else
                    {
                        User.SendMessage(54,
                                         "You do not have enough spendable battle points to purchase this pet.");
                        Refresh(true);
                    }
                })
                {
                    Title     = "Confirm Purchase",
                    Html      = "Are you sure you wish to purchase: Mungbat[Pet]: Shadow for 350 Points?",
                    HtmlColor = DefaultHtmlColor
                }.Send());


                AddImageTiled(431, 184, 207, 1, 5410);
                AddLabel(431, 167, 1258, @"6th Tier Rewards");
                AddLabel(544, 166, 1258, @"[450 Pts]");

                AddLabel(431, 193, 0, @"Bloodstained Gloves");
                AddItem(604, 192, 5062, 1157);
                AddButton(652, 194, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                {
                    if (UserProfile.SpendablePoints >= 450)
                    {
                        UserProfile.SpendablePoints -= 450;
                        var reward = new BloodstainedGloves();
                        if (User.BankBox != null)
                        {
                            User.BankBox.DropItem(reward);
                        }
                        User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                        Refresh(true);
                    }
                    else
                    {
                        User.SendMessage(54,
                                         "You do not have enough spendable battle points to purchase this item.");
                        Refresh(true);
                    }
                })
                {
                    Title     = "Confirm Purchase",
                    Html      = "Are you sure you wish to purchase: Bloodstained Gloves for 450 Points?",
                    HtmlColor = DefaultHtmlColor
                }.Send());

                AddLabel(431, 216, 0, @"Bloodied Axe");
                AddItem(570, 213, 11560, 1157);
                AddButton(652, 228, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                {
                    if (UserProfile.SpendablePoints >= 450)
                    {
                        UserProfile.SpendablePoints -= 450;
                        var reward = new BloodiedAxe();
                        if (User.BankBox != null)
                        {
                            User.BankBox.DropItem(reward);
                        }
                        User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                        Refresh(true);
                    }
                    else
                    {
                        User.SendMessage(54,
                                         "You do not have enough spendable battle points to purchase this item.");
                        Refresh(true);
                    }
                })
                {
                    Title     = "Confirm Purchase",
                    Html      = "Are you sure you wish to purchase: Bloodied Axe for 450 Points?",
                    HtmlColor = DefaultHtmlColor
                }.Send());


                AddImageTiled(431, 262, 207, 1, 5410);
                AddLabel(431, 245, 1258, @"7th Tier Rewards");
                AddLabel(544, 244, 1258, @"[550 Pts]");

                AddLabel(431, 269, 0, @"Binding of Battle: Red");
                AddItem(604, 274, 4230, 1157);
                AddButton(652, 269, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                {
                    if (UserProfile.SpendablePoints >= 550)
                    {
                        UserProfile.SpendablePoints -= 550;
                        var reward = new BindingofBattle {
                            Hue = 1157
                        };
                        if (User.BankBox != null)
                        {
                            User.BankBox.DropItem(reward);
                        }
                        User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                        Refresh(true);
                    }
                    else
                    {
                        User.SendMessage(54,
                                         "You do not have enough spendable battle points to purchase this item.");
                        Refresh(true);
                    }
                })
                {
                    Title     = "Confirm Purchase",
                    Html      = "Are you sure you wish to purchase: Binding of Battle: Red for 550 Points?",
                    HtmlColor = DefaultHtmlColor
                }.Send());

                AddLabel(431, 296, 0, @"Binding of Battle: Shadow");
                AddItem(604, 301, 4230, 1175);
                AddButton(652, 296, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                {
                    if (UserProfile.SpendablePoints >= 550)
                    {
                        UserProfile.SpendablePoints -= 550;
                        var reward = new BindingofBattle {
                            Hue = 1175
                        };
                        if (User.BankBox != null)
                        {
                            User.BankBox.DropItem(reward);
                        }
                        User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                        Refresh(true);
                    }
                    else
                    {
                        User.SendMessage(54,
                                         "You do not have enough spendable battle points to purchase this item.");
                        Refresh(true);
                    }
                })
                {
                    Title     = "Confirm Purchase",
                    Html      = "Are you sure you wish to purchase: Binding of Battle: Shadow for 550 Points?",
                    HtmlColor = DefaultHtmlColor
                }.Send());

                AddImageTiled(431, 340, 207, 1, 5410);
                AddLabel(431, 323, 1258, @"8th Tier Rewards");
                AddLabel(544, 322, 1258, @"[700 Pts]");

                AddLabel(431, 348, 0, @"Dragon Egg: Red");
                AddItem(604, 345, 18406, 1157);
                AddButton(652, 347, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                {
                    if (UserProfile.SpendablePoints >= 700)
                    {
                        UserProfile.SpendablePoints -= 700;
                        var reward = new EvolutionEgg(1157);
                        if (User.BankBox != null)
                        {
                            User.BankBox.DropItem(reward);
                        }
                        User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                        Refresh(true);
                    }
                    else
                    {
                        User.SendMessage(54,
                                         "You do not have enough spendable battle points to purchase this item.");
                        Refresh(true);
                    }
                })
                {
                    Title     = "Confirm Purchase",
                    Html      = "Are you sure you wish to purchase: Dragon Egg: Red for 700 Points?",
                    HtmlColor = DefaultHtmlColor
                }.Send());

                AddLabel(431, 375, 0, @"Dragon Egg: Shadow");
                AddItem(604, 384, 18406, 1175);
                AddButton(651, 374, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                {
                    if (UserProfile.SpendablePoints >= 700)
                    {
                        UserProfile.SpendablePoints -= 700;
                        var reward = new EvolutionEgg(1175);
                        if (User.BankBox != null)
                        {
                            User.BankBox.DropItem(reward);
                        }
                        User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                        Refresh(true);
                    }
                    else
                    {
                        User.SendMessage(54,
                                         "You do not have enough spendable battle points to purchase this item.");
                        Refresh(true);
                    }
                })
                {
                    Title     = "Confirm Purchase",
                    Html      = "Are you sure you wish to purchase: Dragon Egg: Shadow for 700 Points?",
                    HtmlColor = DefaultHtmlColor
                }.Send());

                AddImageTiled(431, 420, 207, 1, 5410);
                AddLabel(431, 403, 1258, @"9th Tier Rewards");
                AddLabel(544, 402, 1258, @"[800 Pts]");

                AddLabel(431, 425, 0, @"Decorative Sword: Red");
                AddItem(604, 428, 9934, 1157);
                AddButton(652, 425, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                {
                    if (UserProfile.SpendablePoints >= 800)
                    {
                        UserProfile.SpendablePoints -= 800;
                        var reward = new DecorativeSword {
                            Hue = 1157
                        };
                        if (User.BankBox != null)
                        {
                            User.BankBox.DropItem(reward);
                        }
                        User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                        Refresh(true);
                    }
                    else
                    {
                        User.SendMessage(54,
                                         "You do not have enough spendable battle points to purchase this item.");
                        Refresh(true);
                    }
                })
                {
                    Title     = "Confirm Purchase",
                    Html      = "Are you sure you wish to purchase: Decorative Sword: Red for 800 Points?",
                    HtmlColor = DefaultHtmlColor
                }.Send());

                AddLabel(431, 452, 0, @"Decorative Sword: Shadow");
                AddItem(604, 457, 9934, 1175);
                AddButton(652, 452, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                {
                    if (UserProfile.SpendablePoints >= 800)
                    {
                        UserProfile.SpendablePoints -= 800;
                        var reward = new DecorativeSword {
                            Hue = 1175
                        };
                        if (User.BankBox != null)
                        {
                            User.BankBox.DropItem(reward);
                        }
                        User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                        Refresh(true);
                    }
                    else
                    {
                        User.SendMessage(54,
                                         "You do not have enough spendable battle points to purchase this item.");
                        Refresh(true);
                    }
                })
                {
                    Title     = "Confirm Purchase",
                    Html      = "Are you sure you wish to purchase: Decorative Sword: Shadow for 800 Points?",
                    HtmlColor = DefaultHtmlColor
                }.Send());

                AddImageTiled(431, 496, 207, 1, 5410);
                AddLabel(431, 479, 1258, @"10th Tier Reward");
                AddLabel(544, 478, 1258, @"[1500 Pts]");

                AddLabel(431, 502, 0, @"Flesh-Bound Tome");
                AddItem(604, 503, 3834, 137);
                AddButton(652, 502, 4005, 4006, b => new DialogGump(User, this, 0, 0, null, null, 7004, a =>
                {
                    if (UserProfile.SpendablePoints >= 1500)
                    {
                        UserProfile.SpendablePoints -= 1500;
                        var reward = new FleshboundTome();
                        if (User.BankBox != null)
                        {
                            User.BankBox.DropItem(reward);
                        }
                        User.SendMessage(54, "Your purchase has been deposted to your bankbox.");
                        Refresh(true);
                    }
                    else
                    {
                        User.SendMessage(54,
                                         "You do not have enough spendable battle points to purchase this item.");
                        Refresh(true);
                    }
                })
                {
                    Title     = "Confirm Purchase",
                    Html      = "Are you sure you wish to purchase: Flesh-Bound Tome for 1500 Points?",
                    HtmlColor = DefaultHtmlColor
                }.Send());
            }
                );
        }