示例#1
0
        public ComunityCollectionGump(PlayerMobile from, IComunityCollection collection, Point3D location, Section section, CollectionHuedItem item)
            : base(250, 50)
        {
            this.m_Owner = from;
            this.m_Collection = collection;
            this.m_Location = location;
            this.m_Section = section;
            this.m_Item = item;
		
            this.Closable = true;
            this.Disposable = true;
            this.Dragable = true;
            this.Resizable = false;
			
            this.AddPage(0);
			
            this.AddImage(0, 0, 0x1F40);			
            this.AddImageTiled(20, 37, 300, 308, 0x1F42);			
            this.AddImage(20, 325, 0x1F43);			
            this.AddImage(35, 8, 0x39);			
            this.AddImageTiled(65, 8, 257, 10, 0x3A);			
            this.AddImage(290, 8, 0x3B);			
            this.AddImage(32, 33, 0x2635);			
            this.AddImageTiled(70, 55, 230, 2, 0x23C5);
			
            this.AddHtmlLocalized(70, 35, 270, 20, 1072835, 0x1, false, false); // Community Collection
			
            // add pages
            if (this.m_Collection == null)
                return;
			
            this.m_Index = 0;
            this.m_Page = 1;			
						
            switch ( this.m_Section )
            {
                case Section.Donates: 
                    this.GetMax(this.m_Collection.Donations);
				
                    while (this.m_Collection.Donations != null && this.m_Index < this.m_Collection.Donations.Count)
                        this.DisplayDonationPage();
                    break;
                case Section.Rewards:
                    this.GetMax(this.m_Collection.Rewards);
					
                    while (this.m_Collection.Rewards != null && this.m_Index < this.m_Collection.Rewards.Count)
                        this.DisplayRewardPage();
                    break;
                case Section.Hues:
                    while (this.m_Item != null && this.m_Index < this.m_Item.Hues.Length)
                        this.DisplayHuePage();
                    break;
            }
        }
示例#2
0
        public CommunityCollectionGump(PlayerMobile from, IComunityCollection collection, Point3D location, Section section, CollectionHuedItem item)
            : base(250, 50)
        {
            m_Owner      = from;
            m_Collection = collection;
            m_Location   = location;
            m_Section    = section;
            m_Item       = item;

            Closable   = true;
            Disposable = true;
            Dragable   = true;
            Resizable  = false;

            AddPage(0);

            AddImage(0, 0, 0x1F40);
            AddImageTiled(20, 37, 300, 308, 0x1F42);
            AddImage(20, 325, 0x1F43);
            AddImage(35, 8, 0x39);
            AddImageTiled(65, 8, 257, 10, 0x3A);
            AddImage(290, 8, 0x3B);
            AddImage(32, 33, 0x2635);
            AddImageTiled(70, 55, 230, 2, 0x23C5);

            AddHtmlLocalized(70, 35, 270, 20, 1072835, 0x1, false, false); // Community Collection

            // add pages
            if (m_Collection == null)
            {
                return;
            }

            m_Index = 0;
            m_Page  = 1;

            switch (m_Section)
            {
            case Section.Donates:
                GetMax(m_Collection.Donations);

                while (m_Collection.Donations != null && m_Index < m_Collection.Donations.Count)
                {
                    DisplayDonationPage();
                }
                break;

            case Section.Rewards:
                GetMax(m_Collection.Rewards);

                while (m_Collection.Rewards != null && m_Index < m_Collection.Rewards.Count)
                {
                    DisplayRewardPage();
                }
                break;

            case Section.Hues:
                while (m_Item != null && m_Index < m_Item.Hues.Length)
                {
                    DisplayHuePage();
                }
                break;
            }
        }