public TokenContributersGump(TokenFundRaiser raiser, Mobile from) : base(30, 30) { m_TokenFundRaiser = raiser; m_Mobile = from; AddPage(0); AddBackground(0, 0, 250, 360, 9270); AddAlphaRegion(0, 0, 250, 360); m_TokenFundRaiser.TokenContributers.Sort(new TokenContributionComparer()); AddLabel(50, 10, 2401, String.Format("Top {0} Contributors", m_TokenFundRaiser.TokenContributers.Count > 20 ? 20 : m_TokenFundRaiser.TokenContributers.Count)); for (int i = 0; i < m_TokenFundRaiser.TokenContributers.Count && i < 20; i++) { TokenContributer contributer = (TokenContributer)m_TokenFundRaiser.TokenContributers[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); } }
public TokenContributersGump( TokenFundRaiser raiser, Mobile from ) : base( 30, 30 ) { m_TokenFundRaiser = raiser; m_Mobile = from; AddPage( 0 ); AddBackground( 0, 0, 250, 360, 9270 ); AddAlphaRegion( 0, 0, 250, 360 ); m_TokenFundRaiser.TokenContributers.Sort( new TokenContributionComparer() ); AddLabel( 50, 10, 2401, String.Format( "Top {0} Contributors", m_TokenFundRaiser.TokenContributers.Count > 20 ? 20 : m_TokenFundRaiser.TokenContributers.Count ) ); for ( int i = 0; i < m_TokenFundRaiser.TokenContributers.Count && i < 20; i++ ) { TokenContributer contributer = (TokenContributer)m_TokenFundRaiser.TokenContributers[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); } }