MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / OnCharPressed

Method OnCharPressed

Dependencies/ImGui/src/imgui_widgets.cpp:4192–4201  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

4190}
4191
4192void ImGuiInputTextState::OnCharPressed(unsigned int c)
4193{
4194 // Convert the key to a UTF8 byte sequence.
4195 // The changes we had to make to stb_textedit_key made it very much UTF-8 specific which is not too great.
4196 char utf8[5];
4197 ImTextCharToUtf8(utf8, c);
4198 stb_textedit_text(this, Stb, utf8, (int)ImStrlen(utf8));
4199 CursorFollow = true;
4200 CursorAnimReset();
4201}
4202
4203// Those functions are not inlined in imgui_internal.h, allowing us to hide ImStbTexteditState from that header.
4204void ImGuiInputTextState::CursorAnimReset() { CursorAnim = -0.30f; } // After a user-input the cursor stays on for a while without blinking

Callers 1

InputTextExMethod · 0.80

Calls 2

ImTextCharToUtf8Function · 0.85
stb_textedit_textFunction · 0.85

Tested by

no test coverage detected