Тема: keys/game library
Показать сообщение отдельно
Старый 25.11.2010, 20:38   #13
NastyKhan
Оператор ЭВМ
 
Регистрация: 26.09.2010
Сообщений: 29
Написано 0 полезных сообщений
(для 0 пользователей)
Ответ: keys/game library

What about GetKeyClicked? I critically need it.

lib_keys allow me only to do this:

key:integer;

if (keys.get_bit(key, FIRE_PRESSED) <> 0) then pause;


but that function is checking if the button is PRESSED, not CLICKED. For example: I set the game to "pause" by clicking FIRE, and when paused - second click to "unpause". The effect is, that when i press FIRE (for 0.5s) the game begin to RAPIDLY pause,unpause,pause,unpause :/

Other example: I made a slide-show intro, when slides are changed by clicking fire (1 click - 1 slide). But when i press it just for a half of second, i rapidly skip all of them.

One more thing:
As far as I know (might me wrong however) lib_keys doesn't support softkeys, and 1,3,7,9 corner keys.

And:
I cannot make any 'press any key' event, cause lib seems to support only one button per function.

Because of that i just.. NEED something that would check 'clicking' instead of 'being pressed', as well as detecting ALL buttons. GetKeyClicked is good, but it doesn't work.. Help me fix that and i will die happy.
(Offline)
 
Ответить с цитированием