Difference between revisions of "Wpad info"
Latest revision as of 17:39, 10 April 2011
INT wpad_info ( <INT wpad_number> , <INT infotype> )
Returns info from controller wpad_number.
|INT wpad_number||- The controller whose state you want to retrieve. wpad_number must be a positive integer up to 8 (the maximum number of controllers supported by the Wii console).|
|INT infotype||- What type of information you want.|
INT : Returns the information you want.
If the specified infotype was not recognized it returns 0.
Process Main() Begin set_mode(320, 240, 8); // Wait until the first controller is fully ready while(! wpad_is_ready(1)) frame; end; // Display whether the Nunchuk is connected to this controller or not if(wpad_info(1, WPAD_HAS_NUNCHUK)) write(0, 160, 120, 4, "Nunchuk is attached to Wiimote 1"); else write(0, 160, 120, 4, "Nunchuk not attached to Wiimote 1"); end // Pressing button "A" on your Wiimote will trigger a mouse.left event while(! mouse.left) frame; end; End