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

IME improvements proposal #4331

Closed
isage opened this issue Apr 24, 2021 · 4 comments
Closed

IME improvements proposal #4331

isage opened this issue Apr 24, 2021 · 4 comments
Assignees
Labels
abandoned Bug has been abandoned for various reasons
Milestone

Comments

@isage
Copy link
Contributor

isage commented Apr 24, 2021

There are platforms (psvita / switch), where on-screen keyboard takes whole screen and have no way to provide SDL_TEXTEDITING event. Instead, those support setting initial text and dialog title. They also allow to set dialog type (e.g. text, numeric, etc.)

Proposal is to have something like SDL_StartTextInputAdvanced(const char* title, const char* initial_text, SDL_ImeType type);
That also requires different from SDL_TEXTINPUT event, because SDL_TEXTINPUT works properly only in conjunction with SDL_TEXTEDITING.

This was requested by devilutionX developers, so here's real life usage example:
When creating new player character, engine generates initial name for it, which player can change.
Problem 1: right now it's impossible to pass such name to OSK.
Problem 2: After user finishes text input in OSK, OSK sends SDL_TEXTINPUT event with whole text. So while on desktop platforms this works well, because there's SDL_TEXTEDITING event, and if user removed/edited initial name - that's handled, on vita and switch that leads to text from OSK being appended to initial player name instead, as engine doesn't/can't know if initial name was edited/removed.

@slouken slouken self-assigned this Jul 23, 2021
@slouken slouken added this to the 2.0.18 milestone Jul 23, 2021
@slouken
Copy link
Collaborator

slouken commented Jul 23, 2021

Do you have a proposed patch that implements this, and a test program to verify it?

@isage
Copy link
Contributor Author

isage commented Jul 23, 2021

Nope

@icculus
Copy link
Collaborator

icculus commented Nov 7, 2021

This is bumping out of 2.0.18, but I would like to do something like this for the Switch branch sooner than later, so I might take a stab at it for 2.0.20.

@icculus icculus modified the milestones: 2.0.18, 2.0.20 Nov 7, 2021
@icculus icculus self-assigned this Nov 7, 2021
@slouken slouken modified the milestones: 2.0.22, 3.0 Mar 17, 2022
@slouken slouken added the abandoned Bug has been abandoned for various reasons label Nov 7, 2023
@slouken
Copy link
Collaborator

slouken commented Nov 7, 2023

SDL 2.0 is now in maintenance mode, and all inactive issues are being closed. If this issue is impacting you, please feel free to reopen it with additional information.

@slouken slouken closed this as not planned Won't fix, can't repro, duplicate, stale Nov 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
abandoned Bug has been abandoned for various reasons
Projects
None yet
Development

No branches or pull requests

3 participants