#9779 - KoaM - Mon Aug 18, 2003 1:11 am
Hey all, KoaM the GBA n00b here again.
I have a question obviously.
I'm trying to detect keypresses.
Now I use the
if(!(*KEYS & KEY_B))
format to detect the presses which works fine when the person is holding down the button. Now suppose I want to make it so that if the person presses "B" for example, whatever is in the "if(!(*KEYS & KEY_B))" statement will only happen once, until the person releases the "B" button and presses it again, how would i go about this?
I guess my question for those of you familiar with VB terminology is how do i code ON_KEY_PRESS instead of ON_KEY_DOWN in C++.
I have a question obviously.
I'm trying to detect keypresses.
Now I use the
if(!(*KEYS & KEY_B))
format to detect the presses which works fine when the person is holding down the button. Now suppose I want to make it so that if the person presses "B" for example, whatever is in the "if(!(*KEYS & KEY_B))" statement will only happen once, until the person releases the "B" button and presses it again, how would i go about this?
I guess my question for those of you familiar with VB terminology is how do i code ON_KEY_PRESS instead of ON_KEY_DOWN in C++.