mirror of
https://github.com/ocornut/imgui.git
synced 2024-12-06 07:42:53 +08:00
This commit is contained in:
parent
ec461c6ccb
commit
1668693bcf
@ -156,13 +156,13 @@ static void ImGui_ImplSDL2_SetClipboardText(void*, const char* text)
|
||||
}
|
||||
|
||||
// Note: native IME will only display if user calls SDL_SetHint(SDL_HINT_IME_SHOW_UI, "1") _before_ SDL_CreateWindow().
|
||||
static void ImGui_ImplSDL2_SetPlatformImeData(ImGuiViewport*, ImGuiPlatformImeData* data)
|
||||
static void ImGui_ImplSDL2_SetPlatformImeData(ImGuiViewport* viewport, ImGuiPlatformImeData* data)
|
||||
{
|
||||
if (data->WantVisible)
|
||||
{
|
||||
SDL_Rect r;
|
||||
r.x = (int)data->InputPos.x;
|
||||
r.y = (int)data->InputPos.y;
|
||||
r.x = (int)(data->InputPos.x - viewport->Pos.x);
|
||||
r.y = (int)(data->InputPos.y - viewport->Pos.y + data->InputLineHeight);
|
||||
r.w = 1;
|
||||
r.h = (int)data->InputLineHeight;
|
||||
SDL_SetTextInputRect(&r);
|
||||
|
@ -97,13 +97,13 @@ static void ImGui_ImplSDL3_SetClipboardText(void*, const char* text)
|
||||
SDL_SetClipboardText(text);
|
||||
}
|
||||
|
||||
static void ImGui_ImplSDL3_SetPlatformImeData(ImGuiViewport*, ImGuiPlatformImeData* data)
|
||||
static void ImGui_ImplSDL3_SetPlatformImeData(ImGuiViewport* viewport, ImGuiPlatformImeData* data)
|
||||
{
|
||||
if (data->WantVisible)
|
||||
{
|
||||
SDL_Rect r;
|
||||
r.x = (int)data->InputPos.x;
|
||||
r.y = (int)data->InputPos.y;
|
||||
r.x = (int)(data->InputPos.x - viewport->Pos.x);
|
||||
r.y = (int)(data->InputPos.y - viewport->Pos.y + data->InputLineHeight);
|
||||
r.w = 1;
|
||||
r.h = (int)data->InputLineHeight;
|
||||
SDL_SetTextInputRect(&r);
|
||||
|
@ -163,6 +163,7 @@ Docking+Viewports Branch:
|
||||
- Docking: Fixed using GetItemXXX() or IsItemXXX() functions after a DockSpace(). (#6217)
|
||||
- Backends: GLFW: Fixed key modifiers handling on secondary viewports. (#6248, #6034) [@aiekick]
|
||||
- Backends: GLFW: Fixed Emscripten erroneously enabling multi-viewport support, leading to assert. (#5683)
|
||||
- Backends: SDL2/SDL3: Fixed IME text input rectangle position with viewports. (#6071, #1953)
|
||||
- Backends: SDL3: Fixed for compilation with multi-viewports. (#6255) [@P3RK4N]
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user