Esempio n. 1
0
            protected override void CompileLayout(SuperGumpLayout layout)
            {
                base.CompileLayout(layout);

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

                layout.AddReplace("background/body/input", () => AddBackground(100, 70, Width - 120, Height - 130, 9350));

                layout.AddReplace(
                    "textentry/body/input",
                    () =>
                {
                    if (Limited)
                    {
                        AddTextEntryLimited(105, 75, Width - 130, Height - 140, TextHue, InputText, Limit, ParseInput);
                    }
                    else
                    {
                        AddTextEntry(105, 75, Width - 130, Height - 140, TextHue, InputText, ParseInput);
                    }
                });

                layout.Add("background/body/subtext", () => AddBackground(20, Height - 50, Width - 120, 30, 9350));
                layout.Add(
                    "label/body/subtext",
                    () => AddLabelCropped(25, Height - 45, Width - 130, 20, TextHue, DateTime.Now.ToSimpleString("D d M y - t@h-m@")));
            }
Esempio n. 2
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);
                });
        }
Esempio n. 3
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);
            });
        }
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            base.CompileLayout(layout);

            layout.AddReplace(
                "label/header/title",
                () => AddLabelCropped(90, 15, 185, 20, GetTitleHue(), String.IsNullOrEmpty(Title) ? DefaultTitle : Title));

            layout.AddReplace(
                "label/header/subtitle",
                () => AddLabelCropped(275, 15, 100, 20, HighlightHue, Schedules.FormatTime(DateTime.UtcNow.TimeOfDay, true)));
        }
Esempio n. 5
0
        private void CompileTitleLayout(SuperGumpLayout layout, int index, int pIndex, int xOffset, int yOffset, Title title)
        {
            layout.AddReplace(
                "button/list/select/" + index, () => AddButton(xOffset, yOffset + 2, 2224, 2224, btn => SelectEntry(btn, title)));

            layout.AddReplace(
                "label/list/entry/" + index,
                () => AddLabel(xOffset + 20, yOffset - 3, GetLabelHue(index, pIndex, title), title.ToString(User.Female)));

            if (User.AccessLevel >= AccessLevel.Administrator)
            {
                layout.Add(
                    "button/list/purge/" + index, () => AddButton(xOffset + 125, yOffset, 22150, 22151, btn => PurgeTitle(title)));
            }
        }
Esempio n. 6
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            base.CompileLayout(layout);

            layout.Add(
                "button/header/war",
                () => AddButton(
                    85,
                    15,
                    2026,
                    2025,
                    b =>
            {
                if (Parent is PvPBattleListGump)
                {
                    ((PvPBattleListGump)Parent).Refresh(true);
                }
                else if (Parent is PvPBattleCategoryListGump)
                {
                    ((PvPBattleCategoryListGump)Parent).Refresh(true);
                }
                else
                {
                    Send(new PvPBattleCategoryListGump(User, Hide(true), UseConfirmDialog));
                }
            }));

            layout.AddReplace(
                "label/header/title",
                () => AddLabelCropped(160, 15, 215, 20, GetTitleHue(), String.IsNullOrEmpty(Title) ? DefaultTitle : Title));
        }
Esempio n. 7
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            base.CompileLayout(layout);

            layout.Add(
                "button/header/war",
                () => AddButton(
                    85,
                    15,
                    2026,
                    2025,
                    b =>
            {
                PvPProfileListGump plg = Parent as PvPProfileListGump;

                if (plg == null)
                {
                    Send(new PvPProfileListGump(User, null, Hide(true), UseConfirmDialog));
                }
                else
                {
                    plg.Refresh(true);
                }
            }));

            layout.AddReplace(
                "label/header/title",
                () => AddLabelCropped(160, 15, 215, 20, GetTitleHue(), String.IsNullOrWhiteSpace(Title) ? DefaultTitle : Title));
        }
Esempio n. 8
0
        protected override void CompileEntryLayout(
            SuperGumpLayout layout,
            int length,
            int index,
            int pIndex,
            int yOffset,
            KeyValuePair <PlayerMobile, int> entry)
        {
            base.CompileEntryLayout(layout, length, index, pIndex, yOffset, entry);

            yOffset += 170;

            layout.Remove("button/list/select/" + index);
            layout.AddReplace(
                "label/list/entry/" + index,
                () => AddLabel(92, yOffset, GetLabelHue(index, pIndex, entry), entry.Key.RawName));

            layout.Add(
                "label/list/entry/points/" + index,
                () => AddLabel(355, yOffset, GetLabelHue(index, pIndex, entry), entry.Value.ToString()));

            if (pIndex < (length - 1))
            {
                layout.Remove("imagetiled/body/hsep/" + index);
            }
        }
