summaryrefslogtreecommitdiff
path: root/src/DisplayApp/Screens/Label.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/DisplayApp/Screens/Label.h')
-rw-r--r--src/DisplayApp/Screens/Label.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/DisplayApp/Screens/Label.h b/src/DisplayApp/Screens/Label.h
index b73540f4..9d91974d 100644
--- a/src/DisplayApp/Screens/Label.h
+++ b/src/DisplayApp/Screens/Label.h
@@ -2,6 +2,7 @@
#include <vector>
#include "Screen.h"
+#include <lvgl/lvgl.h>
namespace Pinetime {
namespace Applications {
@@ -19,6 +20,26 @@ namespace Pinetime {
lv_obj_t * label = nullptr;
const char* text = nullptr;
};
+
+ class Label2 : public Screen {
+ public:
+ Label2(DisplayApp* app, const char* text) : Screen(app), text{text} {
+ label = lv_label_create(lv_scr_act(), NULL);
+ lv_label_set_align(label, LV_LABEL_ALIGN_LEFT);
+ lv_obj_set_size(label, 240, 240);
+ lv_label_set_text(label, text);
+ }
+
+ ~Label2() override {
+ lv_obj_clean(lv_scr_act());
+ }
+
+ bool Refresh() override {return false;}
+
+ private:
+ lv_obj_t * label = nullptr;
+ const char* text = nullptr;
+ };
}
}
} \ No newline at end of file