コード例 #1
0
		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;
		}
コード例 #2
0
        //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)
 {
 }
コード例 #5
0
 //default first page constructor
 public ListEntryGump( Mobile owner, ListEntry listentry )
     : this(owner, listentry, 0)
 {
 }
コード例 #6
0
		public void CloneItemListEntries( ListEntry sourceentry )
		{
			foreach( ItemListEntry entry in sourceentry.ItemListEntries )
			{
				ItemListEntries.Add( entry.Clone() );
			}
		}
コード例 #7
0
			ListEntry _ListEntry;		//reference the list entry
			
			//constructor
			public AddItemTarget( ListEntry listentry ) :  base ( 1, false, TargetFlags.None ) 
			{
				_ListEntry = listentry;
			}
コード例 #8
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 )
		{
		}