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
| 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 |
| 824 | void 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 | |
| 834 | void ImGuiIO::AddInputCharactersUTF8(const char* utf8_chars) |
| 835 | { |
no test coverage detected