CANCEL now backs out one menu instead of all of them in Setup

git-svn-id: svn://svn.code.sf.net/p/sc2/code/trunk@2114 8092fc87-c524-0410-9efc-e669fe64eaf9
This commit is contained in:
mcmartin
2005-12-26 08:20:15 +00:00
parent b38ef3cdb6
commit 76b17619ef
3 changed files with 11 additions and 1 deletions
+1
View File
@@ -1,4 +1,5 @@
Changes towards version 0.5:
- CANCEL now behaves as expected in setup menu - Michael
- Only SELECT and CANCEL trigger the fade-to-black at the end of a
Super Melee, solving the issue in bug #547 - Michael
- Admiral ZEX is no longer referred to as "Commander" or "Zex" (bug
+5
View File
@@ -494,6 +494,11 @@ Widget_HandleEventMenuScreen (WIDGET *_self, int event)
case WIDGET_EVENT_DOWN:
dx = 1;
break;
case WIDGET_EVENT_CANCEL:
/* On cancel, shift focus to last element and send a SELECT. */
self->highlighted = self->num_children - 1;
widget_focus = self->child[self->highlighted];
return (widget_focus->handleEvent)(widget_focus, WIDGET_EVENT_SELECT);
default:
return FALSE;
}
+5 -1
View File
@@ -731,11 +731,15 @@ DoSetupMenu (PSETUP_MENU_STATE pInputState)
{
Widget_Event (WIDGET_EVENT_SELECT);
}
if (PulsedInputState.key[KEY_MENU_CANCEL])
{
Widget_Event (WIDGET_EVENT_CANCEL);
}
SleepThreadUntil (pInputState->NextTime + MENU_FRAME_RATE);
pInputState->NextTime = GetTimeCounter ();
return !((GLOBAL (CurrentActivity) & CHECK_ABORT) ||
PulsedInputState.key[KEY_MENU_CANCEL] || (next == NULL));
(next == NULL));
}
void