mirror of
https://github.com/ocornut/imgui.git
synced 2026-01-07 13:53:16 +00:00
Platform IME: added ImGuiPlatformImeData::WantTextInput, ViewportId. Backends: SDL3: honor WantTextInput. (#8584, #7492, #6341)
This commit is contained in:
@@ -5362,7 +5362,7 @@ void ImGui::NewFrame()
|
||||
|
||||
// Platform IME data: reset for the frame
|
||||
g.PlatformImeDataPrev = g.PlatformImeData;
|
||||
g.PlatformImeData.WantVisible = false;
|
||||
g.PlatformImeData.WantVisible = g.PlatformImeData.WantTextInput = false;
|
||||
|
||||
// Mouse wheel scrolling, scale
|
||||
UpdateMouseWheel();
|
||||
@@ -5654,9 +5654,11 @@ void ImGui::EndFrame()
|
||||
if (g.PlatformIO.Platform_SetImeDataFn != NULL && memcmp(ime_data, &g.PlatformImeDataPrev, sizeof(ImGuiPlatformImeData)) != 0)
|
||||
{
|
||||
IMGUI_DEBUG_LOG_IO("[io] Calling Platform_SetImeDataFn(): WantVisible: %d, InputPos (%.2f,%.2f)\n", ime_data->WantVisible, ime_data->InputPos.x, ime_data->InputPos.y);
|
||||
IM_ASSERT(ime_data->ViewportId == IMGUI_VIEWPORT_DEFAULT_ID); // master branch
|
||||
ImGuiViewport* viewport = GetMainViewport();
|
||||
g.PlatformIO.Platform_SetImeDataFn(&g, viewport, ime_data);
|
||||
}
|
||||
g.WantTextInputNextFrame = ime_data->WantTextInput ? 1 : 0;
|
||||
|
||||
// Hide implicit/fallback "Debug" window if it hasn't been used
|
||||
g.WithinFrameScopeWithImplicitWindow = false;
|
||||
|
||||
Reference in New Issue
Block a user