blob: 6fd646ff143d47c81bd9fc237a35f57203270767 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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
|