mainmenuwnd.h

来自「俄罗斯方块的整套源代码」· C头文件 代码 · 共 60 行

H
60
字号
#ifndef _MAINMENUWND_H_
#define _MAINMENUWND_H_

#include "CommonDef.h"

typedef struct _RussDmdApp RussDmdApp;
typedef struct _MainMenuWnd MainMenuWnd;

typedef enum _EMenuState
{
	eMenuState_SPLASH = 0,
	eMenuState_MENU,
	eMenuState_ABOUT,
	eMenuState_HELP,
	eMenuState_FILEERROR,
	eMenuState_DEMOERROR,

	eMenuState_NUM
} EMenuState;

typedef enum _EMenuIndex
{
	eMenuIndex_START = 0,
#ifdef ENABLE_MUSIC
	eMenuIndex_OPTION,
#endif
	eMenuIndex_RECORD,
	eMenuIndex_HELP,
	eMenuIndex_ABOUT,
#ifdef ENABLE_RECOMAND
	eMenuIndex_SMS,
#endif
	eMenuIndex_NUM
} EMenuIndex;

struct _MainMenuWnd
{
	RussDmdApp*		pMe;

	EMenuState		m_state;		// 子状态
	EMenuIndex		m_menuIndex;	// 菜单索引

	AECHAR *		m_pszMenu;
	IImage *		m_imgSplash;
	AEEImageInfo	m_pi;
	uint8			m_nSplashSkipCounter;
	uint8			m_nStartLine;
	uint8			m_nMaxLine;
	int8			m_nArrowAlign;	// 菜单上的左右箭头运动位置

};

boolean MainMenuWnd_New(MainMenuWnd* pthis, RussDmdApp* pMe);
boolean MainMenuWnd_HandleEvent(MainMenuWnd* pthis, AEEEvent eCode, uint16 wParam, uint32 dwParam);
boolean MainMenuWnd_Open(MainMenuWnd* pthis);
void MainMenuWnd_Close(MainMenuWnd* pthis);
void MainMenuWnd_Free(MainMenuWnd* pthis);

#endif

⌨️ 快捷键说明

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