//constructor public AddStashColumnGump(Mobile owner, StashEntry stashentry) : base(500, 20) { _StashEntry = stashentry; _Owner = owner; //clear old gumps that are up _Owner.CloseGump(typeof(AddStashColumnGump)); //set up the page AddPage(0); //determine page layout, sizes, and what gets displayed where DeterminePageLayout(); //add the background AddBackground(0, 0, _Width, _Height, 9270); AddImageTiled(11, 10, _Width - 23, _Height - 20, 2624); AddAlphaRegion(11, 10, _Width - 22, _Height - 20); AddTitle(); //if there was a problem when adding the property listing if (!AddColumnEntries()) { //clear old gumps that are up _Owner.CloseGump(typeof(AddStashColumnGump)); return; } }
//master constructor, with page number specified public StashEntryGump(Mobile owner, StashEntry stashentry, int page) : base(50, 350) { if (!(owner is PlayerMobile)) { return; } _Owner = (PlayerMobile)owner; _StashEntry = stashentry; _FilterButtonIDOffset = _FilterButtonsPerColumn * _StashEntry.SortData.Count; //clear old gumps that are up _Owner.CloseGump(typeof(StashEntryGump)); //set up the page AddPage(0); _Page = page; ApplyFilters(); //determine page layout, sizes, and what gets displayed where DeterminePageLayout(); //add the background AddBackground(0, 0, _Width, _Height, 9270); AddImageTiled(11, 10, _Width - 23, _Height - 20, 2624); AddAlphaRegion(11, 10, _Width - 22, _Height - 20); AddTitle(); //if there was a problem when adding the entries if (!AddStashEntryListing()) { //clear old gumps that are up _Owner.CloseGump(typeof(StashEntryGump)); return; } if (_MaxPages > 1) { AddPageButtons(); } AddControlButtons(); }
public static bool RefreshGump(Mobile player, StashEntry stashentry) { //if this mobile has a stash entry gump up if (player.HasGump(typeof(StashEntryGump))) { StashEntryGump gump = (StashEntryGump)player.FindGump(typeof(StashEntryGump)); //if this gump that's up is showing this list entry, or if none was specified, then refresh if (stashentry == null || gump.StashEntry == stashentry) { //then, resend this gump! player.SendGump(new StashEntryGump(gump)); return(true); } } return(false); }
//default first page constructor public StashEntryGump(Mobile owner, StashEntry stashentry) : this(owner, stashentry, 0) { }