switch (event.KeyInput.Key) {
case KEY_RETURN:
- if (m_allowclose) {
- acceptInput(true);
- quitMenu();
- }
- else
- current_keys_pending.key_enter = true;
+ current_keys_pending.key_enter = true;
break;
case KEY_UP:
current_keys_pending.key_up = true;
assert("reached a source line that can't ever been reached" == 0);
break;
}
- acceptInput();
+ if (current_keys_pending.key_enter && m_allowclose) {
+ acceptInput(true);
+ quitMenu();
+ }
+ else {
+ acceptInput();
+ }
return true;
}