📄 cmainguimgr.h
字号:
/*
Crazy Eggs Remade By Kevin Lynx
File : CMainGUIMgr.h
Desc : manage the main menu
Date : 2007.1.25
*/
#ifndef CMAIN_GUI_MGR_H
#define CMAIN_GUI_MGR_H
#include <DialogListener.h>
#include <ButtonWidget.h>
#include <ButtonListener.h>
#include <Graphics.h>
using namespace Sexy;
class CGame;
class CHighscoreMgr;
class CMainGUIMgr : public Widget, public ButtonListener, public DialogListener
{
public:
/*
GUI Controls ID
*/
enum
{
BTN_PLAY_ID = 1,
BTN_HIGHSCORE_ID,
BTN_OPTIONS_ID,
BTN_HELP_ID,
BTN_EXIT_ID,
};
public:
CMainGUIMgr( CGame *game );
~CMainGUIMgr();
/*
Name : Init
Desc : init all the controls etc
Param: none
Return:
if init ok, return true, else return false
*/
bool Init();
/*
Name : Release
Desc : release all the controls etc
Param: none
Return:none
*/
void Release();
/*
Name : Update
Desc : called automatically by its widget manager
Param: none
Return:none
*/
void Update();
/*
Name : Draw
Desc : called automatically by its widget manager
Param:
g: graphics context
Return:none
*/
void Draw( Graphics *g );
/*
Name : AddedToManager
Desc : called automatically by the widget manager when it was added
to the manager , here should add other gui controls to the manager
Param:
theWidgetManager : the widget manager
Return:none
*/
void AddedToManager( WidgetManager *theWidgetManager );
/*
Name : RemovedFromManager
Desc : called automatically by the widget manager when it was removed
from the manager, here should remove other gui controls from the manager
*/
void RemovedFromManager( WidgetManager *theWidgetManager );
/*
Name : ButtonDepress
Desc : to get the button's events
Param:
theId : the button's id
Return:none
*/
void ButtonDepress( int theId );
/*
Name : DialogButtonDepress
*/
void DialogButtonDepress( int theDialogId, int theButtonId );
private:
CGame *m_Game;
private:
ButtonWidget *m_btnPlay;
ButtonWidget *m_btnHighScore;
ButtonWidget *m_btnOptions;
ButtonWidget *m_btnHelp;
ButtonWidget *m_btnExit;
public:
CHighscoreMgr *m_highscoreMgr;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -