Allow enter to select items from combobox's list (#7351)

master
Rob Blanckaert 2018-07-28 03:58:16 -07:00 committed by SmallJoker
parent e8aad2ee00
commit 2b83af783b
1 changed files with 3 additions and 1 deletions

View File

@ -2981,7 +2981,9 @@ bool GUIFormSpecMenu::preprocessEvent(const SEvent& event)
gui::IGUIElement *focused = Environment->getFocus();
if (focused && isMyChild(focused) &&
(focused->getType() == gui::EGUIET_LIST_BOX ||
focused->getType() == gui::EGUIET_CHECK_BOX)) {
focused->getType() == gui::EGUIET_CHECK_BOX) &&
(focused->getParent()->getType() != gui::EGUIET_COMBO_BOX ||
event.KeyInput.Key != KEY_RETURN)) {
OnEvent(event);
return true;
}