郑州轻工业学院 ucgui点菜系统Word文档下载推荐.docx
- 文档编号:15953606
- 上传时间:2022-11-17
- 格式:DOCX
- 页数:13
- 大小:64.86KB
郑州轻工业学院 ucgui点菜系统Word文档下载推荐.docx
《郑州轻工业学院 ucgui点菜系统Word文档下载推荐.docx》由会员分享,可在线阅读,更多相关《郑州轻工业学院 ucgui点菜系统Word文档下载推荐.docx(13页珍藏版)》请在冰豆网上搜索。
#include<
stdio.h>
string.h>
math.h>
intx1=0,x2=0,x3=0,x4=0;
intx5=0;
ints=0;
intj=0,k=0;
inta[16];
GUI_BITMAPbmMicriumLogo1;
GUI_BITMAPbmMicriumLogo2;
GUI_BITMAPbmMicriumLogo3;
GUI_BITMAPbmMicriumLogo4;
/*
*******************************************************************
*
*main()
*/
typedefstruct{
intnum;
//编号
intprice;
//价格
charname[10];
//菜名
}dish;
dishc[16]={{1,16,"
麻婆豆腐"
},{2,21,"
辣子鸡丁"
},{3,30,"
东坡肘子"
},{4,35,"
豆瓣鲫鱼"
}
{5,18,"
口袋豆腐"
},{6,32,"
酸菜鱼"
},{7,20,"
夫妻肺片"
},{8,18,"
蚂蚁上树"
{9,32,"
叫化鸡"
},{10,22,"
茄汁鱼卷"
},{11,18,"
鱼香肉丝"
},{12,22,"
干煸冬笋"
{13,32,"
魔芋烧鸭"
},{14,32,"
锅贴鱼片"
},{15,23,"
麻辣肉丁"
},{16,15,"
鱼香茄饼"
}};
voidMainTask(void)
{
intCnt=0;
inti=0,j=0,p=0;
intx,y,flag_x=1,flag_y=1;
intLCDXSize=LCD_GET_XSIZE();
intLCDYSize=LCD_GET_YSIZE();
constGUI_BITMAP*pBitmap;
GUI_Init();
GUI_SetFont(&
GUI_FontHZ24);
GUI_SetColor(GUI_LIGHTCYAN);
GUI_DispStringHCenterAt("
有间客栈"
160,100);
GUI_Delay(2000);
//显示一个2秒钟的欢迎界面。
GUI_SetColor(GUI_WHITE);
GUI_SetBkColor(GUI_BLUE);
GUI_Clear();
GUI_FillRect(40,180,100,220);
GUI_FillRect(140,180,200,220);
GUI_FillRect(240,180,300,220);
GUI_SetBkColor(GUI_LIGHTCYAN);
GUI_SetColor(GUI_LIGHTBLUE);
上页"
70,190);
下页"
170,190);
确认"
270,190);
while
(1)
{
GUI_PID_STATETouchState;
if(x5<
=0)
for(i=0;
i<
4;
i++)
{
GUI_DispStringHCenterAt(c[p+i].name,80,20+i*35);
GUI_DispDecAt(c[p+i].price,140,20+i*35,2);
GUI_DispStringAt("
+"
200,20+i*35);
-"
250,20+i*35);
GUI_SetColor(GUI_LIGHTRED);
GUI_DispDecAt(x1,280,20,2);
GUI_DispDecAt(x2,280,55,2);
GUI_DispDecAt(x3,280,90,2);
GUI_DispDecAt(x4,280,125,2);
GUI_SetColor(GUI_WHITE);
a[0]=x1;
a[1]=x2;
a[2]=x3;
a[3]=x4;
GUI_Delay(15);
}
}
elseif(x5==1)
for(i=4;
8;
GUI_DispStringHCenterAt(c[p+i].name,80,20+(i-4)*35);
GUI_DispDecAt(c[p+i].price,140,20+(i-4)*35,2);
GUI_DispStringAt("
200,20+(i-4)*35);
250,20+(i-4)*35);
a[4]=x1;
a[5]=x2;
a[6]=x3;
a[7]=x4;
elseif(x5==2)
for(i=8;
12;
GUI_DispStringHCenterAt(c[p+i].name,80,20+(i-8)*35);
GUI_DispDecAt(c[p+i].price,140,20+(i-8)*35,2);
200,20+(i-8)*35);
250,20+(i-8)*35);
a[8]=x1;
a[9]=x2;
a[10]=x3;
a[11]=x4;
elseif(x5>
=3&
&
x5<
99)
for(i=12;
16;
GUI_DispStringHCenterAt(c[p+i].name,80,20+(i-12)*35);
GUI_DispDecAt(c[p+i].price,140,20+(i-12)*35,2);
200,20+(i-12)*35);
250,20+(i-12)*35);
a[12]=x1;
a[13]=x2;
a[14]=x3;
a[15]=x4;
elseif(x5==100)
{x5=101;
for(i=0;
if(a[i]!
GUI_SetFont(&
GUI_FontHZ12);
k++;
if(k<
11)
{
GUI_DispStringHCenterAt(c[p+i].name,40,20+(k-1)*15);
GUI_DispDecAt(c[p+i].price,80,20+(k-1)*15,2);
GUI_DispDecAt(a[i],120,20+(k-1)*15,2);
GUI_Delay(20);
a[i]=0;
}
else
{
GUI_DispStringHCenterAt(c[p+i].name,200,20+(k-11)*15);
GUI_DispDecAt(c[p+i].price,240,20+(k-11)*15,2);
GUI_DispDecAt(a[i],280,20+(k-11)*15,2);
}
if(GUI_TOUCH_GetState(&
TouchState))
{
if((TouchState.x>
30)&
(TouchState.x<
110)&
(TouchState.y>
170)&
(TouchState.y<
230)&
x5!
=100&
=101)
x5=x5-1;
GUI_Delay(300);
GUI_SetColor(GUI_BLUE);
GUI_FillRect(0,0,300,160);
{x1=a[0];
x2=a[1];
x3=a[2];
x4=a[3];
{x1=a[4];
x2=a[5];
x3=a
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- 郑州轻工业学院 ucgui点菜系统 ucgui 点菜 系统