Now saving the scroll position of the menu to resum it when exiting an app

This commit is contained in:
Th3maz1ng 2023-05-14 22:06:58 +02:00
parent 677c3f3a67
commit 66fa33cde1
4 changed files with 415 additions and 376 deletions

View File

@ -1653,10 +1653,10 @@
<Option compilerVar="CC" />
</Unit>
<Unit filename="menu_screen.h" />
<Unit filename="music_control_screen.c">
<Unit filename="music_player_screen.c">
<Option compilerVar="CC" />
</Unit>
<Unit filename="music_control_screen.h" />
<Unit filename="music_player_screen.h" />
<Unit filename="rsrc/hour_hand.png" />
<Unit filename="settings_screen.c">
<Option compilerVar="CC" />

View File

@ -2,15 +2,253 @@
<CodeBlocks_layout_file>
<FileVersion major="1" minor="0" />
<ActiveTarget name="Debug" />
<File name="lvgl\src\hal\lv_hal_indev.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5065" topLine="123" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_color.c" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="10782" topLine="316" />
</Cursor>
</File>
<File name="lvgl\lvgl.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="138" />
</Cursor>
</File>
<File name="altimeter_screen.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1028" topLine="30" />
</Cursor>
</File>
<File name="lvgl\src\widgets\list\lv_list.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="721" topLine="16" />
</Cursor>
</File>
<File name="main.c" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3609" topLine="56" />
</Cursor>
</File>
<File name="lvgl\src\lv_api_map.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="722" topLine="32" />
</Cursor>
</File>
<File name="lvgl\src\widgets\label\lv_label.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1299" topLine="36" />
</Cursor>
</File>
<File name="settings_screen.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="315" topLine="0" />
</Cursor>
</File>
<File name="lvgl\src\widgets\img\lv_img.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4439" topLine="123" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_style.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7273" topLine="217" />
</Cursor>
</File>
<File name="lvgl\src\layouts\grid\lv_grid.h" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="579" topLine="17" />
</Cursor>
</File>
<File name="compass_screen.c" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6172" topLine="194" />
</Cursor>
</File>
<File name="lvgl\examples\widgets\bar\lv_example_bar_6.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="181" topLine="0" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_log.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1509" topLine="59" />
</Cursor>
</File>
<File name="lv_drivers\win_drv.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="585" topLine="0" />
</Cursor>
</File>
<File name="lvgl\lv_conf_template.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="56" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_style.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="11206" topLine="296" />
</Cursor>
</File>
<File name="lvgl\demos\widgets\assets\img_demo_widgets_avatar.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1282774" topLine="472" />
</Cursor>
</File>
<File name="find_my_phone_screen.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="978" topLine="0" />
</Cursor>
</File>
<File name="watch_face.c" open="1" top="0" tabpos="3" split="0" active="1" splitpos="702" zoom_1="0" zoom_2="-1">
<Cursor>
<Cursor1 position="5273" topLine="135" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7842" topLine="283" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_timer.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2694" topLine="70" />
</Cursor>
</File>
<File name="lvgl\src\widgets\chart\lv_chart.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="11658" topLine="336" />
</Cursor>
</File>
<File name="lv_drivers\display\monitor.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="289" topLine="31" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_disp.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7126" topLine="230" />
</Cursor>
</File>
<File name="lvgl\src\font\lv_font_montserrat_30.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="869" topLine="0" />
</Cursor>
</File>
<File name="lvgl\demos\widgets\lv_demo_widgets.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2825" topLine="122" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_scroll.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="11856" topLine="347" />
</Cursor>
</File>
<File name="common_screen_components.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="517" topLine="0" />
</Cursor>
</File>
<File name="lvgl\src\draw\lv_draw_img.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5230" topLine="191" />
</Cursor>
</File>
<File name="lvgl\src\font\lv_font_montserrat_12.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="22" />
</Cursor>
</File>
<File name="lvgl\src\hal\lv_hal_disp.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="11123" topLine="327" />
</Cursor>
</File>
<File name="compass_assets.c" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="143" />
</Cursor>
</File>
<File name="find_my_phone_screen.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2751" topLine="55" />
</Cursor>
</File>
<File name="lvgl\src\widgets\menu\lv_menu.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3321" topLine="109" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_tree.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2082" topLine="62" />
</Cursor>
</File>
<File name="lv_drivers\win32drv\win32drv.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="15" />
</Cursor>
</File>
<File name="lvgl\demos\widgets\lv_demo_widgets.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="456" topLine="6" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2638" topLine="87" />
</Cursor>
</File>
<File name="lvgl\src\hal\lv_hal_disp.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="823" topLine="24" />
</Cursor>
</File>
<File name="lvgl\src\widgets\roller\lv_roller.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="715" topLine="26" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_types.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1759" topLine="61" />
</Cursor>
</File>
<File name="lvgl\src\libs\ffmpeg\lv_ffmpeg.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5784" topLine="170" />
</Cursor>
</File>
<File name="lvgl\src\widgets\img\lv_img.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1863" topLine="59" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_disp.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="615" topLine="25" />
</Cursor>
</File>
<File name="compass_screen.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1253" topLine="20" />
</Cursor>
</File>
<File name="music_player_screen.h" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2313" topLine="41" />
</Cursor>
</File>
<File name="watch_menu_icons.c" open="0" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="869291" topLine="156" />
<Cursor1 position="193199" topLine="176" />
</Cursor>
<Folding>
<Collapse line="2" />
<Collapse line="185" />
<Collapse line="195" />
<Collapse line="378" />
<Collapse line="388" />
<Collapse line="571" />
<Collapse line="581" />
@ -25,21 +263,32 @@
<Collapse line="1536" />
<Collapse line="1546" />
<Collapse line="1729" />
<Collapse line="1739" />
<Collapse line="1922" />
<Collapse line="1932" />
<Collapse line="2115" />
<Collapse line="2125" />
<Collapse line="2284" />
</Folding>
</File>
<File name="lvgl\src\core\lv_obj.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="lvgl\src\core\lv_indev.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2638" topLine="87" />
<Cursor1 position="3034" topLine="107" />
</Cursor>
</File>
<File name="lvgl\demos\widgets\assets\img_demo_widgets_avatar.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="lvgl\src\core\lv_obj_style_gen.c" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1282774" topLine="472" />
<Cursor1 position="13491" topLine="412" />
</Cursor>
</File>
<File name="lvgl\src\font\lv_font.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="music_player_screen.c" open="1" top="1" tabpos="1" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5535" topLine="120" />
<Cursor1 position="2702" topLine="56" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_anim.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="732" topLine="34" />
</Cursor>
</File>
<File name="lvgl\src\widgets\spinbox\lv_spinbox.h" open="0" top="0" tabpos="18" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -47,19 +296,29 @@
<Cursor1 position="4262" topLine="120" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_refr.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="menu_screen.c" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2447" topLine="75" />
<Cursor1 position="4556" topLine="79" />
</Cursor>
</File>
<File name="altimeter_screen.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="lvgl\src\core\lv_event.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1028" topLine="30" />
<Cursor1 position="846" topLine="28" />
</Cursor>
</File>
<File name="lvgl\lv_conf_template.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="lv_conf.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="56" />
<Cursor1 position="2737" topLine="65" />
</Cursor>
</File>
<File name="lvgl\src\widgets\label\lv_label.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5648" topLine="194" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_log.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2557" topLine="68" />
</Cursor>
</File>
<File name="altimeter_screen_assets.c" open="0" top="0" tabpos="19" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -67,89 +326,14 @@
<Cursor1 position="96342" topLine="161" />
</Cursor>
</File>
<File name="lvgl\src\widgets\chart\lv_chart.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="lvgl\src\layouts\flex\lv_flex.c" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="11658" topLine="336" />
<Cursor1 position="3097" topLine="74" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_disp.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="lvgl\src\widgets\list\lv_list.c" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="2" zoom_2="0">
<Cursor>
<Cursor1 position="7126" topLine="230" />
</Cursor>
</File>
<File name="settings_screen.c" open="1" top="1" tabpos="5" split="0" active="1" splitpos="513" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="23555" topLine="429" />
</Cursor>
</File>
<File name="lv_drivers\win32drv\win32drv.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="524" topLine="954" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_color.c" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="10782" topLine="316" />
</Cursor>
</File>
<File name="lvgl\src\hal\lv_hal_indev.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5065" topLine="123" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_timer.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="635" topLine="36" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7842" topLine="283" />
</Cursor>
</File>
<File name="lvgl\src\layouts\flex\lv_flex.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="950" topLine="43" />
</Cursor>
</File>
<File name="menu_screen.c" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3627" topLine="67" />
</Cursor>
</File>
<File name="compass_assets.c" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="143" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_class.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1857" topLine="35" />
</Cursor>
</File>
<File name="compass_screen.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1253" topLine="18" />
</Cursor>
</File>
<File name="lvgl\examples\widgets\menu\lv_example_menu_5.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7631" topLine="141" />
</Cursor>
</File>
<File name="lv_drivers\win_drv.h" open="0" top="0" tabpos="10" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="585" topLine="0" />
</Cursor>
</File>
<File name="altimeter_screen.c" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="13638" topLine="409" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_log.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1509" topLine="59" />
<Cursor1 position="2391" topLine="53" />
</Cursor>
</File>
<File name="lv_drivers\indev\keyboard.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -157,66 +341,11 @@
<Cursor1 position="440" topLine="14" />
</Cursor>
</File>
<File name="lvgl\src\widgets\menu\lv_menu.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3321" topLine="109" />
</Cursor>
</File>
<File name="lvgl\src\font\lv_font_montserrat_30.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="869" topLine="0" />
</Cursor>
</File>
<File name="lvgl\src\hal\lv_hal_disp.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="823" topLine="24" />
</Cursor>
</File>
<File name="lvgl\src\widgets\label\lv_label.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1299" topLine="36" />
</Cursor>
</File>
<File name="lvgl\src\hal\lv_hal_indev.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3566" topLine="102" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_style_gen.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="13017" topLine="346" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_types.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1759" topLine="61" />
</Cursor>
</File>
<File name="watch_face.h" open="1" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3303" topLine="82" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_pos.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7730" topLine="167" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_event.h" open="1" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5693" topLine="115" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_anim.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3835" topLine="68" />
</Cursor>
</File>
<File name="lvgl\src\widgets\list\lv_list.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="721" topLine="16" />
</Cursor>
</File>
<File name="lvgl\src\widgets\tileview\lv_tileview.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1055" topLine="40" />
@ -231,114 +360,19 @@
<Cursor1 position="3011" topLine="100" />
</Cursor>
</File>
<File name="lvgl\src\font\lv_font_montserrat_12.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="lvgl\src\core\lv_obj_class.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="22" />
<Cursor1 position="1857" topLine="35" />
</Cursor>
</File>
<File name="lvgl\src\lv_api_map.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="common_screen_components.c" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="722" topLine="32" />
</Cursor>
</File>
<File name="lvgl\src\widgets\imgbtn\lv_imgbtn.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2184" topLine="61" />
</Cursor>
</File>
<File name="lvgl\src\widgets\roller\lv_roller.h" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="715" topLine="26" />
</Cursor>
</File>
<File name="lvgl\lvgl.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="138" />
</Cursor>
</File>
<File name="lvgl\src\draw\lv_draw_img.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5230" topLine="191" />
</Cursor>
</File>
<File name="common_screen_components.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="517" topLine="0" />
</Cursor>
</File>
<File name="lvgl\src\widgets\label\lv_label.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5648" topLine="194" />
</Cursor>
</File>
<File name="settings_screen.h" open="1" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="315" topLine="0" />
</Cursor>
</File>
<File name="lvgl\examples\widgets\bar\lv_example_bar_6.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="181" topLine="0" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_indev_scroll.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="14405" topLine="323" />
</Cursor>
</File>
<File name="lvgl\src\libs\ffmpeg\lv_ffmpeg.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5784" topLine="170" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_timer.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5053" topLine="144" />
</Cursor>
</File>
<File name="watch_face.c" open="1" top="0" tabpos="1" split="0" active="1" splitpos="702" zoom_1="1" zoom_2="-1">
<Cursor>
<Cursor1 position="2615" topLine="83" />
</Cursor>
</File>
<File name="lv_drivers\win32drv\win32drv.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="15" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_color.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6581" topLine="189" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_style.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7273" topLine="217" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_disp.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="615" topLine="25" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_scroll.h" open="0" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1988" topLine="67" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_area.h" open="0" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1789" topLine="74" />
</Cursor>
</File>
<File name="lvgl\src\widgets\list\lv_list.c" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="2" zoom_2="0">
<Cursor>
<Cursor1 position="2391" topLine="53" />
<Cursor1 position="1343" topLine="21" />
</Cursor>
</File>
<File name="menu_screen.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="48" topLine="0" />
<Cursor1 position="294" topLine="0" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_tree.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -346,49 +380,9 @@
<Cursor1 position="1234" topLine="139" />
</Cursor>
</File>
<File name="lv_drivers\display\SSD1963.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="lvgl\src\core\lv_obj_scroll.h" open="0" top="0" tabpos="16" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1563" topLine="27" />
</Cursor>
</File>
<File name="watch_casio_assets.c" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2981397" topLine="949" />
</Cursor>
</File>
<File name="lvgl\demos\widgets\lv_demo_widgets.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="456" topLine="6" />
</Cursor>
</File>
<File name="lvgl\src\hal\lv_hal_disp.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="11123" topLine="327" />
</Cursor>
</File>
<File name="common_screen_components.c" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="498" topLine="0" />
</Cursor>
</File>
<File name="lvgl\src\layouts\flex\lv_flex.c" open="0" top="0" tabpos="8" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3097" topLine="74" />
</Cursor>
</File>
<File name="lv_drv_conf.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6602" topLine="208" />
</Cursor>
</File>
<File name="main.c" open="1" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2852" topLine="77" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_indev.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3034" topLine="107" />
<Cursor1 position="8724" topLine="215" />
</Cursor>
</File>
<File name="lvgl\src\widgets\imgbtn\lv_imgbtn.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -396,19 +390,24 @@
<Cursor1 position="2129" topLine="53" />
</Cursor>
</File>
<File name="lv_drivers\win32drv\win32drv.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="524" topLine="954" />
</Cursor>
</File>
<File name="watch_casio_assets.c" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2981397" topLine="949" />
</Cursor>
</File>
<File name="lvgl\src\font\lv_font_fmt_txt.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="0" topLine="24" />
</Cursor>
</File>
<File name="lvgl\src\draw\lv_img_buf.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="lvgl\src\misc\lv_color.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6210" topLine="113" />
</Cursor>
</File>
<File name="compass_screen.c" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="6172" topLine="154" />
<Cursor1 position="761" topLine="32" />
</Cursor>
</File>
<File name="lvgl\src\widgets\menu\lv_menu.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -416,74 +415,24 @@
<Cursor1 position="3706" topLine="117" />
</Cursor>
</File>
<File name="lvgl\src\draw\lv_draw_rect.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="lvgl\src\core\lv_refr.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="539" topLine="9" />
<Cursor1 position="2447" topLine="75" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_scroll.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="lv_drv_conf.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="12525" topLine="363" />
<Cursor1 position="6602" topLine="208" />
</Cursor>
</File>
<File name="firmware_version.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="lvgl\src\core\lv_indev_scroll.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="160" topLine="0" />
<Cursor1 position="14405" topLine="323" />
</Cursor>
</File>
<File name="lvgl\demos\widgets\lv_demo_widgets.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<File name="lvgl\src\draw\lv_img_buf.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2825" topLine="122" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_log.h" open="0" top="0" tabpos="2" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2557" topLine="68" />
</Cursor>
</File>
<File name="lvgl\src\widgets\img\lv_img.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1863" topLine="59" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_style_gen.c" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="13491" topLine="412" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_tree.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2082" topLine="62" />
</Cursor>
</File>
<File name="lv_drivers\display\monitor.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="289" topLine="31" />
</Cursor>
</File>
<File name="lvgl\src\widgets\img\lv_img.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="4439" topLine="123" />
</Cursor>
</File>
<File name="lvgl\src\layouts\grid\lv_grid.h" open="0" top="0" tabpos="13" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="579" topLine="17" />
</Cursor>
</File>
<File name="lv_conf.h" open="0" top="0" tabpos="5" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="555" topLine="10" />
</Cursor>
</File>
<File name="lvgl\src\font\lv_symbol_def.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1135" topLine="14" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_style.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="9059" topLine="238" />
<Cursor1 position="6210" topLine="113" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_pos.c" open="0" top="0" tabpos="12" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
@ -491,9 +440,84 @@
<Cursor1 position="10562" topLine="336" />
</Cursor>
</File>
<File name="lvgl\src\layouts\flex\lv_flex.h" open="0" top="0" tabpos="7" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="950" topLine="43" />
</Cursor>
</File>
<File name="firmware_version.h" open="0" top="0" tabpos="9" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="160" topLine="0" />
</Cursor>
</File>
<File name="lvgl\src\widgets\imgbtn\lv_imgbtn.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="2184" topLine="61" />
</Cursor>
</File>
<File name="lvgl\src\font\lv_font.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="5535" topLine="120" />
</Cursor>
</File>
<File name="lvgl\src\draw\lv_draw_rect.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="465" topLine="9" />
</Cursor>
</File>
<File name="watch_face.h" open="0" top="0" tabpos="3" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="3303" topLine="56" />
</Cursor>
</File>
<File name="lv_drivers\lv_drv_conf_template.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="10670" topLine="390" />
</Cursor>
</File>
<File name="settings_screen.c" open="0" top="0" tabpos="5" split="0" active="1" splitpos="513" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="36580" topLine="689" />
</Cursor>
</File>
<File name="lvgl\src\font\lv_symbol_def.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="338" topLine="14" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_timer.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="716" topLine="31" />
</Cursor>
</File>
<File name="altimeter_screen.c" open="0" top="0" tabpos="6" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="13638" topLine="409" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_style_gen.h" open="0" top="0" tabpos="11" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="28878" topLine="602" />
</Cursor>
</File>
<File name="lvgl\src\misc\lv_area.h" open="0" top="0" tabpos="15" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1789" topLine="74" />
</Cursor>
</File>
<File name="lvgl\examples\widgets\menu\lv_example_menu_5.c" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7631" topLine="141" />
</Cursor>
</File>
<File name="lvgl\src\core\lv_obj_pos.h" open="0" top="0" tabpos="4" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="7730" topLine="167" />
</Cursor>
</File>
<File name="lv_drivers\display\SSD1963.h" open="0" top="0" tabpos="0" split="0" active="1" splitpos="0" zoom_1="0" zoom_2="0">
<Cursor>
<Cursor1 position="1563" topLine="27" />
</Cursor>
</File>
</CodeBlocks_layout_file>

