📄 menu2.c
字号:
void menu2(int x,int y)
{int size,buttons=0,temp=0;
char *buffer;
size=imagesize(152,315,202,405);
buffer=malloc(size);
cursoroff();
getimage(152,315,202,405,buffer);
putimage(152,315,buffer,XOR_PUT);
setcolor(WHITE);
rectangle(152,315,202,405);
paint(WHITE,160,350,1);
line(152,345,202,345);
line(152,375,202,375);
printxs(160,322,"战争",YELLOW);
printxs(160,352,"微兵",YELLOW);
printxs(160,382,"训练",YELLOW);
for(;;)
{
mouse(&x,&y,&buttons);
if (buttons==1 && x>152 && x<202 && y>345 && y<375)
{temp=addsolider(202,255);if (temp!=0) {actionhouse(housedat[action]);};break;}
if (buttons==1)
if (x<152 || x>202 || y<315 || y>455) break;
if (buttons==2) break;
}
cursoroff();
putimage(152,315,buffer,COPY_PUT);
free(buffer);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -