added setCountPages
This commit is contained in:
@@ -63,6 +63,14 @@ void MenuInformationSites::update() {
|
|||||||
this->lastMillis = millis();
|
this->lastMillis = millis();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MenuInformationSites::setCountPages(uint8_t pages) {
|
||||||
|
if (this->countPages < pages)
|
||||||
|
this->countPages = pages;
|
||||||
|
else
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
uint8_t MenuInformationSites::getCountPages() const {
|
uint8_t MenuInformationSites::getCountPages() const {
|
||||||
return this->countPages;
|
return this->countPages;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class MenuInformationSites : public MenuControl {
|
|||||||
*
|
*
|
||||||
* @param amount of pages
|
* @param amount of pages
|
||||||
*/
|
*/
|
||||||
MenuInformationSites(uint8_t pages);
|
MenuInformationSites(uint8_t pages = 1);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief Next page
|
* @brief Next page
|
||||||
@@ -67,6 +67,7 @@ class MenuInformationSites : public MenuControl {
|
|||||||
void update() override;
|
void update() override;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
bool setCountPages(uint8_t pages);
|
||||||
uint8_t getCountPages() const;
|
uint8_t getCountPages() const;
|
||||||
uint8_t getCurrentPage() const;
|
uint8_t getCurrentPage() const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user