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
| 1140 | // - with glfw you can get those from the callback set in glfwSetCharCallback() |
| 1141 | // - on Windows you can get those using ToAscii+keyboard state, or via the WM_CHAR message |
| 1142 | void ImGuiIO::AddInputCharacter(unsigned int c) |
| 1143 | { |
| 1144 | if (c != 0) |
| 1145 | InputQueueCharacters.push_back(c <= IM_UNICODE_CODEPOINT_MAX ? (ImWchar)c : IM_UNICODE_CODEPOINT_INVALID); |
| 1146 | } |
| 1147 | |
| 1148 | // UTF16 strings use surrogate pairs to encode codepoints >= 0x10000, so |
| 1149 | // we should save the high surrogate. |