⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 chighscoredlg.h

📁 3D游戏疯狂的鸡蛋
💻 H
字号:
/*
	Crazy Eggs Remade By Kevin Lynx

	File : CHighscoreDlg.h
	Desc : create the highscore dialog, and manage the highscore function
	Date : 2007.1.25
*/
#ifndef	CHIGHSCOREDLG_H
#define	CHIGHSCOREDLG_H

#include	<SexyAppBase.h>
#include	<ImageFont.h>
#include	<Dialog.h>
#include	<Common.h>
#include	<stdio.h>

using	namespace	std;
using	namespace	Sexy;


class	CHighscoreDlg : public	Dialog
{
public:
	enum
	{
		DLG_ID = 1,
	};

public:
	CHighscoreDlg( int id = DLG_ID );
	~CHighscoreDlg();

	void	ButtonDepress( int theId );

};

class	CHighscoreMgr
{
public:
	struct	ScoreNode
	{
		char			m_name[256];
		int				m_score;
		int				m_maxHit;

		ScoreNode()
		{
			m_name[0]	= 0;
			m_score		= 0;
			m_maxHit	= 0;
		}
	};

	enum
	{
		SCORE_COUNT = 5
	};

public:
	CHighscoreMgr();
	~CHighscoreMgr();

	/*
		Name : LoadScore
		Desc : load score list from file
		Param: none
		Return:none
	*/
	void	LoadScore();

	/*
		Name : WriteDefaultScore
		Desc : write default score list
	*/
	void	WriteDefaultScore();

	/*
		Name : InsertScore
		Desc : insert score into the high score list
		Param:
			name : the playse's name
			score: the player's score
			maxHit:the player's max hits
		Return :none
	*/
	void	InsertScore( std::string name, int score, int maxHit );	

	/*
		Name : CanInsert
		Desc : judget whether the score can insert the high score list
		Param:
			score :	the player's score
			maxHit: the player's max hit
		Return:if can return true , otherwise return false
	*/
	bool	CanInsert( int score, int maxHit );

	/*
		Name : ShowDlg
		Desc : show the highscore dialog
	*/
	void	ShowDlg();

	/*
		Name :
	*/
	std::string GetScoreInfo();

private:

	
	ScoreNode	m_scoreList[SCORE_COUNT];

	std::string	m_scoreInfo;
};

#endif

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -