diff options
Diffstat (limited to 'apps/gui/list.c')
-rw-r--r-- | apps/gui/list.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/apps/gui/list.c b/apps/gui/list.c index 96652ce0a9..ee50ccf63e 100644 --- a/apps/gui/list.c +++ b/apps/gui/list.c | |||
@@ -786,6 +786,17 @@ bool list_do_action(int context, int timeout, | |||
786 | return gui_synclist_do_button(lists, action, wrap); | 786 | return gui_synclist_do_button(lists, action, wrap); |
787 | } | 787 | } |
788 | 788 | ||
789 | bool gui_synclist_item_is_onscreen(struct gui_synclist *lists, | ||
790 | enum screen_type screen, int item) | ||
791 | { | ||
792 | struct viewport vp = *lists->parent[screen]; | ||
793 | #ifdef HAVE_LCD_BITMAP | ||
794 | if (list_display_title(lists, lists->parent[screen])) | ||
795 | vp.height -= list_title_height(lists, lists->parent[screen]); | ||
796 | #endif | ||
797 | return item <= (lists->start_item[screen] + viewport_get_nb_lines(&vp)); | ||
798 | } | ||
799 | |||
789 | /* Simple use list implementation */ | 800 | /* Simple use list implementation */ |
790 | static int simplelist_line_count = 0; | 801 | static int simplelist_line_count = 0; |
791 | static char simplelist_text[SIMPLELIST_MAX_LINES][SIMPLELIST_MAX_LINELENGTH]; | 802 | static char simplelist_text[SIMPLELIST_MAX_LINES][SIMPLELIST_MAX_LINELENGTH]; |