This repository has been archived by the owner on Dec 20, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
selectRadioButton()
Mammad900 edited this page Feb 28, 2021
·
1 revision
Selects a radio-button, as if it was clicked.
Note: If another radio-button with the same group number as the given one was already checked, that one will be unchecked.
- Page (
int
) : The number of the page which contains the radio-button - I (
int
) : Radio-button index in the page - Draw (
bool
) Optional : Passfalse
if it is not in the selected page. Default:true
Nothing
int selected=0;
#define RADIO_BUTTON_COUNT 4
void onDownButtonPressed(){
// ...
if(CurrentPage==3) {
selected++;
if(selected==RADIO_BUTTON_COUNT){
selected=0;
}
selectRadioButton(3, selected);
}
// ...
}
void onUpButtonPressed(){
// ...
if(CurrentPage==3) {
selected--;
if(selected==-1){
selected=RADIO_BUTTON_COUNT-1;
}
selectRadioButton(3, selected);
}
// ...
}
The selected radio-button is changed when up or down button is pressed.