protected override void CompileLayout(SuperGumpLayout layout) { base.CompileLayout(layout); layout.Replace( "label/header/title", () => AddLabelCropped(90, 15, 185, 20, GetTitleHue(), String.IsNullOrEmpty(Title) ? DefaultTitle : Title)); layout.Replace( "label/header/subtitle", () => AddLabelCropped(275, 15, 100, 20, HighlightHue, Schedules.FormatTime(DateTime.UtcNow.TimeOfDay, true))); }
protected override void CompileEntryLayout( SuperGumpLayout layout, int length, int index, int pIndex, int yOffset, IVoteSite entry) { base.CompileEntryLayout(layout, length, index, pIndex, yOffset, entry); layout.Replace( "label/list/entry/" + index, () => { var text = GetLabelText(index, pIndex, entry); if (entry.Valid) { text = text.WrapUOHtmlUrl(entry.Link); AddHtml(65, 2 + yOffset, 325, 40, text, false, false); } else { AddLabelCropped(65, 2 + yOffset, 325, 20, GetLabelHue(index, pIndex, entry), text); } }); }
protected override void CompileEntryLayout( SuperGumpLayout layout, int length, int index, int pIndex, int yOffset, PvPProfile entry) { base.CompileEntryLayout(layout, length, index, pIndex, yOffset, entry); var wOffset = (Width - 10) / Columns; var xOffset = (pIndex % Columns) * wOffset; layout.Replace( "label/list/entry/" + index, () => { var ww = (wOffset - 40) / 2; var hue = GetLabelHue(index, pIndex, entry); var text = GetLabelText(index, pIndex, entry); AddLabelCropped(60 + xOffset, 2 + yOffset, ww, 20, hue, text); hue = GetSortLabelHue(index, pIndex, entry); text = GetSortLabelText(index, pIndex, entry); AddLabelCropped(60 + xOffset + ww, 2 + yOffset, ww, 20, hue, text); }); }
protected override void CompileLayout(SuperGumpLayout layout) { base.CompileLayout(layout); layout.Add( "button/header/war", () => AddButton( 85, 15, 2026, 2025, b => { var plg = Parent as PvPProfileListGump; if (plg == null) { Send(new PvPProfileListGump(User, null, Hide(true), UseConfirmDialog)); } else { plg.Refresh(true); } })); layout.Replace( "label/header/title", () => AddLabelCropped(160, 15, 215, 20, GetTitleHue(), String.IsNullOrWhiteSpace(Title) ? DefaultTitle : Title)); }
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.Replace( "button/list/select/" + index, () => { var 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)); } }); }
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 if (!AutoPvP.CMOptions.Advanced.Misc.UseCategories) { new PvPBattleListGump(User, Hide(true), "All", UseConfirmDialog).Send(); } else { new PvPBattleCategoryListGump(User, Hide(true), UseConfirmDialog).Send(); } })); layout.Replace( "label/header/title", () => AddLabelCropped(160, 15, 215, 20, GetTitleHue(), String.IsNullOrEmpty(Title) ? DefaultTitle : Title)); }
protected override void CompileLayout(SuperGumpLayout layout) { base.CompileLayout(layout); layout.Replace( "label/header/title", () => AddLabelCropped(160, 15, 215, 20, GetTitleHue(), String.IsNullOrEmpty(Title) ? DefaultTitle : Title)); }
protected override void CompileLayout(SuperGumpLayout layout) { base.CompileLayout(layout); layout.Replace( "label/header/title", () => AddLabelCropped(90, 15, 185, 20, GetTitleHue(), String.IsNullOrEmpty(Title) ? DefaultTitle : Title)); layout.Replace( "label/header/subtitle", () => { var loc = DateTime.Now.ToSimpleString("D t@h:m@ X"); var utc = DateTime.UtcNow.ToSimpleString("D t@h:m@ X"); AddLabelCropped(275, 15, 100, 20, HighlightHue, String.Format("[{0}] [{1}]", loc, utc)); }); }
protected override void CompileLayout(SuperGumpLayout layout) { base.CompileLayout(layout); layout.Replace("panel/right/overlay", () => AddImageTiled(265, 68, Width - 290, Height - 50, 2624)); layout.Add( "cpanel", () => { var x = 0; var y = Height + 43; var w = Width; AddBackground(x, y, w, 150, 9260); AddBackground(x + 15, y + 15, 234, 120, 9270); AddImageTiled(x + 25, y + 25, 214, 100, 1280); var use = String.Format("Use {0} Filter", UseOwnFilter ? "Main" : "My"); AddButton( x + 25, y + 25, 4006, 4007, b => { UseOwnFilter = !UseOwnFilter; Refresh(true); }); // Use [My|Book] Filter AddHtml(x + 60, y + 27, 164, 40, FormatText(Color.Goldenrod, use), false, false); AddButton( x + 25, y + 50, 4021, 4022, b => { Filter.Clear(); Refresh(true); }); //Clear AddHtml(x + 60, y + 52, 164, 40, FormatText(Color.OrangeRed, "Clear"), false, false); AddButton(x + 25, y + 75, 4024, 4025, Close); //Apply AddHtml(x + 60, y + 77, 164, 40, FormatText(Color.Gold, "Apply"), false, false); x += 239; AddBackground(x + 15, y + 15, w - 270, 120, 9270); AddImageTiled(x + 25, y + 25, w - 290, 100, 1280); AddHtml(x + 30, y + 25, w - 295, 100, GetFilteringText(), false, true); }); }
protected override void CompileLayout(SuperGumpLayout layout) { base.CompileLayout(layout); layout.Replace( "body/mainbutton", () => { AddButton(101, 9, 5545, 5546, MainButtonHandler); AddImage(101, 9, 5545, 2999); AddAsset(116, 24, "http://core.vita-nex.com/images/icon32b.png"); }); }
protected override void CompileLayout(SuperGumpLayout layout) { base.CompileLayout(layout); layout.Replace( "label/header/title", () => { var title = String.IsNullOrEmpty(Title) ? "Schedule Overview" : Title; AddLabelCropped(90, 15, Width - 235, 20, GetTitleHue(), title); }); layout.Replace( "label/header/subtitle", () => { var time = Selected.Now.ToSimpleString("t@h:m@ X"); AddLabelCropped(90 + (Width - 235), 15, 100, 20, HighlightHue, time); }); }
protected override void CompileEntryLayout( SuperGumpLayout layout, int length, int index, int pIndex, int yOffset, PvPBattle entry) { base.CompileEntryLayout(layout, length, index, pIndex, yOffset, entry); layout.Replace( "label/list/entry/" + index, () => { AddHtml( 65, 2 + yOffset, 125, 20, String.Format( "<basefont color=#{0:X6}>{1}", GetLabelHue(index, pIndex, entry), GetLabelText(index, pIndex, entry)), false, false); AddHtml( 200, 2 + yOffset, 60, 20, String.Format( "<basefont color=#{0:X6}>{1}", GetStateLabelHue(index, pIndex, entry), GetStateLabelText(index, pIndex, entry)), false, false); AddHtml( 270, 2 + yOffset, 125, 20, String.Format( "<basefont color=#{0:X6}>{1}", GetTimeLabelHue(index, pIndex, entry), GetTimeLabelText(index, pIndex, entry)), false, false); }); }
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.Replace("background/body/base", () => AddBackground(0, 55, 420, 330, 9270)); layout.Remove("imagetiled/body/vsep/0"); }
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; } var sup = SupportsUltimaStore; var ec = IsEnhancedClient; var bgID = ec ? 83 : sup ? 40000 : 9270; layout.Replace("background/body/base", () => AddBackground(0, 55, 420, 330, bgID)); layout.Remove("imagetiled/body/vsep/0"); }
protected override void CompileEntryLayout( SuperGumpLayout layout, int length, int index, int pIndex, int yOffset, TrashProfile entry) { base.CompileEntryLayout(layout, length, index, pIndex, yOffset, entry); layout.Replace( "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)); }); }
protected override void CompileLayout(SuperGumpLayout layout) { layout.Replace( "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.Replace( "html/header/title", () => AddHtml( 0, 0, 84, 56, String.Format( "<basefont color=#{0:X6}><center><big>{1}</big></center>", Theme.TitleLabelColor.ToRgb(), String.Format( "{0} {1}", String.IsNullOrWhiteSpace(Title) ? DefaultTitle : Title, GlobalEdit ? "[GLOBAL]" : String.Empty)), false, false)); layout.Replace( "button/header/options", () => { AddButton(84, 0, Theme.EntryOptionsN, Theme.EntryOptionsP, ShowPositionSelect); AddButton(84, 28, Theme.EntryOptionsN, Theme.EntryOptionsP, ShowOptionMenu); }); if (Minimized) { return; } var ec = IsEnhancedClient; var index = 0; State.ForEach( (x, y, entry) => { var idx = index; var loc = new Point(x, y); if (ec) { layout.Add("ec/1/" + idx, AddInputEC); } 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); })); if (ec) { layout.Add("ec/2/" + idx, AddInputEC); } index++; }); }
protected override void CompileEntryLayout( SuperGumpLayout layout, int length, int index, int pIndex, int yOffset, SkillName entry) { var sup = SupportsUltimaStore; var bgID = sup ? 40000 : 9270; 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 { 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, bgID + 4); }); } else { layout.Add("imagetiled/list/entry/" + index, () => AddImageTiled(xOffset, yOffset, 128, 28, bgID + 4)); } layout.Add( "html/list/entry/" + index, () => AddHtml( 4 + xOffset, 4 + yOffset, 120, 20, String.Format( "<center><big><basefont color=#{0:X6}>{1}</big></center>", (ushort)GetLabelHue(index, pIndex, entry), GetLabelText(index, pIndex, entry)), false, false)); }