public DaviesLockerGump(Mobile from, DaviesLockerAddon addon) : this(from, addon, 0) { }
public DaviesLockerGump(Mobile from, DaviesLockerAddon addon, int page) : base(100, 100) { if (addon == null || addon.Deleted) { return; } AddImage(0, 0, 0x5C1); m_List = addon.Entries; m_Addon = addon; AddHtmlLocalized(10, 10, 580, 20, 1153552, AquaGreen, false, false); // <DIV ALIGN="CENTER">Davies' Locker</DIV> AddHtmlLocalized(35, 40, 35, 20, 1153554, Blue, false, false); // <DIV ALIGN="CENTER">Get</DIV> AddHtmlLocalized(78, 40, 110, 20, 1153555, Blue, false, false); // <DIV ALIGN="CENTER">Facet</DIV> AddHtmlLocalized(198, 40, 110, 20, 1153556, Blue, false, false); // <DIV ALIGN="CENTER">Level</DIV> AddHtmlLocalized(373, 40, 90, 20, 1153557, Blue, false, false); // <DIV ALIGN="CENTER">Coords</DIV> AddHtmlLocalized(473, 40, 110, 20, 1153558, Blue, false, false); // <DIV ALIGN="CENTER">Status</DIV> int perPage = 10; int totalPages = (int)Math.Ceiling(m_List.Count / 10.0); if (totalPages < 1) { totalPages = 1; } if (page < 0) { page = 0; } if (page + 1 > totalPages) { page = totalPages - 1; } m_Page = page; int start = page * perPage; AddHtmlLocalized(35, 430, 280, 20, 1153560, string.Format("{0}@{1}", m_List.Count, "500"), Blue, false, false); // Maps: ~1_NUM~ of ~2_MAX~ AddHtmlLocalized(35, 450, 280, 20, 1153561, string.Format("{0}@{1}", (page + 1).ToString(), (totalPages).ToString()), Blue, false, false); // Page ~1_CUR~ of ~2_MAX~ AddHtmlLocalized(390, 430, 100, 20, 1153553, Yellow, false, false); // <DIV ALIGN="CENTER">ADD MAPS</DIV> AddButton(350, 430, 4011, 4013, 3, GumpButtonType.Reply, 0); AddHtmlLocalized(390, 450, 100, 20, 1153562, Yellow, false, false); // <DIV ALIGN="CENTER">PAGE</DIV> AddButton(350, 450, 4014, 4016, 1, GumpButtonType.Reply, 0); AddButton(500, 450, 4005, 4007, 2, GumpButtonType.Reply, 0); AddButton(330, 453, 5603, 5607, 11, GumpButtonType.Reply, 0); AddButton(534, 453, 5601, 5605, 12, GumpButtonType.Reply, 0); int y = 73; int index = 0; for (int i = start; i >= 0 && i < m_List.Count && index < perPage; i++) { DaviesLockerEntry entry = m_List[i]; if (entry == null) { continue; } if (addon.CanUse(from)) { AddButton(45, y + 4, 1209, 1210, 1000 + i, GumpButtonType.Reply, 0); } AddHtmlLocalized(78, y, 110, 20, GetFacet(entry), Yellow, false, false); if (TreasureMapInfo.NewSystem && entry is TreasureMapEntry) { AddHtmlLocalized(174, y, 110, 20, GetPackage((TreasureMapEntry)entry), Yellow, false, false); AddHtmlLocalized(268, y, 110, 20, GetLevel((TreasureMapEntry)entry), Yellow, false, false); } else { AddHtmlLocalized(268, y, 110, 20, GetLevel(entry), Yellow, false, false); } if ((entry is TreasureMapEntry && ((TreasureMapEntry)entry).Decoder == null) || (entry is SOSEntry && !((SOSEntry)entry).Opened)) { AddHtmlLocalized(373, y, 90, 20, 1153569, Yellow, false, false); // Unknown } else { AddHtmlLocalized(373, y, 90, 20, 1060847, GetLocation(entry), Yellow, false, false); // ~1_val~ ~2_val~ } AddHtmlLocalized(473, y, 100, 20, GetStatus(entry), Yellow, false, false); y += 35; index++; } }
public InternalTarget(Mobile from, DaviesLockerAddon addon, int page) : base(-1, false, TargetFlags.None) { m_Addon = addon; m_Page = page; }
public DaviesLockerGump(Mobile from, DaviesLockerAddon addon, int page) : base(50, 50) { if (addon == null || addon.Deleted) { return; } AddImage(0, 0, 0x5C1); m_List = addon.Entries; m_Addon = addon; AddHtmlLocalized(0, 10, 600, 20, 1153552, AquaGreen, false, false); // <DIV ALIGN="CENTER">Davies' Locker</DIV> AddHtmlLocalized(30, 35, 40, 20, 1153554, Blue, false, false); // <DIV ALIGN="CENTER">Get</DIV> AddHtmlLocalized(75, 35, 120, 20, 1153555, Blue, false, false); // <DIV ALIGN="CENTER">Facet</DIV> AddHtmlLocalized(195, 35, 120, 20, 1153556, Blue, false, false); // <DIV ALIGN="CENTER">Level</DIV> AddHtmlLocalized(315, 35, 120, 20, 1153557, Blue, false, false); // <DIV ALIGN="CENTER">Coords</DIV> AddHtmlLocalized(435, 35, 120, 20, 1153558, Blue, false, false); // <DIV ALIGN="CENTER">Status</DIV> int perPage = 10; int totalPages = (int)Math.Ceiling((double)m_List.Count / 10.0); if (totalPages < 1) { totalPages = 1; } if (page < 0) { page = 0; } if (page + 1 > totalPages) { page = totalPages - 1; } m_Page = page; int start = page * perPage; AddHtmlLocalized(40, 428, 200, 20, 1153560, String.Format("{0}\t{1}", m_List.Count, "500"), Blue, false, false); // Maps: ~1_NUM~ of ~2_MAX~ AddHtmlLocalized(40, 450, 200, 20, 1153561, String.Format("{0}\t{1}", (page + 1).ToString(), (totalPages).ToString()), Blue, false, false); // Page ~1_CUR~ of ~2_MAX~ AddHtmlLocalized(380, 427, 72, 20, 1153553, Yellow, false, false); // <DIV ALIGN="CENTER">ADD MAPS</DIV> AddButton(340, 428, 4011, 4013, 1, GumpButtonType.Reply, 0); AddHtmlLocalized(377, 450, 40, 20, 1153562, Yellow, false, false); // <DIV ALIGN="CENTER">PAGE</DIV> AddButton(340, 450, 4014, 4016, 2, GumpButtonType.Reply, 0); AddButton(502, 450, 4005, 4007, 3, GumpButtonType.Reply, 0); AddImage(320, 455, 5603); AddImage(537, 455, 5601); int y = 72; int index = 0; for (int i = start; i >= 0 && i < m_List.Count && index < perPage; i++) { DaviesLockerEntry entry = m_List[i]; if (entry == null) { continue; } if (addon.CanUse(from)) { AddButton(45, y + 3, 1209, 1210, 5 + i, GumpButtonType.Reply, 0); } AddHtml(80, y, 100, 20, String.Format("<basefont color=yellow>{0}", entry.Map.ToString()), false, false); AddHtmlLocalized(205, y, 220, 20, GetLevel(entry), Yellow, false, false); if ((entry is TreasureMapEntry && ((TreasureMapEntry)entry).Decoder == null) || (entry is SOSEntry && !((SOSEntry)entry).Opened)) { AddHtmlLocalized(325, y, 100, 20, 1153569, Yellow, false, false); // Unknown } else { AddHtmlLocalized(325, y, 100, 20, 1060847, String.Format("{0}\t{1}", entry.Location.X.ToString(), entry.Location.Y.ToString()), Yellow, false, false); // ~1_val~ ~2_val~ } AddHtmlLocalized(440, y, 100, 20, GetStatus(entry), Yellow, false, false); y += 35; index++; } }
public DaviesLockerGump(Mobile from, DaviesLockerAddon addon, int page) : base(50, 50) { if (addon == null || addon.Deleted) return; AddImage(0, 0, 0x5C1); m_List = addon.Entries; m_Addon = addon; AddHtmlLocalized(0, 10, 600, 20, 1153552, AquaGreen, false, false); // <DIV ALIGN="CENTER">Davies' Locker</DIV> AddHtmlLocalized(30, 35, 40, 20, 1153554, Blue, false, false); // <DIV ALIGN="CENTER">Get</DIV> AddHtmlLocalized(75, 35, 120, 20, 1153555, Blue, false, false); // <DIV ALIGN="CENTER">Facet</DIV> AddHtmlLocalized(195, 35, 120, 20, 1153556, Blue, false, false); // <DIV ALIGN="CENTER">Level</DIV> AddHtmlLocalized(315, 35, 120, 20, 1153557, Blue, false, false); // <DIV ALIGN="CENTER">Coords</DIV> AddHtmlLocalized(435, 35, 120, 20, 1153558, Blue, false, false); // <DIV ALIGN="CENTER">Status</DIV> int perPage = 10; int totalPages = (int)Math.Ceiling((double)m_List.Count / 10.0); if (totalPages < 1) totalPages = 1; if(page < 0) page = 0; if(page + 1 > totalPages) page = totalPages - 1; m_Page = page; int start = page * perPage; AddHtmlLocalized(40, 428, 200, 20, 1153560, String.Format("{0}\t{1}", m_List.Count, "500"), Blue, false, false); // Maps: ~1_NUM~ of ~2_MAX~ AddHtmlLocalized(40, 450, 200, 20, 1153561, String.Format("{0}\t{1}", (page + 1).ToString(), (totalPages).ToString()), Blue, false, false); // Page ~1_CUR~ of ~2_MAX~ AddHtmlLocalized(380, 427, 72, 20, 1153553, Yellow, false, false); // <DIV ALIGN="CENTER">ADD MAPS</DIV> AddButton(340, 428, 4011, 4013, 1, GumpButtonType.Reply, 0); AddHtmlLocalized(377, 450, 40, 20, 1153562, Yellow, false, false); // <DIV ALIGN="CENTER">PAGE</DIV> AddButton(340, 450, 4014, 4016, 2, GumpButtonType.Reply, 0); AddButton(502, 450, 4005, 4007, 3, GumpButtonType.Reply, 0); AddImage(320, 455, 5603); AddImage(537, 455, 5601); int y = 72; int index = 0; for (int i = start; i >= 0 && i < m_List.Count && index < perPage; i++) { DaviesLockerEntry entry = m_List[i]; if (entry == null) continue; if(addon.CanUse(from)) AddButton(45, y + 3, 1209, 1210, 5 + i, GumpButtonType.Reply, 0); AddHtml(80, y, 100, 20, String.Format("<basefont color=yellow>{0}", entry.Map.ToString()), false, false); AddHtmlLocalized(205, y, 220, 20, GetLevel(entry), Yellow, false, false); if ((entry is TreasureMapEntry && ((TreasureMapEntry)entry).Decoder == null) || (entry is SOSEntry && !((SOSEntry)entry).Opened)) AddHtmlLocalized(325, y, 100, 20, 1153569, Yellow, false, false); // Unknown else AddHtmlLocalized(325, y, 100, 20, 1060847, String.Format("{0}\t{1}", entry.Location.X.ToString(), entry.Location.Y.ToString()), Yellow, false, false); // ~1_val~ ~2_val~ AddHtmlLocalized(440, y, 100, 20, GetStatus(entry), Yellow, false, false); y += 35; index++; } }