cancel
Showing results for 
Search instead for 
Did you mean: 

ScrollWheel Skipping Second Element

BKazi.1
Associate II

I have a weird issue with ScrollWheel. All the elements are displayed properly. However, it seems to be taking no action when scrolling to the last element, and on debugging, I find that the returned index is skipping the second element (0,2,3,4,5)

Screen_TextView.cpp

void Screen_TextView::scroll_languageUpdateItem(Lang_Item& item, int16_t itemIndex)
{
	item.updateItem(lang_names[itemIndex], lang_flags[itemIndex]);
}
 
void Screen_TextView::scroll_languageUpdateCenterItem(Lang_Item_Selected& item, int16_t itemIndex)
{
	item.updateItem(lang_names[itemIndex], lang_flags[itemIndex]);
	touchgfx_printf("Item Index: %i \n", itemIndex);
	Texts::setLanguage(languages[itemIndex]);
	text_scroll.invalidate();
}

Debug Output

Item Index: 0
Item Index: 2
Item Index: 3
Item Index: 4
Item Index: 5

0 REPLIES 0