Esempio n. 9
0
        private void CompileHueEntryLayout(
            SuperGumpLayout layout, int index, int pIndex, int xOffset, int yOffset, TitleHue hue)
        {
            layout.AddReplace(
                "button/list/select/" + index, () => AddButton(xOffset, yOffset + 2, 2224, 2224, btn => SelectEntry(btn, hue)));

            layout.AddReplace(
                "label/list/entry/" + index,
                () => AddLabel(xOffset + 20, yOffset - 3, hue.Hue - 1, "##### " + GetLabelText(index, pIndex, hue)));

            if (User.AccessLevel >= AccessLevel.Administrator)
            {
                layout.Add(
                    "button/list/purge/" + index, () => AddButton(xOffset + 125, yOffset, 22150, 22151, btn => PurgeHue(hue)));
            }
        }
Esempio n. 10
0
        protected override void CompileEntryLayout(
            SuperGumpLayout layout, int length, int index, int pIndex, int yOffset, string entry)
        {
            base.CompileEntryLayout(layout, length, index, pIndex, yOffset, entry);

            layout.AddReplace(
                "label/list/entry/" + index,
                () =>
            {
                AddHtml(
                    65,
                    2 + yOffset,
                    195,
                    20,
                    String.Format(
                        "<basefont color=#{0:X6}>{1}", GetLabelHue(index, pIndex, entry), GetLabelText(index, pIndex, entry)),
                    false,
                    false);
                AddHtml(
                    270,
                    2 + yOffset,
                    125,
                    20,
                    String.Format(
                        "<basefont color=#{0:X6}>{1}", GetCountLabelHue(index, pIndex, entry), GetCountLabelText(index, pIndex, entry)),
                    false,
                    false);
            });
        }
Esempio n. 11
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            base.CompileLayout(layout);

            layout.AddReplace(
                "label/header/title",
                () => AddLabelCropped(160, 15, 215, 20, GetTitleHue(), String.IsNullOrEmpty(Title) ? DefaultTitle : Title));
        }
Esempio n. 12
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);
            });
        }
Esempio n. 13
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);
				});
		}
Esempio n. 14
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            base.CompileLayout(layout);

            layout.Add(
                "tile/body/header/1",
                () =>
                AddLabelCropped(
                    220, 16, 165, 50, 77,
                    String.Format("[{0}]", Profile.Selected != null ? Profile.Selected.Name : "N/A")));

            if (Minimized)
            {
                return;
            }

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

            if (range.Count == 0)
            {
                layout.AddReplace(
                    "background/body/base",
                    () =>
                {
                    AddBackground(0, 55, 420, 300, 9270);
                    AddImageTiled(10, 65, 400, 280, 2624);
                });

                layout.Remove("imagetiled/body/vsep/0");
            }
            else
            {
                layout.AddReplace(
                    "background/body/base",
                    () =>
                {
                    AddBackground(0, 55, 420, 20 + (range.Count * 220), 9270);
                    AddImageTiled(10, 65, 400, (range.Count * 220), 2624);
                });

                layout.Remove("imagetiled/body/vsep/0");
            }
        }
Esempio n. 15
0
        protected override void CompileEntryLayout(
            SuperGumpLayout layout, int length, int index, int pIndex, int yOffset, PvPProfile entry)
        {
            base.CompileEntryLayout(layout, length, index, pIndex, yOffset, entry);

            layout.AddReplace(
                "label/list/entry/" + index,
                () =>
            {
                AddLabelCropped(65, 2 + yOffset, 160, 20, GetLabelHue(index, pIndex, entry), GetLabelText(index, pIndex, entry));
                AddLabelCropped(
                    225, 2 + yOffset, 150, 20, GetSortLabelHue(index, pIndex, entry), GetSortLabelText(index, pIndex, entry));
            });
        }
