📄 chighscores.h
字号:
// Copyright 2002 Kenneth Guy,
//
// CHighScores.h
//
#ifndef _CHIGHSCORE_H_
#define _CHIGHSCORE_H_
/** \file CHighScores.h
defines class CHighScores */
#include <e32std.h>
#include <e32base.h>
/** High score table.
Handles saving and restoring the high score table. */
class CHighScores : public CBase {
public:
static CHighScores* NewL(const TDesC& aFileName);
TInt Number();
void AddScoreL(const TDesC& aName, TInt aScore);
TBool GoodEnough(TInt aScore);
TInt Score(TInt aEntry);
const TDesC& Name(TInt aEntry);
TInt LastAdded();
~CHighScores();
void InitL();
private:
void ConstructL(const TDesC& aFileName);
void SaveL();
void LoadL();
void Reset();
private:
HBufC* iFileName; ///< file to store high score table in on exit
RArray<HBufC*> iNames; ///< Array of names
RArray<TInt> iScores;///< Array of scores
TInt iLastAdded; ///< Last added, so that ui can highlite it.
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -