![]() |
|
Initialize the pad system.
Call this once at the beginning, to initialize the pad system. The pad behavior is set to
|
|
Read pad state. The hel_PadReadState function should be only called once per frame.
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
|
|
Variable which holds the Pad states.
After hel_PadReadState has been called, the golbal variable Here is an example program:
void main() { // Initialize pad system hel_PadInit(); // Set pad behavior 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(); } |