mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-11-22 11:53:29 +01:00
parent
26393be8b6
commit
c4fde68c3c
1 changed files with 1 additions and 1 deletions
|
@ -74,7 +74,7 @@ public class FilterModifierModuleGui extends AbstractPipeGui<FilterModifierModul
|
||||||
public boolean mouseDragged(double mouseX, double mouseY, int i, double j, double k) {
|
public boolean mouseDragged(double mouseX, double mouseY, int i, double j, double k) {
|
||||||
if (this.isScrolling) {
|
if (this.isScrolling) {
|
||||||
var percentage = Mth.clamp(((float) mouseY - (this.topPos + 32 + 18)) / (58 - 15), 0, 1);
|
var percentage = Mth.clamp(((float) mouseY - (this.topPos + 32 + 18)) / (58 - 15), 0, 1);
|
||||||
var offset = (int) (percentage * (float) (this.tags.size() - 5));
|
var offset = Math.max(0, (int) (percentage * (float) (this.tags.size() - 5)));
|
||||||
if (offset != this.scrollOffset) {
|
if (offset != this.scrollOffset) {
|
||||||
this.scrollOffset = offset;
|
this.scrollOffset = offset;
|
||||||
this.updateWidgets();
|
this.updateWidgets();
|
||||||
|
|
Loading…
Reference in a new issue