lvgl_cpp/examples/widgets/animimg/lv_example_animimg_1.c

24 lines
596 B
C
Raw Permalink Normal View History

2023-03-14 11:57:25 +00:00
#include "../../lv_examples.h"
#if LV_USE_ANIMIMG && LV_BUILD_EXAMPLES
LV_IMG_DECLARE(animimg001)
LV_IMG_DECLARE(animimg002)
LV_IMG_DECLARE(animimg003)
static const lv_img_dsc_t * anim_imgs[3] = {
&animimg001,
&animimg002,
&animimg003,
};
void lv_example_animimg_1(void)
{
lv_obj_t * animimg0 = lv_animimg_create(lv_scr_act());
lv_obj_center(animimg0);
lv_animimg_set_src(animimg0, (lv_img_dsc_t **) anim_imgs, 3);
lv_animimg_set_duration(animimg0, 1000);
lv_animimg_set_repeat_count(animimg0, LV_ANIM_REPEAT_INFINITE);
lv_animimg_start(animimg0);
}
#endif