Browse Source

Modifier class updated.

master
parent
commit
d2af5c2448
1 changed files with 6 additions and 6 deletions
  1. +6
    -6
      DisplayESP32.ino

+ 6
- 6
DisplayESP32.ino View File

@ -419,7 +419,7 @@ class Modifier{ //ContentType (2)
int *value; int *value;
int max; int max;
int min; int min;
int interval;
int step;
int previousScreen = 0; int previousScreen = 0;
int previousContentType = 0; int previousContentType = 0;
@ -430,7 +430,7 @@ class Modifier{ //ContentType (2)
this->value = value; this->value = value;
this->max = max; this->max = max;
this->min = min; this->min = min;
this->interval = interval;
this->step = step;
} }
void drawModifier(){ void drawModifier(){
@ -448,14 +448,14 @@ class Modifier{ //ContentType (2)
} }
void increaseValue(){ void increaseValue(){
if((*this->value + interval) <= this->max){
*this->value += interval;
if((*this->value + step) <= this->max){
*this->value += step;
} }
} }
void decreaseValue(){ void decreaseValue(){
if((*this->value - interval) >= this->min){
*this->value -= interval;
if((*this->value - step) >= this->min){
*this->value -= step;
} }
} }


Loading…
Cancel
Save