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)); }
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)); }