GUI parts for DISCO-F746NG. GuiBase, Button, ButtonGroup, Label, BlinkLabel, NumericLabel, SeekBar, SeekbarGroup
Dependents: F746_SD_GraphicEqualizer_ren0620
Fork of F746_GUI by
Diff: NumericLabel.hpp
- Revision:
- 7:3813be1ca81d
- Parent:
- 4:cbf7ed9092a3
--- 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&);
