Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: Array_Matrix BSP_DISCO_F746NG LCD_DISCO_F746NG TS_DISCO_F746NG
Fork of F746_GUI by
Revision 7:3813be1ca81d, committed 2016-04-12
- Comitter:
- MikamiUitOpen
- Date:
- Tue Apr 12 05:48:25 2016 +0000
- Parent:
- 6:b8f197b0012c
- Child:
- 8:8c5107c91d02
- Commit message:
- 8
Changed in this revision
| NumericLabel.hpp | Show annotated file Show diff for this revision Revisions of this file |
--- 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&);
