public static bool RefreshGump( Mobile player, ListEntry listentry )
		{
			//if this mobile has a list entry gump up
			if( player.HasGump( typeof( ListEntryGump ) ) )
			{
				ListEntryGump gump = (ListEntryGump)player.FindGump( typeof( ListEntryGump ) );
				
				//if this gump that's up is showing this list entry, or if none was specified, then refresh
				if( listentry == null || gump.ListEntry == listentry )
				{
					//then, resend this gump!
					player.SendGump( new ListEntryGump( gump ) );
					return true;
				}
			}
			
			return false;
		}
        //master constructor, with page number specified
        public ListEntryGump( Mobile owner, ListEntry listentry, int page )
            : base(50, 350)
        {
            if( !( owner is PlayerMobile ) )
            {
                return;
            }

            _Owner = (PlayerMobile)owner;
            _ListEntry = listentry;

            //clear old gumps that are up
            _Owner.CloseGump( typeof( ListEntryGump ) );

            //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( !AddListEntryListing() )
            {
                //clear old gumps that are up
                _Owner.CloseGump( typeof( ListEntryGump ) );
                return;
            }
            if( _MaxPages > 1 )
            {
                AddPageButtons();
            }

            AddControlButtons();
        }
示例#3
0
            ListEntry _ListEntry;       //reference the list entry

            //constructor
            public AddItemTarget(ListEntry listentry) : base(1, false, TargetFlags.None)
            {
                _ListEntry = listentry;
            }
示例#4
0
 //clone constructor
 //TODO: clone ItemListEntries?
 public ListEntry(ListEntry entry) : this(entry.Type, entry.ItemListEntryType, entry.Name, entry.ListItemID, entry.ListItemHue, entry.Height, entry.X, entry.Y, entry.ItemListEntries)
 {
 }
 //default first page constructor
 public ListEntryGump( Mobile owner, ListEntry listentry )
     : this(owner, listentry, 0)
 {
 }
		public void CloneItemListEntries( ListEntry sourceentry )
		{
			foreach( ItemListEntry entry in sourceentry.ItemListEntries )
			{
				ItemListEntries.Add( entry.Clone() );
			}
		}
			ListEntry _ListEntry;		//reference the list entry
			
			//constructor
			public AddItemTarget( ListEntry listentry ) :  base ( 1, false, TargetFlags.None ) 
			{
				_ListEntry = listentry;
			}
		//clone constructor 
		//TODO: clone ItemListEntries?
		public ListEntry( ListEntry entry ) : this( entry.Type, entry.ItemListEntryType, entry.Name, entry.ListItemID, entry.ListItemHue, entry.Height, entry.X, entry.Y, entry.ItemListEntries )
		{
		}