[AD] Making joystick repeat in dialogs

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


I would like to make update_dialog allow for the joystick to repeat.
Currently it waits for a button or direction press, handles it, then
doesn't look for others until all buttons are released. This makes it
unbelievably annoying to move a slider around with a joystick ;)
I was going to just make custom do_dialog and update_dialog's, but it
would mean cutting and pasting a lot of support code, which seems
wasteful especially since other people might find the change useful.
I just wanted to make sure people thought it was ok before I did it,
since there may be a better way I'm missing.

What I came up with is to install a timer (200-250ms) that set a
joy_ready flag, then the code can handle joy buttons if the flag is
set, and set joy_ready to 0. Does this look ok?



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/