Esempio n. 16
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            base.CompileLayout(layout);

            layout.AddReplace(
                "buttongrid/base",
                () =>
            {
                HardwareInfo hi = ((Account)User.Account).HardwareInfo;

                int w = (hi != null ? hi.ScreenWidth : 1920) / 20;
                int h = (hi != null ? hi.ScreenHeight : 1080) / 20;

                for (int x = 0; x < w; x++)
                {
                    for (int y = 0; y < h; y++)
                    {
                        AddButton(x * 20, y * 20, 9028, 9021, OnSelectPoint);
                    }
                }
            });

            layout.AddReplace("image/marker", () => AddImage(Value.X + 5, Value.Y, 9009));
        }
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            base.CompileLayout(layout);

            layout.Remove("button/header/options");

            layout.Add("button/header/done", () => AddButton(15, 15, 248, 249, ShowOptionMenu));

            if (Minimized)
            {
                return;
            }

            layout.AddReplace("background/body/base", () => AddBackground(0, 55, 420, 330, 9270));
            layout.Remove("imagetiled/body/vsep/0");
        }
Esempio n. 18
0
        protected override void CompileEntryLayout(
            SuperGumpLayout layout, int length, int index, int pIndex, int yOffset, CoreServiceInfo entry)
        {
            base.CompileEntryLayout(layout, length, index, pIndex, yOffset, entry);

            layout.AddReplace(
                "label/list/entry/" + index,
                () =>
            {
                Version versionA = entry.Version, versionB = entry.Version;

                AddLabelCropped(65, 2 + yOffset, 150, 20, GetLabelHue(index, pIndex, entry), GetLabelText(index, pIndex, entry));
                AddLabelCropped(225, 2 + yOffset, 50, 20, (versionA < versionB) ? VersionOODHue : VersionHue, versionA.ToString(4));
                AddLabelCropped(285, 2 + yOffset, 50, 20, VersionHue, versionB.ToString(4));
            });
        }
Esempio n. 19
0
        protected override void CompileEntryLayout(
            SuperGumpLayout layout,
            int length,
            int index,
            int pIndex,
            int yOffset,
            KeyValuePair <PlayerMobile, PvPProfileHistoryEntry> entry)
        {
            base.CompileEntryLayout(layout, length, index, pIndex, yOffset, entry);

            yOffset += 30;

            layout.Remove("button/list/select/" + index);

            layout.AddReplace(
                "label/list/entry/" + index, () => AddLabel(15, yOffset, GetLabelHue(index, pIndex, entry), entry.Key.RawName));

            layout.Add(
                "label/list/entry/kills/" + index,
                () => AddLabel(125, yOffset, GetLabelHue(index, pIndex, entry), entry.Value.Kills.ToString("#,0")));

            layout.Add(
                "label/list/entry/deaths/" + index,
                () => AddLabel(175, yOffset, GetLabelHue(index, pIndex, entry), entry.Value.Deaths.ToString("#,0")));

            layout.Add(
                "label/list/entry/damagedone/" + index,
                () => AddLabel(240, yOffset, GetLabelHue(index, pIndex, entry), entry.Value.DamageDone.ToString("#,0")));

            layout.Add(
                "label/list/entry/healingdone/" + index,
                () => AddLabel(340, yOffset, GetLabelHue(index, pIndex, entry), entry.Value.HealingDone.ToString("#,0")));

            layout.Add(
                "label/list/entry/pointsgained/" + index,
                () =>
                AddLabel(
                    440,
                    yOffset,
                    GetLabelHue(index, pIndex, entry),
                    (entry.Value.PointsGained - entry.Value.PointsLost).ToString("#,0")));

            if (pIndex < (length - 1))
            {
                layout.Remove("imagetiled/body/hsep/" + index);
            }
        }
Esempio n. 20
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);
            });
        }
		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);
				});
		}
Esempio n. 22
0
        public override void CompileEntryLayout(
            SuperGumpLayout layout, int length, int index, int pIndex, int yOffset, ListGumpEntry entry)
        {
            base.CompileEntryLayout(layout, length, index, pIndex, yOffset, entry);

            layout.AddReplace(
                "button/list/select/" + index,
                () =>
            {
                CellarStyleInfo info = CellarStyles.Styles.FirstOrDefault(s => s.Name == entry.Label);

                if (info != null && info.Style != CellarStyle.None)
                {
                    AddButton(20, yOffset + 5, 1895, 1896, b => SelectEntry(b, entry));
                    AddItem(10, yOffset - 5, info.FloorTiles.GetRandom());
                }
                else
                {
                    AddButton(15, yOffset, 4006, 4007, b => SelectEntry(b, entry));
                }
            });
        }
