fixed esc key that I broke recently

This commit is contained in:
Magnus Auvinen 2008-10-21 18:25:28 +00:00
parent daf9a100eb
commit bf09116059

View file

@ -930,8 +930,6 @@ bool MENUS::on_input(INPUT_EVENT e)
{
last_input = time_get();
if(is_active())
{
// special handle esc and enter for popup purposes
if(e.flags&INPFLAG_PRESS)
{
@ -941,12 +939,13 @@ bool MENUS::on_input(INPUT_EVENT e)
set_active(!is_active());
return true;
}
else if(e.key == KEY_ENTER)
}
if(is_active())
{
// special for popups
if(e.flags&INPFLAG_PRESS || e.key == KEY_ENTER)
enter_pressed = true;
return true;
}
}
if(num_inputevents < MAX_INPUTEVENTS)
inputevents[num_inputevents++] = e;