Platform IME: added ImGuiPlatformImeData::WantTextInput, ViewportId. Backends: SDL3: honor WantTextInput. (#8584, #7492, #6341)

This commit is contained in:
ocornut
2025-04-22 11:21:02 +02:00
parent af987eb117
commit bf0f586b69
6 changed files with 27 additions and 13 deletions
+7 -5
View File
@@ -3626,14 +3626,16 @@ struct ImGuiPlatformIO
void* Renderer_RenderState;
};
// (Optional) Support for IME (Input Method Editor) via the platform_io.Platform_SetImeDataFn() function.
// (Optional) Support for IME (Input Method Editor) via the platform_io.Platform_SetImeDataFn() function. Handler is called during EndFrame().
struct ImGuiPlatformImeData
{
bool WantVisible; // A widget wants the IME to be visible
ImVec2 InputPos; // Position of the input cursor
float InputLineHeight; // Line height
bool WantVisible; // A widget wants the IME to be visible.
bool WantTextInput; // A widget wants text input, not necessarily IME to be visible. This is automatically set to the upcoming value of io.WantTextInput.
ImVec2 InputPos; // Position of input cursor (for IME).
float InputLineHeight; // Line height (for IME).
ImGuiID ViewportId; // ID of platform window/viewport.
ImGuiPlatformImeData() { memset(this, 0, sizeof(*this)); }
ImGuiPlatformImeData() { memset(this, 0, sizeof(*this)); }
};
//-----------------------------------------------------------------------------