Skip to content

Commit

Permalink
Add mouseScrolled support to ContainerScreenScrolling
Browse files Browse the repository at this point in the history
  • Loading branch information
rubensworks committed Jan 4, 2025
1 parent e24341d commit c68271a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,12 @@ public boolean mouseDragged(double mouseX, double mouseY, int mouseButton, doubl
return super.mouseDragged(mouseX, mouseY, mouseButton, mouseXPrev, mouseYPrev);
}

@Override
public boolean mouseScrolled(double mouseX, double mouseY, double mouseZ, double scroll) {
return (isHovering(getScrollX(), getScrollY(), this.scrollbar.getWidth(), getScrollHeight(), mouseX, mouseY) && this.scrollbar.mouseScrolled(mouseX, mouseY, mouseZ, scroll))
|| super.mouseScrolled(mouseX, mouseY, mouseZ, scroll);
}

protected void updateSearch(String searchString) {
getMenu().updateFilter(searchString);
this.scrollbar.setTotalRows(getMenu().getFilteredItemCount() / getMenu().getColumns());
Expand Down

0 comments on commit c68271a

Please sign in to comment.