GUI parts for DISCO-F746NG. GuiBase, Button, ButtonGroup, ResetButton, Label, BlinkLabel, NumericLabel, SeekBar, SeekbarGroup
Dependencies: Array_Matrix BSP_DISCO_F746NG
Fork of F746_GUI by
Diff: Label.hpp
- Revision:
- 4:cbf7ed9092a3
- Parent:
- 2:d2f882d98f0a
- Child:
- 9:c379410bda15
diff -r fe6ff954824a -r cbf7ed9092a3 Label.hpp --- a/Label.hpp Thu Apr 07 00:08:19 2016 +0000 +++ b/Label.hpp Fri Apr 08 09:32:49 2016 +0000 @@ -1,7 +1,7 @@ //----------------------------------------------------------- // Label class -- Header // -// 2016/04/05, Copyright (c) 2016 MIKAMI, Naoki +// 2016/04/07, Copyright (c) 2016 MIKAMI, Naoki //----------------------------------------------------------- #ifndef F746_LABEL_HPP @@ -22,6 +22,15 @@ uint32_t textColor = GuiBase::ENUM_TEXT, uint32_t backColor = GuiBase::ENUM_BACK); + // Constructor without string + Label(uint16_t x, uint16_t y, + TextAlignMode mode = LEFT, + sFONT &fonts = Font12, + uint32_t textColor = GuiBase::ENUM_TEXT, + uint32_t backColor = GuiBase::ENUM_BACK) + : GuiBase(x, y, fonts, textColor, backColor), + MODE_(mode), STR_("") {} + void Draw() { Draw(STR_, TEXT_COLOR_); } @@ -33,7 +42,7 @@ void Draw(const string str, uint32_t textColor); - + private: const TextAlignMode MODE_; const string STR_;