Exemplo n.º 1
0
            public ContributersGump(FundRaiser raiser, Mobile from) : base(30, 30)
            {
                m_FundRaiser = raiser;
                m_Mobile     = from;

                AddPage(0);
                AddBackground(0, 0, 250, 360, 9270);
                AddAlphaRegion(0, 0, 250, 360);

                m_FundRaiser.Contributers.Sort(new ContributionComparer());

                AddLabel(50, 10, 2401, String.Format("Top {0} Contributors", m_FundRaiser.Contributers.Count > 20 ? 20 : m_FundRaiser.Contributers.Count));

                for (int i = 0; i < m_FundRaiser.Contributers.Count && i < 20; i++)
                {
                    Contributer contributer = (Contributer)m_FundRaiser.Contributers[i];
                    AddLabel(30, 30 + i * 15, 2401, (i + 1).ToString());
                    AddLabel(50, 30 + i * 15, 2401, contributer.Mobile.Name);
                    AddLabel(170, 30 + i * 15, 2401, contributer.Amount.ToString());
                }

                if (m_Mobile.AccessLevel >= AccessLevel.GameMaster)
                {
                    AddLabel(280, 10, 2401, "Clear");
                    AddButton(250, 10, 4023, 4024, 1, GumpButtonType.Reply, 0);
                    AddLabel(280, 30, 2401, "Full List");
                    AddButton(250, 30, 4023, 4024, 2, GumpButtonType.Reply, 0);
                }
            }
Exemplo n.º 2
0
			public ContributersGump( FundRaiser raiser, Mobile from ) : base( 30, 30 )
			{
				m_FundRaiser = raiser;
				m_Mobile = from;

				AddPage( 0 );
				AddBackground( 0, 0, 250, 360, 9270 );
				AddAlphaRegion( 0, 0, 250, 360 );

				m_FundRaiser.Contributers.Sort( new ContributionComparer() );

				AddLabel( 50, 10, 2401, String.Format( "Top {0} Contributors", m_FundRaiser.Contributers.Count > 20 ? 20 : m_FundRaiser.Contributers.Count ) );

				for ( int i = 0; i < m_FundRaiser.Contributers.Count && i < 20; i++ )
				{
					Contributer contributer = (Contributer)m_FundRaiser.Contributers[i];
					AddLabel( 30, 30 + i * 15, 2401, (i + 1).ToString() );
					AddLabel( 50, 30 + i * 15, 2401, contributer.Mobile.Name );
					AddLabel( 170, 30 + i * 15, 2401, contributer.Amount.ToString() );
				}

				if ( m_Mobile.AccessLevel >= AccessLevel.GameMaster )
				{
					AddLabel( 280, 10, 2401, "Clear" );
					AddButton( 250, 10, 4023, 4024, 1, GumpButtonType.Reply, 0 );
                    AddLabel(280, 30, 2401, "Full List");
                    AddButton(250, 30, 4023, 4024, 2, GumpButtonType.Reply, 0);
                }
			}