diff options
| author | jacqueline <me@jacqueline.id.au> | 2023-06-01 15:28:32 +1000 |
|---|---|---|
| committer | jacqueline <me@jacqueline.id.au> | 2023-06-01 15:28:54 +1000 |
| commit | 6fd588e970470b15936187980829916d0dbe77bb (patch) | |
| tree | 1b1e73ef52bef2e41499ee5ceadc45efd408050b /src/ui/screen_splash.cpp | |
| parent | db2e29a72d9b934e7b58f1d20ac3768eae484ab5 (diff) | |
| download | tangara-fw-6fd588e970470b15936187980829916d0dbe77bb.tar.gz | |
Add touchwheel -> encoder adapter
Diffstat (limited to 'src/ui/screen_splash.cpp')
| -rw-r--r-- | src/ui/screen_splash.cpp | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/src/ui/screen_splash.cpp b/src/ui/screen_splash.cpp new file mode 100644 index 00000000..2b2a7b1e --- /dev/null +++ b/src/ui/screen_splash.cpp @@ -0,0 +1,38 @@ +/* + * Copyright 2023 jacqueline <me@jacqueline.id.au> + * + * SPDX-License-Identifier: GPL-3.0-only + */ + +#include "screen_splash.hpp" + +#include "core/lv_obj_pos.h" +#include "extra/widgets/spinner/lv_spinner.h" +#include "misc/lv_area.h" +#include "widgets/lv_label.h" + +namespace ui { +namespace screens { + +Splash::Splash() { + container_ = lv_obj_create(root_); + lv_obj_set_align(container_, LV_ALIGN_CENTER); + lv_obj_set_size(container_, LV_SIZE_CONTENT, LV_SIZE_CONTENT); + + label_ = lv_label_create(container_); + lv_label_set_text_static(label_, "TANGARA"); + lv_obj_set_align(label_, LV_ALIGN_TOP_MID); + + spinner_ = lv_spinner_create(container_, 1000, 60); + lv_obj_set_size(spinner_, 32, 32); + lv_obj_align_to(spinner_, label_, LV_ALIGN_OUT_BOTTOM_MID, 0, 8); +} + +Splash::~Splash() { + lv_obj_del(spinner_); + lv_obj_del(label_); + lv_obj_del(container_); +} + +} // namespace screens +} // namespace ui |