Esempio n. 23
0
        protected override void CompileEntryLayout(
            SuperGumpLayout layout, int length, int index, int pIndex, int yOffset, ConquestState entry)
        {
            base.CompileEntryLayout(layout, length, index, pIndex, yOffset, entry);

            layout.AddReplace(
                "label/list/entry/" + index,
                () =>
            {
                AddHtml(
                    65,
                    2 + yOffset,
                    100,
                    20,
                    GetLabelText(index, pIndex, entry).WrapUOHtmlColor(GetLabelColor(index, pIndex, entry)),
                    false,
                    false);

                AddHtml(
                    175,
                    2 + yOffset,
                    85,
                    20,
                    GetTierLabelText(index, pIndex, entry).WrapUOHtmlColor(GetTierColor(index, pIndex, entry)),
                    false,
                    false);

                AddHtml(
                    270,
                    2 + yOffset,
                    125,
                    20,
                    GetProgressLabelText(index, pIndex, entry).WrapUOHtmlColor(GetProgressColor(index, pIndex, entry)),
                    false,
                    false);
            });
        }
Esempio n. 24
0
        protected override void CompileEntryLayout(
            SuperGumpLayout layout,
            int length,
            int index,
            int pIndex,
            int yOffset,
            KeyValuePair <PlayerMobile, PvPProfileHistoryEntry> entry)
        {
            base.CompileEntryLayout(layout, length, index, pIndex, yOffset, entry);

            yOffset += 30;

            layout.Add(
                "label/list/entry/crystalpoints/" + index,
                () => AddLabel(440, yOffset, GetLabelHue(index, pIndex, entry), entry.Value["Crystal Points"].ToString("#,0")));

            layout.Add(
                "label/list/entry/crystalassaults/" + index,
                () => AddLabel(555, yOffset, GetLabelHue(index, pIndex, entry), entry.Value["Crystal Steals"].ToString("#,0")));

            layout.Add(
                "label/list/entry/brazierassaults/" + index,
                () => AddLabel(680, yOffset, GetLabelHue(index, pIndex, entry), entry.Value["Brazier Captures"].ToString("#,0")));

            layout.Add(
                "label/list/entry/wallscast/" + index,
                () => AddLabel(800, yOffset, GetLabelHue(index, pIndex, entry), entry.Value["Walls Cast"].ToString("#,0")));

            layout.AddReplace(
                "label/list/entry/pointsgained/" + index,
                () =>
                AddLabel(
                    890,
                    yOffset,
                    GetLabelHue(index, pIndex, entry),
                    (entry.Value.PointsGained - entry.Value.PointsLost).ToString("#,0")));
        }
        protected override void CompileEntryLayout(
            SuperGumpLayout layout,
            int length,
            int index,
            int pIndex,
            int yOffset,
            KeyValuePair <PlayerMobile, PvPProfileHistoryEntry> entry)
        {
            base.CompileEntryLayout(layout, length, index, pIndex, yOffset, entry);

            yOffset += 30;

            layout.Add(
                "label/list/entry/flagscaptured/" + index,
                () => AddLabel(440, yOffset, GetLabelHue(index, pIndex, entry), entry.Value["Flags Captured"].ToString("#,0")));

            layout.Add(
                "label/list/entry/flagsassaulted/" + index,
                () => AddLabel(555, yOffset, GetLabelHue(index, pIndex, entry), entry.Value["Flags Stolen"].ToString("#,0")));

            layout.Add(
                "label/list/entry/flagsdefended/" + index,
                () => AddLabel(670, yOffset, GetLabelHue(index, pIndex, entry), entry.Value["Flags Returned"].ToString("#,0")));

            layout.Add(
                "label/list/entry/wallscast/" + index,
                () => AddLabel(785, yOffset, GetLabelHue(index, pIndex, entry), entry.Value["Walls Cast"].ToString("#,0")));

            layout.AddReplace(
                "label/list/entry/pointsgained/" + index,
                () =>
                AddLabel(
                    880,
                    yOffset,
                    GetLabelHue(index, pIndex, entry),
                    (entry.Value.PointsGained - entry.Value.PointsLost).ToString("#,0")));
        }
