InputText() consume input characters immediately (fixes #105)

This commit is contained in:
ocornut 2015-01-03 17:37:39 +00:00
parent e4f96147de
commit 34664dc28c

View File

@ -4883,6 +4883,9 @@ bool ImGui::InputText(const char* label, char* buf, size_t buf_size, ImGuiInputT
edit_state.OnKeyPressed(c); edit_state.OnKeyPressed(c);
} }
} }
// Consume characters
memset(g.IO.InputCharacters, 0, sizeof(g.IO.InputCharacters));
} }
edit_state.CursorAnim += g.IO.DeltaTime; edit_state.CursorAnim += g.IO.DeltaTime;