button
Dependents: Temperature_Sensor_to_LCD
Diff: button_group.cpp
- Revision:
- 16:742da8cc7e07
- Parent:
- 15:4c7334ade811
--- a/button_group.cpp Thu Aug 16 07:53:40 2018 +0000 +++ b/button_group.cpp Mon Oct 29 18:20:55 2018 +0000 @@ -114,7 +114,7 @@ if (GetTouchedNumber(num)) { buttons_[num]->Draw(color); - if (Range(touchedNum_) && (num != touchedNum_)) + if (Range(touchedNum_) && (num != touchedNum_)) buttons_[touchedNum_]->Redraw(); touchedNum_ = num; return true; @@ -122,4 +122,17 @@ else return false; } + // Get touched number and not redraw button if touched + bool ButtonGroup::GetTouchedNumber_no_redraw(int &num, uint32_t color) + { + if (GetTouchedNumber(num)) + { + touchedNum_ = num; + return true; + } + else + return false; + } + + }