mt2503 如何提高菜单滚动速度
时间:10-02
整理:3721RD
点击:
[DESCRIPTION]
如何提高菜单滚动速度
[SOLUTION]
在gui_effect_oem.c中添加如下函数
staticvoidmodified_gui_list_menu_smooth_scrolling_goto_next_item(void)//YYadd
{
/*----------------------------------------------------------------*/
/*LocalVariables*/
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/*CodeBody*/
/*----------------------------------------------------------------*/
if(Is_KeyRepeat()||MMI_fixed_list_menu.highlighted_item+1==MMI_fixed_list_menu.n_itEMS){
gui_set_current_list_effect(0);
}
switch(g_gui_list_menu_smooth_scrolling_menu_type)
{
caseGUI_MENU_TYPE_FIXED:
fixed_list_goto_next_item();
break;
caseGUI_MENU_TYPE_DYNAMIC:
dynamic_list_goto_next_item();
break;
caseGUI_MENU_TYPE_ASYNCDYNAMIC:
asyncdynamic_list_goto_next_item();
break;
#ifdef__MMI_FTE_SUPPORT__
caseGUI_MENU_TYPE_INLINE:
inline_fixed_list_goto_next_item();
break;
#endif
default:
break;
}
#defineLIST_EFFECT_TYPE__(A)MMI_UI_LIST_HIGHLIGHT_EFFECT_##A
#defineLIST_EFFECT_TYPE_(A)LIST_EFFECT_TYPE__(A)
#defineLIST_EFFECT_TYPE(A)LIST_EFFECT_TYPE_(A)
gui_set_current_list_effect(LIST_EFFECT_TYPE_(UI_LIST_EFFECT_TYPE));
}
修改如下函数:
staticvoidgui_list_menu_smooth_scrolling_goto_next_item(void)
{
staticintReEntry=0;
if(ReEntry)return;
ReEntry++;
if(Is_KeyRepeat()){
gui_start_timer(20,gui_list_menu_smooth_scrolling_goto_next_item);
}
modified_gui_list_menu_smooth_scrolling_goto_next_item();
ReEntry--;
}
在keybrd.c中添加函数:
BOOLIs_KeyRepeat(void)
{
return(g_key_cntx.curr_key_type==KEY_EVENT_REPEAT);
}
附:[UI]二级菜单(主菜单进去的菜单),当出现hint pop框时,动画停止
只有客户把二级菜单的背景改成动画,并且打开FTE才会出现这个问题。只需要在wgui_hint_oem.c里面不要定义__MMI_FTE_SUPPORT__即可。
如何提高菜单滚动速度
[SOLUTION]
在gui_effect_oem.c中添加如下函数
staticvoidmodified_gui_list_menu_smooth_scrolling_goto_next_item(void)//YYadd
{
/*----------------------------------------------------------------*/
/*LocalVariables*/
/*----------------------------------------------------------------*/
/*----------------------------------------------------------------*/
/*CodeBody*/
/*----------------------------------------------------------------*/
if(Is_KeyRepeat()||MMI_fixed_list_menu.highlighted_item+1==MMI_fixed_list_menu.n_itEMS){
gui_set_current_list_effect(0);
}
switch(g_gui_list_menu_smooth_scrolling_menu_type)
{
caseGUI_MENU_TYPE_FIXED:
fixed_list_goto_next_item();
break;
caseGUI_MENU_TYPE_DYNAMIC:
dynamic_list_goto_next_item();
break;
caseGUI_MENU_TYPE_ASYNCDYNAMIC:
asyncdynamic_list_goto_next_item();
break;
#ifdef__MMI_FTE_SUPPORT__
caseGUI_MENU_TYPE_INLINE:
inline_fixed_list_goto_next_item();
break;
#endif
default:
break;
}
#defineLIST_EFFECT_TYPE__(A)MMI_UI_LIST_HIGHLIGHT_EFFECT_##A
#defineLIST_EFFECT_TYPE_(A)LIST_EFFECT_TYPE__(A)
#defineLIST_EFFECT_TYPE(A)LIST_EFFECT_TYPE_(A)
gui_set_current_list_effect(LIST_EFFECT_TYPE_(UI_LIST_EFFECT_TYPE));
}
修改如下函数:
staticvoidgui_list_menu_smooth_scrolling_goto_next_item(void)
{
staticintReEntry=0;
if(ReEntry)return;
ReEntry++;
if(Is_KeyRepeat()){
gui_start_timer(20,gui_list_menu_smooth_scrolling_goto_next_item);
}
modified_gui_list_menu_smooth_scrolling_goto_next_item();
ReEntry--;
}
在keybrd.c中添加函数:
BOOLIs_KeyRepeat(void)
{
return(g_key_cntx.curr_key_type==KEY_EVENT_REPEAT);
}
附:[UI]二级菜单(主菜单进去的菜单),当出现hint pop框时,动画停止
只有客户把二级菜单的背景改成动画,并且打开FTE才会出现这个问题。只需要在wgui_hint_oem.c里面不要定义__MMI_FTE_SUPPORT__即可。