summaryrefslogtreecommitdiff
path: root/gameui/matchmaking/leaderboarddialog.h
diff options
context:
space:
mode:
authorFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
committerFluorescentCIAAfricanAmerican <[email protected]>2020-04-22 12:56:21 -0400
commit3bf9df6b2785fa6d951086978a3e66f49427166a (patch)
tree2c0f1f0c63c4832882bc93814ebd2c2b1c6224e5 /gameui/matchmaking/leaderboarddialog.h
downloadarchived-source-engine-2018-hl2-src-master.tar.xz
archived-source-engine-2018-hl2-src-master.zip
Diffstat (limited to 'gameui/matchmaking/leaderboarddialog.h')
-rw-r--r--gameui/matchmaking/leaderboarddialog.h59
1 files changed, 59 insertions, 0 deletions
diff --git a/gameui/matchmaking/leaderboarddialog.h b/gameui/matchmaking/leaderboarddialog.h
new file mode 100644
index 0000000..6fd646f
--- /dev/null
+++ b/gameui/matchmaking/leaderboarddialog.h
@@ -0,0 +1,59 @@
+//========= Copyright Valve Corporation, All rights reserved. ============//
+//
+// Purpose: Displays a leaderboard
+//
+//=============================================================================//
+
+#ifndef LEADERBOARDDIALOG_H
+#define LEADERBOARDDIALOG_H
+#ifdef _WIN32
+#pragma once
+#endif
+
+#include "basedialog.h"
+
+//-----------------------------------------------------------------------------
+// Purpose: Display player leaderboards
+//-----------------------------------------------------------------------------
+class CLeaderboardDialog : public CBaseDialog
+{
+ DECLARE_CLASS_SIMPLE( CLeaderboardDialog, CBaseDialog );
+
+public:
+ CLeaderboardDialog(vgui::Panel *parent);
+ ~CLeaderboardDialog();
+
+ virtual void ApplySchemeSettings( vgui::IScheme *pScheme );
+ virtual void ApplySettings( KeyValues *pResourceData );
+ virtual void PerformLayout( void );
+ virtual void OnCommand( const char *pCommand );
+ virtual void OnKeyCodePressed( vgui::KeyCode code );
+ virtual void HandleKeyRepeated( vgui::KeyCode code );
+
+ bool GetPlayerStats( int rank, bool bFriends = false );
+ void UpdateLeaderboard( int iNewRank );
+ void AddLeaderboardEntry( const char **pEntries, int ct );
+ void CleanupStats();
+
+private:
+ vgui::Panel *m_pProgressBg;
+ vgui::Panel *m_pProgressBar;
+ vgui::Label *m_pProgressPercent;
+ vgui::Label *m_pNumbering;
+ vgui::Label *m_pUpArrow;
+ vgui::Label *m_pDownArrow;
+ vgui::Label *m_pBestMoments;
+
+ int m_iBaseRank;
+ int m_iActiveRank;
+ int m_iMaxRank;
+ int m_cColumns;
+ int m_iRangeBase;
+
+#if defined( _X360 )
+ XUSER_STATS_READ_RESULTS *m_pStats;
+#endif
+};
+
+
+#endif // LEADERBOARDDIALOG_H