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

SDL_TEXTINPUT_TYPE_NUMBER doesn't support inputting decimal numbers on iOS #12025

Closed
Susko3 opened this issue Jan 20, 2025 · 2 comments
Closed
Assignees
Milestone

Comments

@Susko3
Copy link
Contributor

Susko3 commented Jan 20, 2025

It currently uses UIKeyboardTypeNumberPad, which only supports the digits 0-9. But on Android, it uses TYPE_CLASS_NUMBER | TYPE_NUMBER_VARIATION_NORMAL which additionally support the decimal separator.

Either update iOS to use DecimalPad or add a new SDL_TEXTINPUT_TYPE_DECIMAL.

How SDL_TEXTINPUT_TYPE_NUMBER looks on Android:

Image

@Susko3
Copy link
Contributor Author

Susko3 commented Jan 20, 2025

Alternatively, you can also add an iOS equivalent of SDL_PROP_TEXTINPUT_ANDROID_INPUTTYPE_NUMBER.

@slouken slouken added this to the 3.2.0 milestone Jan 20, 2025
@slouken slouken self-assigned this Jan 20, 2025
@slouken
Copy link
Collaborator

slouken commented Jan 20, 2025

Fixed, thanks!

frenzibyte added a commit to frenzibyte/osu-framework that referenced this issue Jan 21, 2025
Was using "TEXT" for iOS's sake, but that is now fixed in libsdl-org/SDL#12025.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants