SlectSubMenu(void) /*子菜单项的选择*/
{
disp_menu_item(2,1+Smm[Mm],15,3,Sub[Mm][Smm[Mm]]);/* 光条恢复*/
if(Key==UPPER )
Smm[Mm] = Smm[Mm]==0?SbNum[Mm]-1:Smm[Mm]-1; /*实现子菜单项的循环*/
if(Key==DOWN )
Smm[Mm] = Smm[Mm]==SbNum[Mm]-1?0:Smm[Mm]+1;
disp_menu_item(2,1+Smm[Mm],14,1,Sub[Mm][Smm[Mm]]); /*设置光条*/
}
SlectMainMenu(void)
{
window(1,1,80,25);
disp_menu_item(SbX[Mm],1,14,3,Main[Mm]);/*恢复主菜单光条*/
puttext(SbX[Mm]-2,2,SbX[Mm]+SbWid[Mm]+1,SbNum[Mm]+4,buf); /*恢复屏幕*/
if(Key==LEFT )
Mm = Mm==0?4:Mm-1; /*实现主菜单的循环*/
if(Key==RIGHT)
Mm = Mm==4?0:Mm+1;
disp_menu_item(SbX[Mm],1,14,4,Main[Mm]);/*设置光条*/
WSubMenu(); /*显示下拉式菜单*/
}