Make debug view scrollable
This commit is contained in:
@ -17,14 +17,14 @@ DebugViewViewBase::DebugViewViewBase() :
|
||||
list.setPosition(15, 15, 450, 290);
|
||||
list.setHorizontal(false);
|
||||
list.setCircular(true);
|
||||
list.setEasingEquation(touchgfx::EasingEquations::backEaseOut);
|
||||
list.setEasingEquation(touchgfx::EasingEquations::linearEaseOut);
|
||||
list.setSwipeAcceleration(10);
|
||||
list.setDragAcceleration(10);
|
||||
list.setNumberOfItems(1);
|
||||
list.setPadding(0, 0);
|
||||
list.setSnapping(false);
|
||||
list.setSelectedItemOffset(0);
|
||||
list.setDrawableSize(26, 0);
|
||||
list.setDrawables(listListItems, updateItemCallback);
|
||||
list.animateToItem(0, 0);
|
||||
add(list);
|
||||
|
||||
line1.setPosition(15, 15, 1, 290);
|
||||
@ -69,6 +69,27 @@ void DebugViewViewBase::setupScreen()
|
||||
}
|
||||
}
|
||||
|
||||
void DebugViewViewBase::handleKeyEvent(uint8_t key)
|
||||
{
|
||||
if(104 == key)
|
||||
{
|
||||
//ScrollUp
|
||||
//When hardware button 104 clicked call virtual function
|
||||
//Call scrollUp
|
||||
scrollUp();
|
||||
|
||||
}
|
||||
|
||||
if(108 == key)
|
||||
{
|
||||
//ScrollDown
|
||||
//When hardware button 108 clicked call virtual function
|
||||
//Call scrollDown
|
||||
scrollDown();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
void DebugViewViewBase::updateItemCallbackHandler(touchgfx::DrawableListItemsInterface* items, int16_t containerIndex, int16_t itemIndex)
|
||||
{
|
||||
if (items == &listListItems)
|
||||
|
||||
Reference in New Issue
Block a user