📄 cguimanager.h
字号:
/**********************************************************************************
** File: CGUIManager.h
** Author: Kevin Lynx
** Date: 2006.10.1
** Desc: manage the GUI in Brick Shooter Jr
**
**********************************************************************************/
#ifndef CGUIMANAGER_H
#define CGUIMANAGER_H
#include <hge.h>
#include <hgegui.h>
#include <hgesprite.h>
#include <hgeresource.h>
#include "CSound.h"
#include "hgeGUIButtonEx.h"
#include "CBSDialog.h"
#include "g_info.h"
enum e_GUIId
{
GUI_NEWGAME = 1,
GUI_HIGHSCORE,
GUI_OPTION,
GUI_HELP,
GUI_SAVEGAME,
GUI_READGAME,
GUI_EXITGAME,
GUI_ROTATE1, //clockwise rotation
GUI_ROTATE2, //unclockwise
GUI_UNDO,
GUI_HELPDLG1,
GUI_HELPDLG2,
GUI_OPTIONDLG,
GUI_GAMEOVERDLG,
GUI_HIGHSCOREDLG,
GUI_INPUTBOXDLG,
GUI_TIPSDLG
};
class CGUIManager
{
public:
CGUIManager( hgeResourceManager *resMgr , CSound *sound );
//~CGUIManager();
bool Init();
void Release();
e_GUIId Update( float dt);
void Render();
//void CheckHighScore( int score, int level );
//void ShowGameoverDlg();
//bool IsDisable() { return m_bhasDlg; }
//bool IsShowHighScore() { return m_bShowHigh; }
protected:
void EnableAll( bool bEnable );
private:
CSound *m_sound;
hgeResourceManager *m_resMgr;
hgeGUI *m_guiMgr;
hgeGUIButtonEx *m_newGame;
hgeGUIButtonEx *m_highScore;
hgeGUIButtonEx *m_options;
hgeGUIButtonEx *m_help;
hgeGUIButtonEx *m_rotate[2];
hgeGUIButtonEx *m_undo;
hgeGUIButtonEx *m_saveGame;
hgeGUIButtonEx *m_readGame;
hgeGUIButtonEx *m_exitGame;
CBSDialog *m_helpDlg[2];
CBSOptionDlg *m_optionDlg;
/*CBSDialog *m_gameoverDlg;
CHighscoreDlg *m_highscoreDlg;
CTipsDlg *m_tipsDlg;
hgeGUIInputBox *m_inputboxDlg;*/
//bool m_bhasDlg; //if there are some dialogs,the game is disable
//bool m_bShowHigh;//to avoid the strang things
//int m_posInHighScore;
//int m_score;
//int m_level;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -