acid-drop- Hacking the planet from a LilyGo T-Deck using custom firmware |
git clone git://git.acid.vegas/acid-drop.git |
Log | Files | Refs | Archive | README | LICENSE |
lv_example_bar_4.c (740B)
1 #include "../../lv_examples.h" 2 #if LV_USE_BAR && LV_BUILD_EXAMPLES 3 4 /** 5 * Bar with stripe pattern and ranged value 6 */ 7 void lv_example_bar_4(void) 8 { 9 LV_IMG_DECLARE(img_skew_strip); 10 static lv_style_t style_indic; 11 12 lv_style_init(&style_indic); 13 lv_style_set_bg_img_src(&style_indic, &img_skew_strip); 14 lv_style_set_bg_img_tiled(&style_indic, true); 15 lv_style_set_bg_img_opa(&style_indic, LV_OPA_30); 16 17 lv_obj_t * bar = lv_bar_create(lv_scr_act()); 18 lv_obj_add_style(bar, &style_indic, LV_PART_INDICATOR); 19 20 lv_obj_set_size(bar, 260, 20); 21 lv_obj_center(bar); 22 lv_bar_set_mode(bar, LV_BAR_MODE_RANGE); 23 lv_bar_set_value(bar, 90, LV_ANIM_OFF); 24 lv_bar_set_start_value(bar, 20, LV_ANIM_OFF); 25 } 26 27 #endif