Hi @ all,
i have a question regarding the user key input. Say i have a options dialog with some options like resolution and several key settings for the player.
i know, that i can store a single user input with:
al_ustr_append_chr(ALLEGRO_USTR, event.keyboard.unichar);
but how does this work for multiple input fields? Is there a tutorial for this kind of problem? ^^
greetings
sa1k01
You'll have to set a focus variable when the user clicks on a field. Then only accept input when that field has focus.
thx for the reply.
mh ok. then i should just wait for an mouse click event and save the x and y position of the label, right?
i will give it a try and let you know if this works.
kind regards
sa1k01
If you're using a struct/class to store your input field object, then just use a pointer to the active object, or store a flag in the class :