// HEL Library \\ |
|
Initialize the pad system.
Call this once at the beginning, to initialize the pad system. The pad behaviour is set to
|
|
Read pad state. The hel_PadReadState function should be called once per frame only.
After calling the hel_PadReadState function, the global variable
|
|
Reset the pad system.
Call this to clear the pad states in the global variable
|
|
Set Pad behaviour. The Pad-Behaviour has only impact on the 'Pressed' state. It can be specified if a padbutton is pressed when it is pushed (button down) or released (button up).
|
|
Variable which holds the Pad states.
After hel_PadReadState has been called, the variable Here is a tiny example program:
void main() { // Initialize pad system hel_PadInit(); // Set pad behaviour hel_PadSetBehaviour(PAD_BEHAVIOUR_PRESSED_ON_BUTTON_DOWN); // Infinite loop while(TRUE) { // Make sure its a new frame if(IsNewFrame) { // Read pad states hel_PadReadState(); // Access pad variable // Check if button down has been pressed if(hel_Pad.Pressed.Down) { Go_One_Menu_Item_Down(); } else if(hel_Pad.Pressed.Up) { Go_One_Menu_Item_Up(); } IsNewFrame = FALSE; } } // reset pad system hel_PadReset(); } |