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

User input #985

Open
May-Medhat opened this Issue Jan 18, 2019 · 1 comment

Comments

Projects
None yet
2 participants
@May-Medhat
Copy link

May-Medhat commented Jan 18, 2019

Kindly, I am new to allegro I searched a lot but I could not figure how to take input from user as ID or name in allegro 5 I used event keyboard char it accept only one value to select an option for example.

@beoran

This comment has been minimized.

Copy link
Contributor

beoran commented Jan 18, 2019

To implement text input, you will need to capture several keystrokes and concatenate their text values together as a string. You can also handle the backspace , delete and arrow keys to allow more comfortable editing.

The example https://github.com/liballeg/allegro5/blob/master/examples/nihgui.cpp#L781 shows how this can be done in the small GUI library that we use for the examples.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.