button
Dependents: Temperature_Sensor_to_LCD
Revision 16:742da8cc7e07, committed 2018-10-29
- Comitter:
- gscuttari
- Date:
- Mon Oct 29 18:20:55 2018 +0000
- Parent:
- 15:4c7334ade811
- Commit message:
- Libreria modificata
Changed in this revision
button_group.cpp | Show annotated file Show diff for this revision Revisions of this file |
button_group.hpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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; + } + + }
--- a/button_group.hpp Thu Aug 16 07:53:40 2018 +0000 +++ b/button_group.hpp Mon Oct 29 18:20:55 2018 +0000 @@ -60,7 +60,8 @@ // Get touched number and redraw button if touched bool GetTouchedNumber(int &num, uint32_t color); - + // Get touched number and no redraw button if touched + bool GetTouchedNumber_no_redraw(int &num, uint32_t color); private: