Buttons are no longer holdable when the screen is scrolling

This commit is contained in:
Maschell 2020-02-22 21:17:09 +01:00
parent 8a597a805d
commit 0776a13841

View File

@ -583,10 +583,17 @@ void GuiIconGrid::updateButtonPositions() {
uint32_t endPage = startPage;
if(targetLeftPosition != currentLeftPosition) {
for (auto const& x : vec) {
x.second->button->setHoldable(false);
}
endPage++;
if(endPage > pages) {
endPage = pages;
}
}else{
for (auto const& x : vec) {
x.second->button->setHoldable(true);
}
}
for(uint32_t i = startPage * (MAX_COLS * MAX_ROWS); i < (endPage + 1) * (MAX_COLS * MAX_ROWS); i++) {