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_scroll_1.c (1067B)
1 #include "../lv_examples.h" 2 #if LV_BUILD_EXAMPLES 3 4 /** 5 * Demonstrate how scrolling appears automatically 6 */ 7 void lv_example_scroll_1(void) 8 { 9 /*Create an object with the new style*/ 10 lv_obj_t * panel = lv_obj_create(lv_scr_act()); 11 lv_obj_set_size(panel, 200, 200); 12 lv_obj_center(panel); 13 14 lv_obj_t * child; 15 lv_obj_t * label; 16 17 child = lv_obj_create(panel); 18 lv_obj_set_pos(child, 0, 0); 19 lv_obj_set_size(child, 70, 70); 20 label = lv_label_create(child); 21 lv_label_set_text(label, "Zero"); 22 lv_obj_center(label); 23 24 child = lv_obj_create(panel); 25 lv_obj_set_pos(child, 160, 80); 26 lv_obj_set_size(child, 80, 80); 27 28 lv_obj_t * child2 = lv_btn_create(child); 29 lv_obj_set_size(child2, 100, 50); 30 31 label = lv_label_create(child2); 32 lv_label_set_text(label, "Right"); 33 lv_obj_center(label); 34 35 child = lv_obj_create(panel); 36 lv_obj_set_pos(child, 40, 160); 37 lv_obj_set_size(child, 100, 70); 38 label = lv_label_create(child); 39 lv_label_set_text(label, "Bottom"); 40 lv_obj_center(label); 41 } 42 43 #endif