Skip to content
This repository has been archived by the owner on Dec 20, 2021. It is now read-only.

changeCheckBoxVisible()

Mammad900 edited this page Sep 1, 2020 · 1 revision

changeCheckBoxVisible(page, index, value)

Summary

Hides or shows a check-box.

Parameters

  1. Page (int) : The number of the page which contains the check-box
  2. Index (int) : Index of the check-box relative to it's containing page.
  3. Value (int) : If true, the check-box will become visible; if false, it will become hidden.

Returns

Nothing

Source

void changeCheckBoxVisible(int page,int i,bool val){
    if (checkbox_visible[page][i] != val) {
        HCT
        checkbox_visible[page][i] = val;
        if (CurrentPage == page){
            if(val){
                drawCheckBox(page,i);
            }
            else{
                undrawCheckBox(page,i);
            }
        }
    }
}

Note: HCT is a macro for making the rest of the library aware that something has changed.

Clone this wiki locally