Esempio n. 26
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            base.CompileLayout(layout);

            layout.Remove("button/header/options");

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

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

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

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

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

            if (Minimized)
            {
                return;
            }

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

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

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

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

                layout.Add(
                    "sort/header/name",
                    () => AddButton(
                        12,
                        70,
                        0x853,
                        0x853,
                        b =>
                {
                    SortType = 0;
                    Refresh(true);
                }));

                layout.Add("imagetiled/header/name", () => AddImageTiled(12, 70, 120, 24, 2624));

                layout.Add("label/header/name", () => AddLabel(15, 70, GetSelectedHue(0), "Name"));

                layout.Add(
                    "sort/header/kills",
                    () => AddButton(
                        115,
                        70,
                        0x81C,
                        0x81C,
                        b =>
                {
                    SortType = 1;
                    Refresh(true);
                }));

                layout.Add("imagetiled/header/kills", () => AddImageTiled(115, 70, 90, 24, 2624));

                layout.Add("label/header/kills", () => AddLabel(125, 70, GetSelectedHue(1), "Kills"));

                layout.Add(
                    "sort/header/deaths",
                    () => AddButton(
                        170,
                        70,
                        0x81C,
                        0x81C,
                        b =>
                {
                    SortType = 2;
                    Refresh(true);
                }));

                layout.Add("imagetiled/header/deaths", () => AddImageTiled(170, 70, 90, 24, 2624));

                layout.Add("label/header/deaths", () => AddLabel(175, 70, GetSelectedHue(2), "Deaths"));

                layout.Add(
                    "sort/header/damagedone",
                    () => AddButton(
                        225,
                        70,
                        0x7d3,
                        0x7d3,
                        b =>
                {
                    SortType = 3;
                    Refresh(true);
                }));

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

                layout.Add("label/header/damagedone", () => AddLabel(240, 70, GetSelectedHue(3), "Damage Done"));

                layout.Add(
                    "sort/header/healingdone",
                    () => AddButton(
                        330,
                        70,
                        0x7d3,
                        0x7d3,
                        b =>
                {
                    SortType = 4;
                    Refresh(true);
                }));

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

                layout.Add("label/header/healingdone", () => AddLabel(335, 70, GetSelectedHue(4), "Healing Done"));

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

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

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

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

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

                layout.Remove("imagetiled/body/vsep/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.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
                    {
                        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));
        }
Esempio n. 28
0
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            layout.Add("bg", () => AddBackground(0, 0, 655, 470, 2620));
            layout.Add("bg/alpha", () => AddAlphaRegion(10, 10, 635, 450));

            layout.Add("chest/bg", () => AddImage(8, 7, 1415, 0));
            layout.Add("chest/lid", () => AddImage(8, 9, _Frames[_Frame], 0));

            if (_State != null)
            {
                return;
            }

            layout.Add(
                "frame/close",
                () => AddButton(
                    628,
                    0,
                    2640,
                    2641,
                    b =>
            {
                _ForcedClose = true;
                Close(b);
            }));

            switch (_View)
            {
            case ViewMode.Title:
                CompileTitleViewLayout(layout);
                break;

            case ViewMode.Hue:
                CompileHueViewLayout(layout);
                break;
            }

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

            if (PageCount > 1)
            {
                layout.AddReplace(
                    "widget/body/scrollbar",
                    () =>
                    AddScrollbarH(
                        410,
                        305,
                        PageCount,
                        Page,
                        PreviousPage,
                        NextPage,
                        new Rectangle2D(30, 0, 91, 13),
                        new Rectangle2D(0, 0, 28, 13),
                        new Rectangle2D(123, 0, 28, 13)));
            }

            if (range.Count == 0)
            {
                layout.Add(
                    "label/chest/noentries",
                    () =>
                    AddLabel(260, 152, 44, "You do not own any " + _SelectedRarity + (_View == ViewMode.Title ? " titles." : " hues.")));
            }
            else
            {
                CompileEntryLayout(layout, range);
            }
        }
Esempio n. 29
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));
            }
        }
