Skip to main content
gamedev.net
🔒 Locked

DirectInput too fast

Started by Kryptus 0 replies 300+ views
Original Post
Kryptus
Kryptus
I have a menu which i made that uses the keyboard to move up and down selecting the different options but when i hold down the DOWN or UP keys they scroll through the menu heaps fast. How do I slow it down?
RhoneRanger
RhoneRanger
Use your timer!

TimeToTestForInput += ElapsedTime;
if(TimeToTestForInput>=0.5f) //every half second, or whatever you want
{
CheckForInput;
TimeToTestForInput=0.0f;
}
TechleadEnilno, the Ultima 2 projectwww.dr-code.org/enilno

Topic Locked

This topic has been locked by a moderator. New replies are not allowed.

Sign in to reply to this topic.