Internals: Replace unsigned short with ImWchar when dealing with character storage (missing cases) + in imgui_impl_ file keep using neutral type everywhere, added missing explicit cast in three bindings. (#2078)

This commit is contained in:
omar
2018-09-11 22:00:39 +02:00
parent 201fcfd2e5
commit 9cc63ba279
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -97,7 +97,7 @@ void ImGui_ImplFreeGLUT_KeyboardFunc(unsigned char c, int x, int y)
//printf("char_down_func %d '%c'\n", c, c);
ImGuiIO& io = ImGui::GetIO();
if (c >= 32)
io.AddInputCharacter(c);
io.AddInputCharacter((unsigned short)c);
// Store letters in KeysDown[] array as both uppercase and lowercase + Handle GLUT translating CTRL+A..CTRL+Z as 1..26.
// This is a hacky mess but GLUT is unable to distinguish e.g. a TAB key from CTRL+I so this is probably the best we can do here.