mirror of
https://github.com/Ellpeck/PrettyPipes.git
synced 2024-12-26 16:49:23 +01:00
parent
a40389c548
commit
7a44dc50ca
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