Сообщение от odd
можно проще:
key:=GetKeyClicked;
if (key=-60) or (key=-2) then cursor:=(cursor+1) mod 5; // Вниз
if (key=-59) or (key=-1) then cursor:=(cursor+4) mod 5; // Вверх
и всё.
|
u menea vopros : kakoi kod vypolneaetsea dystree (1 ili 2 ) ?
1.
cursor:=(cursor+1) mod 5;
2. cursor:=cursor+1;
if cursor>5 then cursor:=1;