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

changeLabelTextSize()

Mammad900 edited this page Nov 5, 2020 · 1 revision

changeLabelTextSize(page, index, X, Y)

Summary

Resizes a label.

Parameters

  1. page (int) : The number of the page which contains the label
  2. index (int) : Index of the label relative to it's containing page.
  3. X (byte) : X (height) text size for the label
  4. Y (byte) : Y (width) text size for the label

Returns

Nothing

Source

void changeLabelTextSize(int page, int i, byte X, byte Y) {
    if ((label_textSizeX[page][i] != X) || (label_textSizeY[page][i] != Y)) {
        HCT
        if (CurrentPage == page) {
            undrawlabel(page, i);
            label_textSizeX[page][i] = X;
            label_textSizeY[page][i] = Y;
            drawlabel(page, i);
        }
        else {
            label_textSizeX[page][i] = X;
            label_textSizeY[page][i] = Y;
        }
    }
}

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

Clone this wiki locally