mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
fixed esc key that I broke recently
This commit is contained in:
parent
daf9a100eb
commit
bf09116059
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue