Add setFont and setBackgroudOpacity to StaticText (#73)
This commit is contained in:
+10
@@ -75,6 +75,16 @@ void StaticText::setBackgroundColor(LcdFlags color)
|
|||||||
lv_obj_set_style_bg_color(lvobj, c, LV_PART_MAIN);
|
lv_obj_set_style_bg_color(lvobj, c, LV_PART_MAIN);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void StaticText::setBackgroudOpacity(uint32_t opa)
|
||||||
|
{
|
||||||
|
lv_obj_set_style_bg_opa(lvobj, opa, LV_PART_MAIN);
|
||||||
|
}
|
||||||
|
|
||||||
|
void StaticText::setFont(LcdFlags font)
|
||||||
|
{
|
||||||
|
lv_obj_set_style_text_font(lvobj, getFont(font), 0);
|
||||||
|
}
|
||||||
|
|
||||||
template <>
|
template <>
|
||||||
void DynamicNumber<uint32_t>::updateText()
|
void DynamicNumber<uint32_t>::updateText()
|
||||||
{
|
{
|
||||||
|
|||||||
+3
@@ -36,6 +36,9 @@ class StaticText: public Window
|
|||||||
const std::string& getText() const;
|
const std::string& getText() const;
|
||||||
|
|
||||||
void setBackgroundColor(LcdFlags color);
|
void setBackgroundColor(LcdFlags color);
|
||||||
|
void setBackgroudOpacity(uint32_t opa);
|
||||||
|
void setFont(LcdFlags font);
|
||||||
|
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
std::string text;
|
std::string text;
|
||||||
|
|||||||
Reference in New Issue
Block a user