Posted 16 May 2012 - 02:37 AM
I was curious as to if you could use read() or os.pullEvent() with an added argument to only accept input for a specified amount of time. An example as to where this might be useful would be:
If you had a menu with a moving background or image (like a character moving) and you wanted this character to change positions every half second but you still wanted to be accepting input at the same or roughly the same time. So the user could press the arrow keys to navigate the menu whilst the background is shifting through its phases.
The reason read() or os.pullEvent() won't work for this is because if the user is thinking about his/her decision on what option to pick, the background will lay motionless until a key is pressed to trigger the background change.
Any ideas?
Thanks in advance, PaymentOption.
If you had a menu with a moving background or image (like a character moving) and you wanted this character to change positions every half second but you still wanted to be accepting input at the same or roughly the same time. So the user could press the arrow keys to navigate the menu whilst the background is shifting through its phases.
The reason read() or os.pullEvent() won't work for this is because if the user is thinking about his/her decision on what option to pick, the background will lay motionless until a key is pressed to trigger the background change.
Any ideas?
Thanks in advance, PaymentOption.