allow for using up/down in menus

svn-id: r28996
This commit is contained in:
Matthew Hoops 2007-09-20 22:44:48 +00:00
parent 3d4f10a302
commit 4436433cf6

View File

@ -81,12 +81,21 @@ bool Troll::getMenuSel(const char *szMenu, int *iSel, int nSel) {
inventory();
return false;
break;
case Common::KEYCODE_DOWN:
case Common::KEYCODE_SPACE:
*iSel += 1;
if (*iSel == nSel)
*iSel = IDI_TRO_SEL_OPTION_1;
drawMenu(szMenu, *iSel);
break;
case Common::KEYCODE_UP:
*iSel -= 1;
if (*iSel == IDI_TRO_SEL_OPTION_1 - 1)
*iSel = nSel - 1;
drawMenu(szMenu, *iSel);
break;
case Common::KEYCODE_RETURN: