-
-
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
Letters only in Text box? #130
Comments
No but that could be added very easily following what ImGuiInputTextFlags_CharsHexadecimal is doing. Flag definition in imgui.h
Code in imgui.cpp, InputTextFilterCharacter()
Would you like a-zA-Z only and not anything else? |
Yes just A-Z, also is there a way so it's only capital letters? Thanks |
A-Z is a bit specific so I have added a character filtering system so you can filter characters yourself.
|
Here's a callback function that does the filtering you want
|
Got it working now! Thank you so much! :) |
Just noticed a little bug. We you put cap locks on and type letters, they are outputted as numbers or symbols. |
Yes sorry the function i wrote above wasn't tested and its wrong. Just increment the character if its a lowercase. |
e.g. (sorry it's hard typing code in the github box)
|
Is there a way to only allow letters in ImGui::InputText?
The text was updated successfully, but these errors were encountered: