Skip to content
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

Render uncommitted IME text in bottom left corner #1187

Merged
merged 3 commits into from
Aug 3, 2024

Conversation

Daaaav
Copy link
Contributor

@Daaaav Daaaav commented Aug 2, 2024

Changes:

As a followup to #1041 and the discussion inside it, this PR now shows the current candidate text (the uncommitted text being edited in the IME) in a box in the bottom left corner. This visualizes the data from SDL_TEXTEDITING[_EXT] events and makes it easier to input CJK text.

So at first (before #1041) you couldn't see what you were doing at all, after #1041 you could at least see the candidate list making it much clearer what was going on but you couldn't see the uncommitted text, and now you can also see the uncommitted text.

Not much more to explain about it except for a demo video:

2024-08-02_03-22-30.mp4

Legal Stuff:

By submitting this pull request, I confirm that...

  • My changes may be used in a future commercial release of VVVVVV
  • I will be credited in a CONTRIBUTORS file and the "GitHub Friends"
    section of the credits for all of said releases, but will NOT be compensated
    for these changes unless there is a prior written agreement

When inputting uncommitted text from an IME, this is now stored in a
std::string imebuffer, just like keybuffer. It also enables extended
editing events, so text longer than what fits in the standard editing
event is also supported. This commit does not yet display the text
onscreen.
This shows the uncommitted text in a box in the bottom left corner.
This doesn't show the selection (defined by the start and length fields
in the event) yet, but this is already much better than it was on its
own, and I don't know how urgent the selection is since it's broken on
Windows anyway.
Decided to implement it anyway since the broken behavior (selection
length always being 0, at least on Windows) may get fixed later in SDL,
so let's do it right in one go.
@InfoTeddy InfoTeddy self-assigned this Aug 2, 2024
@InfoTeddy InfoTeddy merged commit 9ec8d8b into TerryCavanagh:master Aug 3, 2024
3 of 4 checks passed
@Daaaav Daaaav deleted the show-ime-neo branch August 7, 2024 01:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants