mirror of
https://github.com/RetroDECK/Duckstation.git
synced 2024-11-22 13:55:38 +00:00
dep/imgui: Handle backspace text input
This commit is contained in:
parent
89eda96cef
commit
e4b23ffb7e
|
@ -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];
|
unsigned int c = (unsigned int)io.InputQueueCharacters[n];
|
||||||
if (c == '\t' && io.KeyShift)
|
if (c == '\t' && io.KeyShift)
|
||||||
continue;
|
continue;
|
||||||
|
if (c == '\b')
|
||||||
|
{
|
||||||
|
state->OnKeyPressed(STB_TEXTEDIT_K_BACKSPACE);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
if (InputTextFilterCharacter(&c, flags, callback, callback_user_data))
|
if (InputTextFilterCharacter(&c, flags, callback, callback_user_data))
|
||||||
state->OnKeyPressed((int)c);
|
state->OnKeyPressed((int)c);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue