Sunday, November 29, 2009

IO_Menu and IO_CheckList

In Fardad's IO_Menu and IO_CheckList, when you reach the last item in the vertical menu, radio, or checkbox and you press down key, it does nothing and stops there. But it's supposed to go back to the first item. And the up key has the same problem. So I change some codes there to fix the problem.
For example in Vertical Menu:
case DOWN_KEY:
if(_dir == Vertical){
if(x < _len-1){
x++;
}
else {
x=0;
}
}
else{
done = true;
}
break;
case UP_KEY:
if(_dir == Vertical){
if(x > 0){
x--;
}
else {
x=_len-1;
}
}
Then, do the same thing to IO_CheckList.

No comments:

Post a Comment