1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
|
if(!*cp) cp[1]=0;
if(!o) memmove(cp+1,cp,(s+sz+1)-cp);
*cp=i;
if(i==10) r++,c=0; else c++;
}
break;
}
goto redraw;
case SDL_VIDEOEXPOSE:
goto redraw;
}
}
erase:
c=0;
|
>
>
>
>
>
>
>
>
|
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
|
if(!*cp) cp[1]=0;
if(!o) memmove(cp+1,cp,(s+sz+1)-cp);
*cp=i;
if(i==10) r++,c=0; else c++;
}
break;
}
goto redraw;
case SDL_MOUSEBUTTONDOWN:
if(ev.button.button==1 && ev.button.y>=24) {
if(c=ev.button.x>>3) c--;
i=(ev.button.y-24)>>3;
r=0;
while(r<63 && r<i && li[r+1]!=0xFFFF) r++;
}
goto redraw;
case SDL_VIDEOEXPOSE:
goto redraw;
}
}
erase:
c=0;
|
1448
1449
1450
1451
1452
1453
1454
1455
1456
1457
1458
1459
1460
1461
|
}
break;
case SDLK_UP: case SDLK_KP_MINUS: n--; break;
case SDLK_DOWN: case SDLK_KP_PLUS: n++; break;
}
if(n<=0) n=0; else if(n>=nlevelstrings) n=nlevelstrings-1;
goto redraw;
case SDL_VIDEOEXPOSE:
goto redraw;
case SDL_QUIT:
exit(0);
return -1;
}
}
|
>
>
>
>
>
>
|
1456
1457
1458
1459
1460
1461
1462
1463
1464
1465
1466
1467
1468
1469
1470
1471
1472
1473
1474
1475
|
}
break;
case SDLK_UP: case SDLK_KP_MINUS: n--; break;
case SDLK_DOWN: case SDLK_KP_PLUS: n++; break;
}
if(n<=0) n=0; else if(n>=nlevelstrings) n=nlevelstrings-1;
goto redraw;
case SDL_MOUSEBUTTONDOWN:
i=ev.button.y/8-scroll-1;
if(i<0 || i>=nlevelstrings) break;
n=i;
if(ev.button.button==3 && n<nlevelstrings) return n;
goto redraw;
case SDL_VIDEOEXPOSE:
goto redraw;
case SDL_QUIT:
exit(0);
return -1;
}
}
|