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

@ -230,11 +230,12 @@ static bool ImGui_ImplSDL2_Init(SDL_Window* window)
bd->MouseCursors[ImGuiMouseCursor_Hand] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_HAND);
bd->MouseCursors[ImGuiMouseCursor_NotAllowed] = SDL_CreateSystemCursor(SDL_SYSTEM_CURSOR_NO);
// Set platform dependent data in viewport
#ifdef _WIN32
SDL_SysWMinfo info;
SDL_VERSION(&info.version);
if (SDL_GetWindowWMInfo(window, &info))
io.ImeWindowHandle = info.info.win.window;
ImGui::GetMainViewport()->PlatformHandleRaw = (void*)info.info.win.window;
#else
(void)window;
#endif