Team Fortress 2 Source Code as on 22/4/2020
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

59 lines
1.6 KiB

  1. //========= Copyright Valve Corporation, All rights reserved. ============//
  2. //
  3. // Purpose: Displays a leaderboard
  4. //
  5. //=============================================================================//
  6. #ifndef LEADERBOARDDIALOG_H
  7. #define LEADERBOARDDIALOG_H
  8. #ifdef _WIN32
  9. #pragma once
  10. #endif
  11. #include "basedialog.h"
  12. //-----------------------------------------------------------------------------
  13. // Purpose: Display player leaderboards
  14. //-----------------------------------------------------------------------------
  15. class CLeaderboardDialog : public CBaseDialog
  16. {
  17. DECLARE_CLASS_SIMPLE( CLeaderboardDialog, CBaseDialog );
  18. public:
  19. CLeaderboardDialog(vgui::Panel *parent);
  20. ~CLeaderboardDialog();
  21. virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
  22. virtual void ApplySettings( KeyValues *pResourceData );
  23. virtual void PerformLayout( void );
  24. virtual void OnCommand( const char *pCommand );
  25. virtual void OnKeyCodePressed( vgui::KeyCode code );
  26. virtual void HandleKeyRepeated( vgui::KeyCode code );
  27. bool GetPlayerStats( int rank, bool bFriends = false );
  28. void UpdateLeaderboard( int iNewRank );
  29. void AddLeaderboardEntry( const char **pEntries, int ct );
  30. void CleanupStats();
  31. private:
  32. vgui::Panel *m_pProgressBg;
  33. vgui::Panel *m_pProgressBar;
  34. vgui::Label *m_pProgressPercent;
  35. vgui::Label *m_pNumbering;
  36. vgui::Label *m_pUpArrow;
  37. vgui::Label *m_pDownArrow;
  38. vgui::Label *m_pBestMoments;
  39. int m_iBaseRank;
  40. int m_iActiveRank;
  41. int m_iMaxRank;
  42. int m_cColumns;
  43. int m_iRangeBase;
  44. #if defined( _X360 )
  45. XUSER_STATS_READ_RESULTS *m_pStats;
  46. #endif
  47. };
  48. #endif // LEADERBOARDDIALOG_H