📄 cbsdialog.h
字号:
/***********************************************************************************************
** File: CBSDialog.h
** Author:Kevin Lynx
** Date: 2006.10.1
** Desc: Create a dialog for Brick Shooter Jr,
** it's only used in the Brick Shooter Jr game
** on the dialog ,it must have a button ,so give it the button information
************************************************************************************************/
#ifndef CBSDIALOG_H
#define CBSDIALOG_H
#include <hgegui.h>
#include <hgesprite.h>
#include <hgefont.h>
#include "CSound.h"
struct COptionData
{
int m_bMusic;
int m_bSound;
int m_bFullscreen;
int m_bBomb;
int m_bArrowChanger;
int m_bUniversal;
};
class CBSDialog : public hgeGUIObject
{
public:
CBSDialog( int _id, float x, float y, float w, float h,
float bx, float by, float bw, float bh, //the button position ,releative position
hgeSprite *sp );
virtual ~CBSDialog();
virtual void Render();
virtual void Update( float dt );
virtual bool MouseLButton( bool bDown );
virtual void ShowDlg( bool bshow ) { this->bVisible = bshow; }
virtual void EnableDlg( bool bEnable ) { this->bEnabled = bEnable; }
virtual void EnableURL( bool url ) { m_bURL = url; }
protected:
hgeSprite *m_sp;
hgeRect m_buttonRect;
bool m_bEnterAnim;
float m_alpha; //used for fade in effect
bool m_bURL; //just a joke hoho
};
class CBSOptionDlg : public CBSDialog
{
public:
CBSOptionDlg( int _id, float x, float y, float w, float h,
float bx, float by, float bw, float bh, //the button position ,releative position
hgeSprite *sp, hgeSprite *okSign );
~CBSOptionDlg();
virtual void Render();
virtual bool MouseLButton( bool bDown );
void Init( CSound *sound, COptionData *option );
protected:
hgeSprite *m_okSign;
CSound *m_sound;
COptionData *m_optionData;
//used for mouse clicked
hgeRect m_rMusic;
hgeRect m_rSound;
hgeRect m_rFullscreen;
hgeRect m_rBomb;
hgeRect m_rArrowChanger;
hgeRect m_rUniversal;
};
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -