Support delete key in chatbox

This commit is contained in:
LJ Sonic 2022-01-03 00:30:16 +01:00
parent af629fefe9
commit 159be00109

View file

@ -1170,6 +1170,13 @@ boolean HU_Responder(event_t *ev)
memmove(&w_chat[c_input - 1], &w_chat[c_input], strlen(w_chat) - c_input + 1);
c_input--;
}
else if (c == KEY_DEL)
{
if (CHAT_MUTE || c_input >= strlen(w_chat))
return true;
memmove(&w_chat[c_input], &w_chat[c_input + 1], strlen(w_chat) - c_input);
}
return true;
}