📄 guiapp_action_confirmresetmenu.c
字号:
/*****************************************************************************
** TEXAS INSTRUMENTS PROPRIETARY INFORMATION
**
** (c) Copyright, Texas Instruments Incorporated, 2006.
** All Rights Reserved.
**
** Property of Texas Instruments Incorporated. Restricted Rights -
** Use, duplication, or disclosure is subject to restrictions set
** forth in TI's program license agreement and associated documentation.
******************************************************************************/
#include "common.h"
#include "guiStyle.h"
#include "guiApp_action.h"
#include "osd.h"
#include "illumination.h"
#include "guiApp.h"
static int16 confirmResetIndex = ITEM_LAMPRESETITEM;
int08 guiApp_action_ConfirmResetMenu_OnStart( int16 menuId, GUIMSG *msg )
{
guiApp_SetMenuPosition( menuId, GUI_CENTER );
if( msg != NULL )
{
if( msg->type == GUIMSG_VALUE && msg->data != NULL )
{
confirmResetIndex = *(int16 *)(msg->data);
}
}
return PASS;
}
/* implement item behavior, system interaction */
int08 guiApp_action_ConfirmResetMenu_GuiMsg( int16 menuId, int16 itemId, GUIMSG *msg )
{
if( msg == NULL )
return FAIL;
switch( itemId )
{
case ITEM_RESETOKITEM:
if( msg->type == GUIMSG_ASSERT )
{
switch( confirmResetIndex )
{
case ITEM_LAMPRESETITEM:
guiStyle_CloseMenu( menuId );
illum_lampHoursReset();
break;
case ITEM_FACTORYRESETITEM:
guiStyle_CloseMenu( menuId );
//eeprom_restoreDefault();
break;
default:
break;
}
}
break;
case ITEM_RESETCANCELITEM:
if( msg->type == GUIMSG_ASSERT )
{
guiStyle_CloseMenu( menuId );
}
break;
default:
return FAIL;
}
return PASS;
}
int08 guiApp_action_ConfirmResetMenu_Redraw( int16 menuId, GUIMSG *msg )
{
guiApp_SetMenuPosition( menuId, GUI_CENTER );
return PASS;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -