lvgui: Add header/text label helpers
@@ -30,6 +30,17 @@ module LVGUI
module BaseUIElements
def add_main_text(text, alignment: LVGL::LABEL_ALIGN::CENTER)
+ add_text(text, alignment: alignment)
+ end
+
+ def add_header(text)
+ LVGUI::HeaderLabel.new(@container).tap do |label|
+ label.text = text
+ label.set_width(@container.get_width_fit)
+ end
+ end
+
+ def add_text(text, alignment: LVGL::LABEL_ALIGN::LEFT)
LVGL::LVLabel.new(@container).tap do |label|
label.set_long_mode(LVGL::LABEL_LONG::BREAK)
label.set_text(text)
