📄 stpmenu1.h
字号:
// TYPE_NUMOPT,
//please add TYPE_USER_XX after TYPE_USR_1
/* TYPE_USER_XX is used for user, every TYPE_USER_XX should map to a function to do the draw function */
TYPE_USER_1
};
enum
{
MENU_TXT,
MENU_BMP
};
// - Page Order
enum
{
/* 00 */ MAIN_PAGE,
/* 01 */ GENERAL_PAGE,
/* 02 */ SPEAKER_PAGE,
/* 03 */ DD_PAGE,
/* 04 */ PRE_PAGE,
#ifdef ENABLE_USER_LANG_CODE
/* 05 */ LANG_PAGE,
#endif
/* 07 */ VDO_PAGE,
#if (defined(PTL_PWD_MODE_SW) || defined(SET_PTL_NEED_PWD))
/* 14 */ PASS_PAGE,
#endif
/* 15 */ PASS_CHG_PAGE,
/* 16 */ PASS_CON_PAGE,
/* 09 */ VER_PAGE,
/* 10 */ BRIGHTNESS_PAGE,
/* 11 */ CONTRAST_PAGE,
/* 14 */ REGCODE_PAGE,
/* 15 */ MAX_PAGE
};
#define EXIT_PAGE (MAX_PAGE + 1) // dummy page
///////////////////////////////////////////////////////////////////////////////
// Setup Menu Struct
typedef struct sData
{
WORD wEntryMsg;
WORD wMsgMsg;
WORD wValMsg;
BYTE bVal;
} sData;
typedef struct sEntry
{
WORD wType;
WORD wBmpIdx;
WORD wEntryMsg;
WORD wMsgMsg;
WORD wEEPos; // store in see entry or Page Number
WORD wSIPos; // send to RISC share info update entry
WORD wMaxOpt;
WORD wDefault; // default value when reset
sData **prData;
BYTE (code *bFun)(WORD wEEPos, BYTE bValue) large;
} sEntry;
typedef struct sMenu
{
// BYTE wSpace;
BYTE bType;
WORD wHdrMsg;
WORD wMsgMsg;
BYTE bTotalEntry;
// BYTE bFirst;
sEntry **prEntry;
BYTE bMenuType; //void *vFun; // per page draw function
BYTE bInvType; //void *vInvaFun; // invalid entry function
} sMenu;
typedef struct sMenuRoot
{
BYTE wType;
sMenu **prMenu;
BYTE bEntryNo;
} sMenuRoot;
typedef struct _sDlgParent
{
BYTE bDlgId;
BYTE bPage;
BYTE bEntry;
} sDlgParent;
///////////////////////////////////////////////////////////////////////////////
// Setup Menu Struct
#define bOptMaxEntryNum(menu, page, entry) (menu.prMenu[page]->prEntry[entry-1]->wMaxOpt)
#define NUM_STYLE_CTRL(x) ((x == ENTRY_TYPE_H_SLIDER) || (x == ENTRY_TYPE_H_SLIDER_SIGNED) || \
(x == ENTRY_TYPE_V_SLIDER) || (x == ENTRY_TYPE_V_SLIDER_SIGNED))
#ifdef _SETUP_C
code void *vUsrFun[] = {vDrawDynRngBtn};
code sEntry _rEntryNull = { ENTRY_TYPE_NULL, NULL_BMP, 0, 0, NULL_EE_ITEM, 0, 0, 0, 0, 0};
code sEntry _rEntryMain = { ENTRY_TYPE_SUBMENU, NULL_BMP, OSD_MSG_MAINPAGE, OSD_MSG_BACK_TO_MAIN_PAGE, MAIN_PAGE, 0, 0, 0, 0, NULL_FUN};
///////////////////////////////////////////////////////////////////////////////
// Main Page
code sEntry _rEntryDD = { ENTRY_TYPE_SUBMENU, BMP_STPMN_DOLBY_ON, OSD_MSG_DOLBY_DIGITAL, OSD_MSG_GOTO_DOLBY_DIGITAL, DD_PAGE, 0, 0, 0, 0, NULL_FUN};
code sEntry _rEntryGeneral = { ENTRY_TYPE_SUBMENU, BMP_STPMN_GR_ON, OSD_MSG_GENERAL_SETUP, OSD_MSG_GOTO_GENERAL_SETUP, GENERAL_PAGE, 0, 0, 0, 0, NULL_FUN};
code sEntry _rEntryVdo = { ENTRY_TYPE_SUBMENU, BMP_STPMN_VDO_ON, OSD_MSG_VIDEO_SETUP, OSD_MSG_GOTO_VDO_PAGE, VDO_PAGE, 0, 0, 0, 0, NULL_FUN};
code sEntry _rEntrySpk = { ENTRY_TYPE_SUBMENU, BMP_STPMN_ADO_ON, OSD_MSG_AUDIO_SETUP, OSD_MSG_GOTO_SPEAKER, SPEAKER_PAGE, 0, 0, 0, 0, NULL_FUN};
code sEntry _rEntryPre = { ENTRY_TYPE_SUBMENU, BMP_STPMN_PR_ON, OSD_MSG_PREFERENC_PAGE, OSD_MSG_GOTO_PREFERENCE, PRE_PAGE, 0, 0, 0, 0, NULL_FUN};
#if 0
code sEntry _rEntryVer = { ENTRY_TYPE_DIALOG/*[runma]SUBMENU*/, NULL_BMP, OSD_MSG_VERSION, OSD_MSG_GOTO_VER, VER_PAGE, DLG_VERSION/*[runma]0->*/, 0, 0, 0, NULL_FUN};
#endif
#ifndef PLAYER_BASIC
code sEntry _rEntryExit = { TYPE_CLOSE, BMP_STPMN_EXIT_ON, OSD_MSG_EXITSETUP, OSD_MSG_EXIT_SETUP_MENU, MAX_PAGE, 0, 0, 0, 0, NULL_FUN};
#else
code sEntry _rEntryExit = { TYPE_CLOSE, 0, OSD_MSG_EXITSETUP, OSD_MSG_EXIT_SETUP_MENU, MAX_PAGE, 0, 0, 0, 0, NULL_FUN};
#endif /* PLAYER_BASIC */
code sEntry *_prEntryMain[] = { &_rEntryGeneral, &_rEntrySpk, &_rEntryDD, &_rEntryVdo, &_rEntryPre
#ifndef MTK_MENU
,&_rEntryNull, &_rEntryExit
#endif
};
//code sMenu _rPageMain = {NML_SPACE, PAGE_TOP,
code sMenu _rPageMain = {PAGE_TYPE_MAINMENU,
OSD_MSG_SETUP_MENU, OSD_MSG_SETUP_MENU_D, TBL_SIZE(_prEntryMain),
_prEntryMain, NULL_FUN, CHK_MAIN};
///////////////////////////////////////////////////////////////////////////////
// Password Page
#if (defined(PTL_PWD_MODE_SW) || defined(SET_PTL_NEED_PWD))
// - Password Switch
code sData _rOptPassOn = {OSD_MSG_ON, OSD_MSG_ON, OSD_MSG_ON, EV_ON};
code sData _rOptPassOff = {OSD_MSG_OFF, OSD_MSG_OFF, OSD_MSG_OFF, EV_OFF};
code sData *_prDataPass[] = {&_rOptPassOn, &_rOptPassOff};
code sEntry _rEntryPass = { ENTRY_TYPE_GROUPBUTTON, NULL_BMP, OSD_MSG_PASSWORD_MODE, OSD_MSG_PASSWORD_MODE,
PASS_SW_POSITION, NULL_SI, TBL_SIZE(_prDataPass) - 1, EV_ON, _prDataPass, bPassSwitch};
// - Change Password
code sData _rOptPassChange = {OSD_MSG_PASS_CHANGE, OSD_MSG_CHANGE_PASSWORD, OSD_MSG_EMPTY, 0};
code sData *_prDataPassChange[] = {&_rOptPassChange};
code sEntry _rEntryPassCh = { ENTRY_TYPE_GROUPBUTTON, NULL_BMP, OSD_MSG_PASSWORD_CHANGE, OSD_MSG_CHANGE_PASSWORD,
NULL_EE_ITEM, NULL_SI, 0, 0, _prDataPassChange, bChangePass};
// - Password Page Definition
code sEntry *_prEntryPass[] = {
#ifdef PTL_PWD_MODE_SW
&_rEntryPass,
#endif
&_rEntryPassCh };
code sMenu _rPagePass = { PAGE_NML, OSD_MSG_PASSWORD_PAGESETUPPAGE, OSD_MSG_EMPTY,
TBL_SIZE(_prEntryPass), _prEntryPass, NULL_FUN, NULL_FUN};
#endif // PTL_PWD_MODE_SW || SET_PTL_NEED_PWD
// Password Page End
// Password Page Change
// old password
//code sEntry _rEntryPassOld = { ITEM_ENTRY_TYPE_TEXT, BMP_PASS, OSD_MSG_OLD_PASSWORD, OSD_MSG_INPUT_OLD_PASS,
code sEntry _rEntryPassOld = { ENTRY_TYPE_EDITBOX_ORDERED, NULL_BMP, OSD_MSG_OLD_PASSWORD, OSD_MSG_INPUT_OLD_PASS,
// 0, 0, 0, 0, 0, 0};
0, 0, PASSWORD_LEN, 0, 0, bCheckOldPwd};
// old password end
// new password
code sEntry _rEntryPassNew = { ENTRY_TYPE_EDITBOX_ORDERED, NULL_BMP, OSD_MSG_NEW_PASSWORD, OSD_MSG_INPUT_NEW_PASS,
// 0, 0, 0, 0, 0, 0};
0, 0, PASSWORD_LEN, 0, 0, bCheckNewPwd}; //[runma] 0 -> bchecknewpwd
// new password end
// confirm password
code sEntry _rEntryPassConf = { ENTRY_TYPE_EDITBOX_ORDERED, NULL_BMP, OSD_MSG_CONFIRM_PASS, OSD_MSG_CONFIRM_PASS,
// 0, 0, 0, 0, 0, 0};
0, 0, PASSWORD_LEN, 0, 0, bConfirmNewPwd}; //[runma] checknewpwd -> confirm
// confirm password end
//code sEntry _rEntryRetPassChg = { ENTRY_TYPE_RETURN, 0, 0, 0, PASS_PAGE, 0, 0, 0, 0, NULL_FUN};
code sEntry _rEntryRetPassChg = { ENTRY_TYPE_RETURN, 0, 0, 0, PASS_PAGE, 0, 0, 1, 0, NULL_FUN};
code sEntry *_prEntryPassChg[] = { &_rEntryPassOld, &_rEntryPassNew, &_rEntryPassConf, &_rEntryNull, &_rEntryRetPassChg };
code sMenu _rPagePassChange = {PAGE_TYPE_V_DIALOG,
OSD_MSG_PASSWORD_CHANGE_PAGE, OSD_MSG_EMPTY, TBL_SIZE(_prEntryPassChg),
_prEntryPassChg, PAGE_PASS_BTN, NULL_FUN};
// Password Page Change End
code sEntry _rEntryPassCon = { ENTRY_TYPE_EDITBOX_ORDERED, NULL_BMP, OSD_MSG_PASSWORD, OSD_MSG_INPUT_OLD_PASS,
// 0, 0, 0, 0, 0, 0};
PASSWD_POSITION, SH_PASS_0, PASSWORD_LEN, 0, 0, bCheckOldPwd};
code sEntry _rEntryRetPassCon = { ENTRY_TYPE_RETURN, 0, 0, 0, PASS_PAGE, 0, 0, 1, 0, NULL_FUN};
// Password confirm Page
code sEntry *_prEntryPassCon[] = {&_rEntryPassCon, &_rEntryNull, &_rEntryRetPassCon};
//code sMenu _rPagePassConf = {NML_SPACE, PAGE_TXT,
//code sMenu _rPagePassConf = {NML_SPACE, PAGE_TYPE_V_DIALOG,
code sMenu _rPagePassConf = {PAGE_TYPE_V_DIALOG, OSD_MSG_PWRD_VERIFY_PAGE, OSD_MSG_PLS_ENTER_PWD_O,
//TBL_SIZE(_prEntryPassCon), _prEntryPassCon, PAGE_CON_BTN, NULL_FUN};
TBL_SIZE(_prEntryPassCon), _prEntryPassCon, 0, NULL_FUN};
// Password confirm Page End
// General Page
// TV Display
code sData _rOptTvPs = {OSD_MSG_TV_4_3PS, OSD_MSG_NORMAL_4_3, OSD_MSG_VAL_TV_4_3PS, SV_4_3_PS};
code sData _rOptTvLb = {OSD_MSG_TV_4_3LB, OSD_MSG_4_3_TV, OSD_MSG_VAL_TV_4_3LB, SV_4_3_LB};
code sData _rOptTvWide = {OSD_MSG_TV_16_9WIDE, OSD_MSG_WIDE_SCREEN, OSD_MSG_VAL_TV_16_9WIDE, SV_WIDE};
code sData *_prDataTvDis[] = {&_rOptTvPs, &_rOptTvLb, &_rOptTvWide};
code sEntry _rEntryTvDis = {
ENTRY_TYPE_GROUPBUTTON,
NULL_BMP, OSD_MSG_TVDISPLAY, OSD_MSG_SETTVDISPLAYMODE,
ASPECT_POSITION,
SI_ASPECT_RATIO,
TBL_SIZE(_prDataTvDis) - 1,
ASPECT_DEFAULT,
_prDataTvDis, bNormalVdo};
// TV Display End
// TV Type
code sData _rOptTvPal = {OSD_MSG_TVTYPE_PAL, OSD_MSG_PAL_TV, OSD_MSG_VAL_PAL, SV_PAL};
code sData _rOptTvAuto = {OSD_MSG_MULTI, OSD_MSG_MULTISYNC_TV, OSD_MSG_VAL_AUTO, SV_AUTO};
//code sData _rOptTvAuto = {OSD_MSG_AUTO, OSD_MSG_MULTISYNC_TV, OSD_MSG_VAL_AUTO, SV_AUTO};
code sData _rOptTvNtsc = {OSD_MSG_TVTYPE_NTSC, OSD_MSG_NTSC_TV, OSD_MSG_VAL_NTSC, SV_NTSC};
code sData *_prDataTvType[] = {&_rOptTvPal, &_rOptTvAuto, &_rOptTvNtsc};
code sEntry _rEntryTvType = { ENTRY_TYPE_GROUPBUTTON, NULL_BMP, OSD_MSG_TVTYPE, OSD_MSG_SETTV_STANDARD,
TV_SYSTEM_POSITION, SI_TV_SYSTEM, TBL_SIZE(_prDataTvType) - 1,
// TV_SYSTEM_DEFAULT,
SV_NTSC,
_prDataTvType, bNormalVdo};
// TV Type End
// Angle Mark
code sData _rOptAngOn = {OSD_MSG_ON, OSD_MSG_TURN_ANGLE_ON, OSD_MSG_ON, EV_ON};
code sData _rOptAngOff = {OSD_MSG_OFF, OSD_MSG_TURN_ANGLE_OFF, OSD_MSG_OFF, EV_OFF};
code sData *_prDataAng[] = {&_rOptAngOn, &_rOptAngOff};
code sEntry _rEntryAng = { ENTRY_TYPE_GROUPBUTTON, NULL_BMP, OSD_MSG_ANGLEMARK, OSD_MSG_SET_ANGLEMARK,
ANGLE_MARK_POSITION, NULL_SI, TBL_SIZE(_prDataAng) - 1,
EV_ON, _prDataAng, bAngleChange};
// Angle Mark End
// OSD Lang
// !!! no use SV_XXXX here, the sequence must be the FLASH image language sequence !!!
code sData _rOptEng = {OSD_MSG_OSDLANG_ENGLISH, OSD_MSG_SET_OSD_ENGLISH, OSD_MSG_VAL_ENGLISH, EV_OSD_ENGLISH};
code sData _rOptChi = {OSD_MSG_OSDLANG_CHINESE, OSD_MSG_SET_OSD_CHINESE, OSD_MSG_VAL_CHINESE, EV_OSD_CHINESE};
// !!! no use SV_XXXX here, the sequence must be the FLASH image language sequence !!!
code sData *_prDataLang[] = {&_rOptEng, &_rOptChi};
code sEntry _rEntryLang = { ENTRY_TYPE_GROUPBUTTON, NULL_BMP, OSD_MSG_OSDLANG, OSD_MSG_SET_OSDLANG,
OSD_LANG_POSITION, NULL_SI, TBL_SIZE(_prDataLang) - 1,
OSD_LANG_DEFAULT,
_prDataLang, bChangeLang};
// OSD Lang End
// Close Caption
code sData _rOptCCOn = {OSD_MSG_ON, OSD_MSG_CC_ON, OSD_MSG_ON, SV_ON};
code sData _rOptCCOff = {OSD_MSG_OFF, OSD_MSG_CC_OFF, OSD_MSG_OFF, SV_OFF};
code sData *_prDataCC[] = {&_rOptCCOn, &_rOptCCOff};
code sEntry _rEntryCC = { ENTRY_TYPE_GROUPBUTTON, NULL_BMP, OSD_MSG_CAPTIONS, OSD_MSG_CLOSEDCAPTION,
CC_SW_POSITION, SI_CC_SWITCH, TBL_SIZE(_prDataCC) - 1, SV_OFF, _prDataCC, bNormalVdo};
// Close Caption End
#ifdef USE_TYPE_2
// OSD Style
code sData _rOptType1 = {OSD_MSG_MENU_TYPE1, OSD_MSG_USE_MENU_TYPE1, OSD_MSG_EMPTY, EV_TYPE1}; //[runma] STPMN_NORMAL};
code sData _rOptType2 = {OSD_MSG_MENU_TYPE2, OSD_MSG_USE_MENU_TYPE2, OSD_MSG_EMPTY, EV_TYPE2}; //[runma] EV_STPMN_SIMPLE};
code sData _rOptType3 = {OSD_MSG_MENU_TYPE3, OSD_MSG_USE_MENU_TYPE3, OSD_MSG_EMPTY, EV_TYPE3}; //[runma] EV_STPMN_ADVANCED};
code sData *_prDataType[] = {&_rOptType1, &_rOptType2, &_rOptType3};
code sEntry _rEntryOsdType = { ENTRY_TYPE_GROUPBUTTON, NULL_BMP, OSD_MSG_MENU_STYLE, OSD_MSG_SET_MENU_STYLE,
OSD_STYLE_POSITION, NULL_SI, TBL_SIZE(_prDataType) - 1,
EV_TYPE3, _prDataType, bSwitchType}; //[runma] EV_STPMN_NORMAL -> EV_TYPE3
#endif
// OSD Style End
// Setup menu mode begin
/*
code sData _rOptNormal = {OSD_MSG_MENU_TYPE1, OSD_MSG_USE_MENU_TYPE1, OSD_MSG_FUNC_NUMBER, EV_STPMN_NORMAL}; //[runma] EV_TYPE1}; honnow...the message should be msg_menu_adv and menu_normal.
code sData _rOptAdvanced = {OSD_MSG_MENU_TYPE2, OSD_MSG_USE_MENU_TYPE2, OSD_MSG_FUNC_NUMBER, EV_STPMN_ADVANCED}; //[runma] TYPE2};
*/
#ifdef SETUP_NML_ADV_STYLE //[runma] remove a block
code sData _rOptNormal = {OSD_MSG_MENU_TYPE1, OSD_MSG_USE_MENU_TYPE1, OSD_MSG_EMPTY, EV_STPMN_NORMAL}; //[runma] EV_TYPE1}; honnow...the message should be msg_menu_adv and menu_normal.
code sData _rOptAdvanced = {OSD_MSG_MENU_TYPE2, OSD_MSG_USE_MENU_TYPE2, OSD_MSG_EMPTY, EV_STPMN_ADVANCED}; //[runma] TYPE2};
code sData *_prDataStyle[] = {&_rOptNormal, &_rOptAdvanced};
code sEntry _rEntrySetupStyle = { ENTRY_TYPE_GROUPBUTTON, NULL_BMP, OSD_MSG_MENU_STYLE, OSD_MSG_SET_MENU_STYLE,
OSD_STYLE_POSITION, NULL_SI, TBL_SIZE(_prDataStyle) - 1,
EV_STPMN_NORMAL, _prDataStyle, vSwitchStyle}; //[runma] EV_TYPE2 -> EV_STPMN_NORMAL
#endif
// Setup menu mode end
// Screen Saver
code sData _rOptSSOn = {OSD_MSG_ON, OSD_MSG_SS_ON, OSD_MSG_ON, SV_ON};
code sData _rOptSSOff = {OSD_MSG_OFF, OSD_MSG_SS_OFF, OSD_MSG_OFF, SV_OFF};
code sData *_prDataSS[] = {&_rOptSSOn, &_rOptSSOff};
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -