core::dimension2d<s32> absrec_size = AbsoluteRect.getSize();
rect = core::rect<s32>(AbsoluteRect.UpperLeftCorner.X - spec.pos.X,
AbsoluteRect.UpperLeftCorner.Y - spec.pos.Y,
- AbsoluteRect.UpperLeftCorner.X + absrec_size.Width + spec.pos.X*2,
- AbsoluteRect.UpperLeftCorner.Y + absrec_size.Height + spec.pos.Y*2);
+ AbsoluteRect.UpperLeftCorner.X + absrec_size.Width + spec.pos.X,
+ AbsoluteRect.UpperLeftCorner.Y + absrec_size.Height + spec.pos.Y);
}
const video::SColor color(255,255,255,255);
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;
}