ImGui: Add IME preview text display for CJK text #72645
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Features "Implement IME pre-edit text for CJK text"
Purpose of change
When entering CJK text using a normal English keyboard, a "preview" mode is entered where the text isn't actually put on the screen until the user hits enter. This required a little extra work inside ImGui when rendering text.
Describe the solution
Add support within ImGui for a pre-edit text buffer which is written into and cleared when pre-edit text must be shown or not
Describe alternatives you've considered
Would have been easier to draw a new frame hovering in the middle of the window showing the pre-edit view. This is sloppy though and the users would hate it
Testing
Load the keybindings screen and type some Japanese text and verify the pre-edit displays properly.
Additional context