用easyx写的一个暂停游戏的子函数。。。调了几次都不起作用。
voidpause(int&i)//鼠标识别暂停游戏{MOUSEMSGm;if(MouseHit()){m=GetMouseMsg();switch(m.uMsg){ca...
void pause(int &i)//鼠标识别暂停游戏
{
MOUSEMSG m;
if(MouseHit())
{m =GetMouseMsg() ;
switch(m.uMsg)
{
case WM_LBUTTONDOWN:
if(m.x>670&&m.x<750&&m.y>120 &&m.y<180)
{setfillstyle(BLACK);
setcolor(WHITE);
fillrectangle(670, 120, 830, 180);
char zan[]="继续游戏";
outtextxy(710,140,zan);
i=1;}}}
while(i)
{
m =GetMouseMsg() ;
switch(m.uMsg)
{
case WM_LBUTTONDOWN:
if(m.x>750&&m.x<830&&m.y>120 &&m.y<180)
{setfillstyle(BLACK);
setcolor(WHITE);
fillrectangle(670, 120, 830, 180);
char zan[]="继续游戏";
outtextxy(710,140,zan);
i=0;
}
}}} 展开
{
MOUSEMSG m;
if(MouseHit())
{m =GetMouseMsg() ;
switch(m.uMsg)
{
case WM_LBUTTONDOWN:
if(m.x>670&&m.x<750&&m.y>120 &&m.y<180)
{setfillstyle(BLACK);
setcolor(WHITE);
fillrectangle(670, 120, 830, 180);
char zan[]="继续游戏";
outtextxy(710,140,zan);
i=1;}}}
while(i)
{
m =GetMouseMsg() ;
switch(m.uMsg)
{
case WM_LBUTTONDOWN:
if(m.x>750&&m.x<830&&m.y>120 &&m.y<180)
{setfillstyle(BLACK);
setcolor(WHITE);
fillrectangle(670, 120, 830, 180);
char zan[]="继续游戏";
outtextxy(710,140,zan);
i=0;
}
}}} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询