状态机菜单的处理
时间:10-02
整理:3721RD
点击:
//根据菜单级别写显示内容到显示缓冲区
if(Menu_Focus.Menu_Save_Level==0)
{
Menu_Focus.Menu_Save_Items=3;
sprintf(&DisBuf[0][1],MenuMain[(Menu_Focus.Menu_Save_Index)%4].Menu_Name);
sprintf(&DisBuf[1][1],MenuMain[(Menu_Focus.Menu_Save_Index+1)%4].Menu_Name);
}
else
{
Menu_Focus.Menu_Save_Items=2;
sprintf(&DisBuf[0][1],Menu1[(Menu_Focus.Menu_Save_Index)%2].Menu_Name);
sprintf(&DisBuf[1][1],Menu1[(Menu_Focus.Menu_Save_Index+1)%2].Menu_Name);
}
//显示,显示缓冲区的内容到LCD
GotoXY(0,0);
Print(DisBuf[0]);
GotoXY(0,1);
Print(DisBuf[1]);
求大神帮我看看他是怎么实现这个功能的
if(Menu_Focus.Menu_Save_Level==0)
{
Menu_Focus.Menu_Save_Items=3;
sprintf(&DisBuf[0][1],MenuMain[(Menu_Focus.Menu_Save_Index)%4].Menu_Name);
sprintf(&DisBuf[1][1],MenuMain[(Menu_Focus.Menu_Save_Index+1)%4].Menu_Name);
}
else
{
Menu_Focus.Menu_Save_Items=2;
sprintf(&DisBuf[0][1],Menu1[(Menu_Focus.Menu_Save_Index)%2].Menu_Name);
sprintf(&DisBuf[1][1],Menu1[(Menu_Focus.Menu_Save_Index+1)%2].Menu_Name);
}
//显示,显示缓冲区的内容到LCD
GotoXY(0,0);
Print(DisBuf[0]);
GotoXY(0,1);
Print(DisBuf[1]);
求大神帮我看看他是怎么实现这个功能的