return 1;
}
}
- return SUPER(Dialog).keyDown(me, key, ascii, shift);
+ float r = SUPER(Dialog).keyDown(me, key, ascii, shift);
+ if (!me.closable && key == K_ESCAPE)
+ return 1;
+ return r;
}
float InputContainer_keyDown(entity me, float scan, float ascii, float shift)
{
entity f, ff;
- if (SUPER(InputContainer).keyDown(me, scan, ascii, shift)) return 1;
+ if (SUPER(InputContainer).keyDown(me, scan, ascii, shift))
+ return 1;
if (scan == K_ESCAPE)
{
f = me.focusedChild;
else
{
draw_reset_cropped();
- if (!mouseButtonsPressed && key >= K_MOUSE1 && key <= K_MOUSE3) main.mousePress(main, menuMousePos);
+ if (!mouseButtonsPressed && key >= K_MOUSE1 && key <= K_MOUSE3)
+ main.mousePress(main, menuMousePos);
if (!main.keyDown(main, key, ascii, menuShiftState))
{
// disable menu on unhandled ESC