Platform IME: changed io.ImeSetInputScreenPosFn() to io.SetPlatformImeDataFn() API.

Ref #2589, #2598, #3108, #3113, #3653, #4642
This commit is contained in:
ocornut
2022-01-05 13:03:48 +01:00
parent 04bc0b0bb8
commit 3a90dc3893
7 changed files with 68 additions and 26 deletions

View File

@ -246,8 +246,10 @@ static bool ImGui_ImplGlfw_Init(GLFWwindow* window, bool install_callbacks, Glfw
io.SetClipboardTextFn = ImGui_ImplGlfw_SetClipboardText;
io.GetClipboardTextFn = ImGui_ImplGlfw_GetClipboardText;
io.ClipboardUserData = bd->Window;
// Set platform dependent data in viewport
#if defined(_WIN32)
io.ImeWindowHandle = (void*)glfwGetWin32Window(bd->Window);
ImGui::GetMainViewport()->PlatformHandleRaw = (void*)glfwGetWin32Window(bd->Window);
#endif
// Create mouse cursors