MCPcopy Create free account
hub / github.com/GPUOpen-LibrariesAndSDKs/Cauldron / AddInputCharacter

Method AddInputCharacter

libs/imgui/imgui.cpp:824–832  ·  view source on GitHub ↗

Pass in translated ASCII characters for text input. - with glfw you can get those from the callback set in glfwSetCharCallback() - on Windows you can get those using ToAscii+keyboard state, or via the WM_CHAR message

Source from the content-addressed store, hash-verified

822// - with glfw you can get those from the callback set in glfwSetCharCallback()
823// - on Windows you can get those using ToAscii+keyboard state, or via the WM_CHAR message
824void ImGuiIO::AddInputCharacter(ImWchar c)
825{
826 const int n = ImStrlenW(InputCharacters);
827 if (n + 1 < IM_ARRAYSIZE(InputCharacters))
828 {
829 InputCharacters[n] = c;
830 InputCharacters[n+1] = '\0';
831 }
832}
833
834void ImGuiIO::AddInputCharactersUTF8(const char* utf8_chars)
835{

Callers 1

ImGUI_WndProcHandlerFunction · 0.80

Calls 1

ImStrlenWFunction · 0.85

Tested by

no test coverage detected