PDA

View Full Version : Setting bindings - question



Darkhog
01-07-2013, 10:45 AM
My game will need setting bindings. I have question tho about setting them up. Is (in pseudo pascal)

repeat until keypressed; up:=readkey;

enough or do I need something more complicated?

User137
01-07-2013, 11:23 AM
Depends on application, and usable input components. You propably want to animate menu graphics while reading the key.

Super Vegeta
04-07-2013, 07:48 PM
crt has a small buffer for keys (16 bytes, I think), so you don't need to grab the key via readkey() instantly.

repeat
sleep();
animateMenu()
until keypressed;
key := readkey();

Darkhog
04-07-2013, 10:19 PM
Hm, thanks. By the way, you may know me as Rave. But that's just small tip.