@@ -36,6 +36,16 @@ lv_obj_t *ui_settingsscreen_Label3;
3636lv_obj_t * ui_fillpanel ;
3737lv_obj_t * ui_settingsscreen_Label4 ;
3838lv_obj_t * ui_videosettingdropdown ;
39+ lv_obj_t * ui_hapticpanel ;
40+ lv_obj_t * ui_settingsscreen_Label5 ;
41+ lv_obj_t * ui_settingsscreen_Panel1 ;
42+ lv_obj_t * ui_hapticlabel ;
43+ lv_obj_t * ui_hapticdownbutton ;
44+ lv_obj_t * ui_settingsscreen_Label7 ;
45+ lv_obj_t * ui_hapticupbutton ;
46+ lv_obj_t * ui_settingsscreen_Label6 ;
47+ lv_obj_t * ui_hapticplaybutton ;
48+ lv_obj_t * ui_settingsscreen_Label8 ;
3949
4050///////////////////// TEST LVGL SETTINGS ////////////////////
4151#if LV_COLOR_DEPTH != 16
@@ -164,6 +174,11 @@ lv_obj_set_height( ui_settingspanel, 165);
164174lv_obj_set_width ( ui_settingspanel , lv_pct (100 ));
165175lv_obj_set_align ( ui_settingspanel , LV_ALIGN_BOTTOM_MID );
166176lv_obj_add_flag ( ui_settingspanel , LV_OBJ_FLAG_SCROLL_ON_FOCUS | LV_OBJ_FLAG_SCROLL_ONE ); /// Flags
177+ lv_obj_set_scroll_dir (ui_settingspanel , LV_DIR_VER );
178+ lv_obj_set_style_pad_left (ui_settingspanel , 0 , LV_PART_MAIN | LV_STATE_DEFAULT );
179+ lv_obj_set_style_pad_right (ui_settingspanel , 0 , LV_PART_MAIN | LV_STATE_DEFAULT );
180+ lv_obj_set_style_pad_top (ui_settingspanel , 0 , LV_PART_MAIN | LV_STATE_DEFAULT );
181+ lv_obj_set_style_pad_bottom (ui_settingspanel , 0 , LV_PART_MAIN | LV_STATE_DEFAULT );
167182
168183ui_volumepanel = lv_obj_create (ui_settingspanel );
169184lv_obj_set_height ( ui_volumepanel , 50 );
@@ -173,9 +188,9 @@ lv_obj_clear_flag( ui_volumepanel, LV_OBJ_FLAG_SCROLLABLE ); /// Flags
173188
174189ui_volumebar = lv_bar_create (ui_volumepanel );
175190lv_bar_set_value (ui_volumebar ,25 ,LV_ANIM_OFF );
176- lv_obj_set_width ( ui_volumebar , 150 );
191+ lv_obj_set_width ( ui_volumebar , 130 );
177192lv_obj_set_height ( ui_volumebar , 10 );
178- lv_obj_set_x ( ui_volumebar , 20 );
193+ lv_obj_set_x ( ui_volumebar , 25 );
179194lv_obj_set_y ( ui_volumebar , 0 );
180195lv_obj_set_align ( ui_volumebar , LV_ALIGN_CENTER );
181196
@@ -210,8 +225,6 @@ lv_label_set_text(ui_settingsscreen_Label2, LV_SYMBOL_VOLUME_MID);
210225ui_volumeupbutton = lv_btn_create (ui_volumepanel );
211226lv_obj_set_width ( ui_volumeupbutton , 32 );
212227lv_obj_set_height ( ui_volumeupbutton , 32 );
213- lv_obj_set_x ( ui_volumeupbutton , -10 );
214- lv_obj_set_y ( ui_volumeupbutton , 0 );
215228lv_obj_set_align ( ui_volumeupbutton , LV_ALIGN_RIGHT_MID );
216229lv_obj_add_flag ( ui_volumeupbutton , LV_OBJ_FLAG_SCROLL_ON_FOCUS ); /// Flags
217230lv_obj_clear_flag ( ui_volumeupbutton , LV_OBJ_FLAG_SCROLLABLE ); /// Flags
@@ -226,7 +239,7 @@ ui_fillpanel = lv_obj_create(ui_settingspanel);
226239lv_obj_set_height ( ui_fillpanel , 50 );
227240lv_obj_set_width ( ui_fillpanel , lv_pct (100 ));
228241lv_obj_set_x ( ui_fillpanel , 0 );
229- lv_obj_set_y ( ui_fillpanel , 50 );
242+ lv_obj_set_y ( ui_fillpanel , 60 );
230243lv_obj_set_align ( ui_fillpanel , LV_ALIGN_TOP_MID );
231244lv_obj_clear_flag ( ui_fillpanel , LV_OBJ_FLAG_SCROLLABLE ); /// Flags
232245
@@ -243,6 +256,75 @@ lv_obj_set_height( ui_videosettingdropdown, LV_SIZE_CONTENT); /// 1
243256lv_obj_set_align ( ui_videosettingdropdown , LV_ALIGN_RIGHT_MID );
244257lv_obj_add_flag ( ui_videosettingdropdown , LV_OBJ_FLAG_SCROLL_ON_FOCUS ); /// Flags
245258
259+ ui_hapticpanel = lv_obj_create (ui_settingspanel );
260+ lv_obj_set_height ( ui_hapticpanel , 50 );
261+ lv_obj_set_width ( ui_hapticpanel , lv_pct (100 ));
262+ lv_obj_set_x ( ui_hapticpanel , 0 );
263+ lv_obj_set_y ( ui_hapticpanel , 120 );
264+ lv_obj_set_align ( ui_hapticpanel , LV_ALIGN_TOP_MID );
265+ lv_obj_clear_flag ( ui_hapticpanel , LV_OBJ_FLAG_SCROLLABLE ); /// Flags
266+
267+ ui_settingsscreen_Label5 = lv_label_create (ui_hapticpanel );
268+ lv_obj_set_width ( ui_settingsscreen_Label5 , LV_SIZE_CONTENT ); /// 1
269+ lv_obj_set_height ( ui_settingsscreen_Label5 , LV_SIZE_CONTENT ); /// 1
270+ lv_obj_set_align ( ui_settingsscreen_Label5 , LV_ALIGN_LEFT_MID );
271+ lv_label_set_text (ui_settingsscreen_Label5 ,"Haptics" );
272+
273+ ui_settingsscreen_Panel1 = lv_obj_create (ui_hapticpanel );
274+ lv_obj_set_width ( ui_settingsscreen_Panel1 , 140 );
275+ lv_obj_set_height ( ui_settingsscreen_Panel1 , 50 );
276+ lv_obj_set_x ( ui_settingsscreen_Panel1 , -30 );
277+ lv_obj_set_y ( ui_settingsscreen_Panel1 , 0 );
278+ lv_obj_set_align ( ui_settingsscreen_Panel1 , LV_ALIGN_RIGHT_MID );
279+ lv_obj_clear_flag ( ui_settingsscreen_Panel1 , LV_OBJ_FLAG_SCROLLABLE ); /// Flags
280+ lv_obj_set_style_border_color (ui_settingsscreen_Panel1 , lv_color_hex (0x000000 ), LV_PART_MAIN | LV_STATE_DEFAULT );
281+ lv_obj_set_style_border_opa (ui_settingsscreen_Panel1 , 0 , LV_PART_MAIN | LV_STATE_DEFAULT );
282+
283+ ui_hapticlabel = lv_label_create (ui_settingsscreen_Panel1 );
284+ lv_obj_set_width ( ui_hapticlabel , LV_SIZE_CONTENT ); /// 1
285+ lv_obj_set_height ( ui_hapticlabel , LV_SIZE_CONTENT ); /// 1
286+ lv_obj_set_align ( ui_hapticlabel , LV_ALIGN_CENTER );
287+ lv_label_set_text (ui_hapticlabel ,"128" );
288+
289+ ui_hapticdownbutton = lv_btn_create (ui_settingsscreen_Panel1 );
290+ lv_obj_set_width ( ui_hapticdownbutton , 32 );
291+ lv_obj_set_height ( ui_hapticdownbutton , 32 );
292+ lv_obj_set_align ( ui_hapticdownbutton , LV_ALIGN_LEFT_MID );
293+ lv_obj_add_flag ( ui_hapticdownbutton , LV_OBJ_FLAG_SCROLL_ON_FOCUS ); /// Flags
294+ lv_obj_clear_flag ( ui_hapticdownbutton , LV_OBJ_FLAG_SCROLLABLE ); /// Flags
295+
296+ ui_settingsscreen_Label7 = lv_label_create (ui_hapticdownbutton );
297+ lv_obj_set_width ( ui_settingsscreen_Label7 , LV_SIZE_CONTENT ); /// 1
298+ lv_obj_set_height ( ui_settingsscreen_Label7 , LV_SIZE_CONTENT ); /// 1
299+ lv_obj_set_align ( ui_settingsscreen_Label7 , LV_ALIGN_CENTER );
300+ lv_label_set_text (ui_settingsscreen_Label7 , LV_SYMBOL_MINUS );
301+
302+ ui_hapticupbutton = lv_btn_create (ui_settingsscreen_Panel1 );
303+ lv_obj_set_width ( ui_hapticupbutton , 32 );
304+ lv_obj_set_height ( ui_hapticupbutton , 32 );
305+ lv_obj_set_align ( ui_hapticupbutton , LV_ALIGN_RIGHT_MID );
306+ lv_obj_add_flag ( ui_hapticupbutton , LV_OBJ_FLAG_SCROLL_ON_FOCUS ); /// Flags
307+ lv_obj_clear_flag ( ui_hapticupbutton , LV_OBJ_FLAG_SCROLLABLE ); /// Flags
308+
309+ ui_settingsscreen_Label6 = lv_label_create (ui_hapticupbutton );
310+ lv_obj_set_width ( ui_settingsscreen_Label6 , LV_SIZE_CONTENT ); /// 1
311+ lv_obj_set_height ( ui_settingsscreen_Label6 , LV_SIZE_CONTENT ); /// 1
312+ lv_obj_set_align ( ui_settingsscreen_Label6 , LV_ALIGN_CENTER );
313+ lv_label_set_text (ui_settingsscreen_Label6 , LV_SYMBOL_PLUS );
314+
315+ ui_hapticplaybutton = lv_btn_create (ui_hapticpanel );
316+ lv_obj_set_width ( ui_hapticplaybutton , 32 );
317+ lv_obj_set_height ( ui_hapticplaybutton , 32 );
318+ lv_obj_set_align ( ui_hapticplaybutton , LV_ALIGN_RIGHT_MID );
319+ lv_obj_add_flag ( ui_hapticplaybutton , LV_OBJ_FLAG_SCROLL_ON_FOCUS ); /// Flags
320+ lv_obj_clear_flag ( ui_hapticplaybutton , LV_OBJ_FLAG_SCROLLABLE ); /// Flags
321+
322+ ui_settingsscreen_Label8 = lv_label_create (ui_hapticplaybutton );
323+ lv_obj_set_width ( ui_settingsscreen_Label8 , LV_SIZE_CONTENT ); /// 1
324+ lv_obj_set_height ( ui_settingsscreen_Label8 , LV_SIZE_CONTENT ); /// 1
325+ lv_obj_set_align ( ui_settingsscreen_Label8 , LV_ALIGN_CENTER );
326+ lv_label_set_text (ui_settingsscreen_Label8 , LV_SYMBOL_PLAY );
327+
246328lv_obj_add_event_cb (ui_closebutton , ui_event_closebutton , LV_EVENT_ALL , NULL );
247329
248330}
0 commit comments