GUI parts for DISCO-F746NG. GuiBase, Button, ButtonGroup, ResetButton, Label, BlinkLabel, NumericLabel, SeekBar, SeekbarGroup, NumericUpDown

Dependencies:   Array_Matrix BSP_DISCO_F746NG LCD_DISCO_F746NG TS_DISCO_F746NG

Dependents:   F746_AudioOutQSPI F746_AudioPlayerSD DISCO-F746NG_test001 F746_SD_WavPlayer ... more

Revision:
7:3813be1ca81d
Parent:
4:cbf7ed9092a3
Child:
24:6dcf9676d0c5
--- a/NumericLabel.hpp	Tue Apr 12 04:15:41 2016 +0000
+++ b/NumericLabel.hpp	Tue Apr 12 05:48:25 2016 +0000
@@ -1,7 +1,7 @@
 //-----------------------------------------------------------
 //  NumericLabel class -- derived class of Label class
 //
-//  2016/04/08, Copyright (c) 2016 MIKAMI, Naoki
+//  2016/04/12, Copyright (c) 2016 MIKAMI, Naoki
 //-----------------------------------------------------------
 
 #ifndef F746_NUMERIC_LABEL_HPP
@@ -35,12 +35,17 @@
         // Draw value
         void Draw(const char fmt[], T val)
         {
-            char str[81];
-            sprintf(str, fmt, val);
-            Label::Draw(str);
+            sprintf(str_, fmt, val);
+            Label::Draw(str_);
         }
 
+        // Draw previous value with specified color
+        void Draw(uint32_t color)
+        {   Label::Draw(str_, color); }
+
     private:
+        char str_[81];
+
         // disallow copy constructor and assignment operator
         NumericLabel(const NumericLabel&);
         NumericLabel& operator=(const NumericLabel&);