Fixed scrollbar not scrolling correctly when clicked with mouse when grid tabs are visible, fixes #1449

This commit is contained in:
raoulvdberge
2017-09-06 15:09:46 +02:00
parent e95aa7d437
commit 8dce6fb0df
2 changed files with 2 additions and 1 deletions

View File

@@ -7,6 +7,7 @@
- Fixed bug where when multiple Fortune Upgrades are inserted, it chooses the first Fortune Upgrade instead of the highest one (raoulvdberge) - Fixed bug where when multiple Fortune Upgrades are inserted, it chooses the first Fortune Upgrade instead of the highest one (raoulvdberge)
- Fixed some translations having too big "Craft" text (raoulvdberge) - Fixed some translations having too big "Craft" text (raoulvdberge)
- Fixed crash with GUI when toggling the Grid size quickly (raoulvdberge) - Fixed crash with GUI when toggling the Grid size quickly (raoulvdberge)
- Fixed scrollbar not scrolling correctly when clicked with mouse when grid tabs are visible (raoulvdberge)
- The Fortune Upgrade doesn't use NBT anymore to store the fortune level (raoulvdberge) - The Fortune Upgrade doesn't use NBT anymore to store the fortune level (raoulvdberge)
- Pressing SHIFT over an item in the Grid will no longer display the full unformatted count, instead, use CTRL + SHIFT and it will be displayed in the tooltip (raoulvdberge) - Pressing SHIFT over an item in the Grid will no longer display the full unformatted count, instead, use CTRL + SHIFT and it will be displayed in the tooltip (raoulvdberge)

View File

@@ -63,7 +63,7 @@ public class Scrollbar {
wasClicking = down; wasClicking = down;
if (isScrolling) { if (isScrolling) {
setOffset((int) Math.floor((float) (mouseY - SCROLLER_HEIGHT) / (float) (height - SCROLLER_HEIGHT) * (float) maxOffset)); setOffset((int) Math.floor((float) (mouseY - y) / (float) (height - SCROLLER_HEIGHT) * (float) maxOffset));
} }
} }
} }