dep/imgui: Handle backspace text input

This commit is contained in:
Connor McLaughlin 2021-07-04 15:59:35 +10:00
parent 89eda96cef
commit e4b23ffb7e
1 changed files with 6 additions and 0 deletions

View File

@ -4078,6 +4078,12 @@ bool ImGui::InputTextEx(const char* label, const char* hint, char* buf, int buf_
unsigned int c = (unsigned int)io.InputQueueCharacters[n];
if (c == '\t' && io.KeyShift)
continue;
if (c == '\b')
{
state->OnKeyPressed(STB_TEXTEDIT_K_BACKSPACE);
continue;
}
if (InputTextFilterCharacter(&c, flags, callback, callback_user_data))
state->OnKeyPressed((int)c);
}