View File

@ -148,28 +148,37 @@ void menu_screen_create(MenuScreen_t * const menuScreen)
//We add the screen header
common_screen_header_component(menuScreen->display, "Menu", 50);
lv_obj_t *scroll_item_container = lv_obj_create(menuScreen->display);
lv_obj_set_style_bg_color(scroll_item_container, lv_color_white(), LV_PART_MAIN);
lv_obj_set_size(scroll_item_container, lv_pct(100), 240-50);
lv_obj_set_pos(scroll_item_container, 0, 50);
lv_obj_set_style_pad_all(scroll_item_container, 0, LV_PART_MAIN);
lv_obj_set_style_pad_top(scroll_item_container, 10, LV_PART_MAIN);
lv_obj_set_style_pad_bottom(scroll_item_container, 20, LV_PART_MAIN);
lv_obj_set_style_radius(scroll_item_container, 0, LV_PART_MAIN);
lv_obj_set_style_border_width(scroll_item_container, 0, LV_PART_MAIN);
lv_obj_set_style_pad_right(scroll_item_container, 15, LV_PART_SCROLLBAR);
if(menuScreen->scrollItemContainer)
{
LV_LOG_ERROR("scrollItemContainer should be NULL here !");
lv_obj_del(menuScreen->scrollItemContainer);
menuScreen->scrollItemContainer = NULL;
}
menuScreen->scrollItemContainer = lv_obj_create(menuScreen->display);
lv_obj_set_style_bg_color(menuScreen->scrollItemContainer, lv_color_white(), LV_PART_MAIN);
lv_obj_set_size(menuScreen->scrollItemContainer, lv_pct(100), 240-50);
lv_obj_set_pos(menuScreen->scrollItemContainer, 0, 50);
lv_obj_set_style_pad_all(menuScreen->scrollItemContainer, 0, LV_PART_MAIN);
lv_obj_set_style_pad_top(menuScreen->scrollItemContainer, 10, LV_PART_MAIN);
lv_obj_set_style_pad_bottom(menuScreen->scrollItemContainer, 20, LV_PART_MAIN);
lv_obj_set_style_radius(menuScreen->scrollItemContainer, 0, LV_PART_MAIN);
lv_obj_set_style_border_width(menuScreen->scrollItemContainer, 0, LV_PART_MAIN);
lv_obj_set_style_pad_right(menuScreen->scrollItemContainer, 15, LV_PART_SCROLLBAR);
menu_screen_add_item(scroll_item_container, 0, &watch_menu_clock_icon, "Watch", &(menu_item_cb));
menu_screen_add_item(scroll_item_container, 1, &watch_menu_alarm_icon, "Alarm", &(menu_item_cb));
menu_screen_add_item(scroll_item_container, 2, &watch_menu_music_player_icon, "Music player", &(menu_item_cb));
menu_screen_add_item(scroll_item_container, 3, &watch_menu_compass_icon, "Compass", &(menu_item_cb));
menu_screen_add_item(scroll_item_container, 4, &watch_menu_altimeter_icon, "Altimeter", &(menu_item_cb));
menu_screen_add_item(scroll_item_container, 5, &watch_menu_lost_phone_icon, "Find my phone", &(menu_item_cb));
menu_screen_add_item(menuScreen->scrollItemContainer, 0, &watch_menu_clock_icon, "Watch", &(menu_item_cb));
menu_screen_add_item(menuScreen->scrollItemContainer, 1, &watch_menu_alarm_icon, "Alarm", &(menu_item_cb));
menu_screen_add_item(menuScreen->scrollItemContainer, 2, &watch_menu_music_player_icon, "Music player", &(menu_item_cb));
menu_screen_add_item(menuScreen->scrollItemContainer, 3, &watch_menu_compass_icon, "Compass", &(menu_item_cb));
menu_screen_add_item(menuScreen->scrollItemContainer, 4, &watch_menu_altimeter_icon, "Altimeter", &(menu_item_cb));
menu_screen_add_item(menuScreen->scrollItemContainer, 5, &watch_menu_lost_phone_icon, "Find my phone", &(menu_item_cb));
//menu_screen_add_item(scroll_item_container, 3, &watch_menu_messages_icon, "Text messages", &(menu_item_cb));
//menu_screen_add_item(scroll_item_container, 4, &watch_menu_mail_icon, "Mails", &(menu_item_cb));
//menu_screen_add_item(scroll_item_container, 5, &watch_menu_dialer_icon, "Phone", &(menu_item_cb));
//menu_screen_add_item(scroll_item_container, 6, &watch_menu_contacts_icon, "Contacts", &(menu_item_cb));
menu_screen_add_item(scroll_item_container, 6, &watch_menu_settings_icon, "Settings", &(menu_item_cb));
menu_screen_add_item(menuScreen->scrollItemContainer, 6, &watch_menu_settings_icon, "Settings", &(menu_item_cb));
//Lets restore the previous scrolling position
lv_obj_scroll_to_y(menuScreen->scrollItemContainer, menuScreen->lastScrollPosition, LV_ANIM_OFF);
//We register the event callback to handle the cleanup
lv_obj_add_event_cb(menuScreen->display, &(cleanup_event_cb), LV_EVENT_DELETE, menuScreen);
@ -183,5 +192,7 @@ void menu_screen_destroy(MenuScreen_t * const menuScreen)
return;
}
menuScreen->display = NULL;
//Lets save the current scroll position
menuScreen->lastScrollPosition = lv_obj_get_scroll_y(menuScreen->scrollItemContainer);
memset(menuScreen, 0, offsetof(MenuScreen_t, lastScrollPosition));
}

View File

@ -6,7 +6,11 @@
// Menu screen context object
typedef struct MenuScreen
{
//Can be erased attributes
lv_obj_t *display;
lv_obj_t *scrollItemContainer;
//Should not be erased attributes
lv_coord_t lastScrollPosition;
} MenuScreen_t;
/* Initializes the menu screen context object */