Class library: Button class and ButtonGroup class for DISCO-F746NG. クラスライブラリ: DISCO-F746NG 用の,Button クラス,ButtonGroup クラス.
Dependents: F746_SpectralAnalysis_NoPhoto F746_Fourier_series_of_square_wave_01 F746_ButtonGroup_Demo F746_Mandelbrot ... more
Revision 9:0573d8a9bbcd, committed 2015-12-23
- Comitter:
- MikamiUitOpen
- Date:
- Wed Dec 23 08:00:51 2015 +0000
- Parent:
- 8:479ed9f0ba20
- Child:
- 10:5ca60e724a76
- Commit message:
- 10
Changed in this revision
button_group.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/button_group.cpp Wed Dec 23 07:24:48 2015 +0000 +++ b/button_group.cpp Wed Dec 23 08:00:51 2015 +0000 @@ -67,13 +67,13 @@ // Get touched number and redraw button if touched bool ButtonGroup::GetTouchedNumber(int &num, uint32_t color) { - if ((num<0) || (num>=numberOfButtons_)) return false; - - int tmp = num; if (GetTouchedNumber(num)) { - buttons_[num]->Draw(color); - buttons_[tmp]->Redraw(); + for (int n=0; n<numberOfButtons_; n++) + if (n == num) + buttons_[n]->Draw(color); + else + buttons_[n]->Redraw(); return true; } else