|
|
|
![]() |
|
|||||||
|
||||||||
|
|
Thread Tools | Rate Thread | Display Modes |
|
#2
|
||||
|
||||
|
Re: button control
You could set a flag and use a counter. It would probably look something like this:
static int flag = 0; static int counter = 0; if(button_pressed) { flag = 1; } if(flag && counter < some_number) { //your code } else { flag = 0; counter = 0; } counter++; I'm probably missing something, but that's the general idea. I think there are about 40 loop counts in one second. |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| XBOX button | fondyfire12 | Programming | 8 | 25-05-2007 15:39 |
| button programming | joesmomh00haha | Programming | 12 | 10-02-2007 10:36 |
| Sarcasm Button | Jessica Boucher | CD Forum Support | 3 | 19-03-2006 16:02 |
| Button Making | PureMachine4 | Rumor Mill | 58 | 16-04-2004 16:00 |
| Button Bar | Adrian Wong | CD Forum Support | 8 | 04-06-2001 20:27 |