Same as original
Diff: button_group.hpp
- Revision:
- 6:d268555e2f50
- Parent:
- 4:543ec60c2814
- Child:
- 10:5ca60e724a76
--- a/button_group.hpp Tue Dec 08 14:19:41 2015 +0000 +++ b/button_group.hpp Wed Dec 09 01:55:25 2015 +0000 @@ -1,7 +1,7 @@ //----------------------------------------------------------- // Button group class -- Header // -// 2015/12/05, Copyright (c) 2015 MIKAMI, Naoki +// 2015/12/09, Copyright (c) 2015 MIKAMI, Naoki //----------------------------------------------------------- #ifndef F746_BUTTON_GROUP_HPP @@ -30,11 +30,13 @@ ~ButtonGroup(); // Draw button - void Draw(int num, uint32_t color, uint32_t textColor = LCD_COLOR_WHITE) + void Draw(int num, uint32_t color, + uint32_t textColor = LCD_COLOR_WHITE) { buttons_[num]->Draw(color, textColor); } // Draw all button - void DrawAll(uint32_t color, uint32_t textColor = LCD_COLOR_WHITE) + void DrawAll(uint32_t color, + uint32_t textColor = LCD_COLOR_WHITE) { for (int n=0; n<numberOfButtons_; n++) buttons_[n]->Draw(color, textColor); @@ -42,7 +44,7 @@ // Redraw button with original color void Redraw(int num, uint32_t textColor = LCD_COLOR_WHITE) - { buttons_[num]->Draw(buttons_[num]->GetOriginalColor(), textColor); } + { buttons_[num]->Redraw(textColor); } // Erase button with selected color void Erase(int num, uint32_t color) @@ -52,9 +54,9 @@ bool Touched(int num) { return buttons_[num]->Touched(); } - // Check touch detected for specified button and redraw button - bool Touched(int num, uint32_t color, uint32_t textColor = LCD_COLOR_WHITE) - { return buttons_[num]->Touched(color, textColor); } + // Check touch detected for specified button and redraw + bool Touched(int num, uint32_t color, + uint32_t textColor = LCD_COLOR_WHITE); // Get touched number bool GetTouchedNumber(int &num);