Esempio n. 30
0
		protected override void CompileLayout(SuperGumpLayout layout)
		{
			base.CompileLayout(layout);

			layout.AddReplace(
				"buttongrid/base",
				() =>
				{
					HardwareInfo hi = ((Account)User.Account).HardwareInfo;

					int w = (hi != null ? hi.ScreenWidth : 1920) / 20;
					int h = (hi != null ? hi.ScreenHeight : 1080) / 20;

					for (int x = 0; x < w; x++)
					{
						for (int y = 0; y < h; y++)
						{
							AddButton(x * 20, y * 20, 9028, 9021, OnSelectPoint);
						}
					}
				});

			layout.AddReplace("image/marker", () => AddImage(Value.X + 5, Value.Y, 9009));
		}
		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");
			}
		}
		protected override void CompileEntryLayout(
			SuperGumpLayout layout,
			int length,
			int index,
			int pIndex,
			int yOffset,
			KeyValuePair<PlayerMobile, PvPProfileHistoryEntry> entry)
		{
			base.CompileEntryLayout(layout, length, index, pIndex, yOffset, entry);

			yOffset += 30;

			layout.Add(
				"label/list/entry/crystalpoints/" + index,
				() => AddLabel(440, yOffset, GetLabelHue(index, pIndex, entry), entry.Value["Crystal Points"].ToString("#,0")));

			layout.Add(
				"label/list/entry/crystalassaults/" + index,
				() => AddLabel(555, yOffset, GetLabelHue(index, pIndex, entry), entry.Value["Crystal Steals"].ToString("#,0")));

			layout.Add(
				"label/list/entry/brazierassaults/" + index,
				() => AddLabel(680, yOffset, GetLabelHue(index, pIndex, entry), entry.Value["Brazier Captures"].ToString("#,0")));

			layout.Add(
				"label/list/entry/wallscast/" + index,
				() => AddLabel(800, yOffset, GetLabelHue(index, pIndex, entry), entry.Value["Walls Cast"].ToString("#,0")));

			layout.AddReplace(
				"label/list/entry/pointsgained/" + index,
				() =>
				AddLabel(
					890,
					yOffset,
					GetLabelHue(index, pIndex, entry),
					(entry.Value.PointsGained - entry.Value.PointsLost).ToString("#,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));
		}
Esempio n. 34
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));
        }
		protected override void CompileEntryLayout(
			SuperGumpLayout layout,
			int length,
			int index,
			int pIndex,
			int yOffset,
			KeyValuePair<PlayerMobile, PvPProfileHistoryEntry> entry)
		{
			base.CompileEntryLayout(layout, length, index, pIndex, yOffset, entry);

			yOffset += 30;

			layout.Add(
				"label/list/entry/flagscaptured/" + index,
				() => AddLabel(440, yOffset, GetLabelHue(index, pIndex, entry), entry.Value["Flags Captured"].ToString("#,0")));

			layout.Add(
				"label/list/entry/flagsassaulted/" + index,
				() => AddLabel(555, yOffset, GetLabelHue(index, pIndex, entry), entry.Value["Flags Stolen"].ToString("#,0")));

			layout.Add(
				"label/list/entry/flagsdefended/" + index,
				() => AddLabel(670, yOffset, GetLabelHue(index, pIndex, entry), entry.Value["Flags Returned"].ToString("#,0")));

			layout.Add(
				"label/list/entry/wallscast/" + index,
				() => AddLabel(785, yOffset, GetLabelHue(index, pIndex, entry), entry.Value["Walls Cast"].ToString("#,0")));

			layout.AddReplace(
				"label/list/entry/pointsgained/" + index,
				() =>
				AddLabel(
					880,
					yOffset,
					GetLabelHue(index, pIndex, entry),
					(entry.Value.PointsGained - entry.Value.PointsLost).ToString("#,0")));
		}
Esempio n. 36
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(
                (entry, x, y) =>
            {
                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++;
            });
        }
        protected override void CompileLayout(SuperGumpLayout layout)
        {
            base.CompileLayout(layout);

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

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

            layout.AddReplace("button/header/minimize", () => AddButton(930, 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, 960, 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, 960, 47 + (range.Count * 30), 9270);
                    AddImageTiled(10, 65, 940, 25 + (range.Count * 30), 2624);
                });

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

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

                layout.Add("label/header/flagscaptured", () => AddLabel(440, 70, GetSelectedHue(6), "Flags Captured"));

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

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

                layout.Add("label/header/flagsassaulted", () => AddLabel(555, 70, GetSelectedHue(7), "Flags Assaulted"));

                layout.Add(
                    "sort/header/flagsdefended",
                    () => AddButton(
                        670,
                        70,
                        0x7d3,
                        0x7d3,
                        b =>
                {
                    SortType = 8;
                    Refresh(true);
                }));

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

                layout.Add("label/header/flagsdefended", () => AddLabel(670, 70, GetSelectedHue(8), "Flags Defended"));

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

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

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

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

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

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

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

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

                layout.Remove("imagetiled/body/vsep/0");
            }
        }