|
|
@ -128,10 +128,10 @@ void ImGui_ImplGlfwGL3_KeyCallback(GLFWwindow*, int key, int, int action, int mo |
|
|
|
io.KeyAlt = io.KeysDown[GLFW_KEY_LEFT_ALT] || io.KeysDown[GLFW_KEY_RIGHT_ALT]; |
|
|
|
} |
|
|
|
|
|
|
|
void ImGui_ImplGlfwGL3_CharModsCallback(GLFWwindow*, unsigned int c, int mods) |
|
|
|
void ImGui_ImplGlfwGL3_CharCallback(GLFWwindow*, unsigned int c) |
|
|
|
{ |
|
|
|
ImGuiIO& io = ImGui::GetIO(); |
|
|
|
if ((mods & ~GLFW_MOD_SHIFT) == 0 && c > 0 && c < 0x10000) |
|
|
|
if (c > 0 && c < 0x10000) |
|
|
|
io.AddInputCharacter((unsigned short)c); |
|
|
|
} |
|
|
|
|
|
|
@ -262,7 +262,7 @@ bool ImGui_ImplGlfwGL3_Init(GLFWwindow* window, bool install_callbacks) |
|
|
|
glfwSetMouseButtonCallback(window, ImGui_ImplGlfwGL3_MouseButtonCallback); |
|
|
|
glfwSetScrollCallback(window, ImGui_ImplGlfwGL3_ScrollCallback); |
|
|
|
glfwSetKeyCallback(window, ImGui_ImplGlfwGL3_KeyCallback); |
|
|
|
glfwSetCharModsCallback(window, ImGui_ImplGlfwGL3_CharModsCallback); |
|
|
|
glfwSetCharCallback(window, ImGui_ImplGlfwGL3_CharCallback); |
|
|
|
} |
|
|
|
|
|
|
|
return true; |
|
|
|