-
-
Notifications
You must be signed in to change notification settings - Fork 10.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement SetPlatformImeDataFn for SDL backend to locate IME at caret while typing. #6071
base: master
Are you sure you want to change the base?
Conversation
Thank you for this PR. My understanding until now was that SDL essentially broke IME under Windows, at least I could not get it to work. (See in particular #1953 which was never merged.) Are you using a recent version of SDL? Related changes in SDL: From https://www.libsdl.org/tmp/SDL/WhatsNew.txt 2.0.22
2.0.18:
Are you using |
I'm using I think programs which do not activate Without From SDL Wiki SDL_SetTextInputRect:
|
I now understand why I wasn't seeing anything Merged your PR as 734c6af + various amends and added hint to all examples + equivalent in SDL3 38a6c70 However
I tried to let it use your own implementation embedded in imgui.cpp, which can be used once |
Right, this is the topic of #5878 I'll answer there. |
…t#6071, ocornut#1953) + fix SDL3 setting PlatformHandleRaw. (ocornut#6146)
Implement SetPlatformImeDataFn for SDL backend to properly locate IME candidate panel while typing in utf-8 enabled
ImGui::InputText
.From SDL Wiki:
Screenshots
Before patch:
After patch:
Tests
Tested
example_sdl_sdlrenderer
,example_sdl_opengl2
,example_sdl_opengl3
on Ubuntu 16.04(X11 + IBus)For testing, I use the following code to load a Chinese TTF font: