- Create `Include/` folder for all main projects - Fix some issues here and there (found while moving things) - All includes are now in `Tactility/` subfolder and must be included with that prefix. This fixes issues with clashing POSIX headers (e.g. `<semaphore.h>` versus Tactility's `Semaphore.h`)
19 lines
398 B
C++
19 lines
398 B
C++
#include <Tactility/lvgl/LabelUtils.h>
|
|
#include <Tactility/file/File.h>
|
|
|
|
namespace tt::lvgl {
|
|
|
|
#define TAG "tt_lv_label"
|
|
|
|
bool label_set_text_file(lv_obj_t* label, const char* filepath) {
|
|
auto text = file::readString(filepath);
|
|
if (text != nullptr) {
|
|
lv_label_set_text(label, (const char*)text.get());
|
|
return true;
|
|
} else {
|
|
return false;
|
|
}
|
|
}
|
|
|
|
} // namespace
|