Final Mouse Scroll Fix

This commit is contained in:
Kam committed 2024-05-26 18:10:37 -04:00
1 parent bad2c3157b
commit 4c46496c82
2 files changed
+2 -2

No files matched your search

@@ -43,7 +43,7 @@ public abstract class GuiNPCInterface extends GuiScreen
public boolean closeOnEsc = false;
public int guiLeft,guiTop,xSize,ySize;
private SubGuiInterface subgui;
public int mouseX, mouseY;
public int mouseX, mouseY, mouseScroll;
public float bgScale = 1;
public float bgScaleX = 1;
public float bgScaleY = 1;
@@ -64,7 +64,7 @@ public class GuiScriptTextArea extends GuiNpcTextField {
container.visibleLines = height / container.lineHeight;
if(listener instanceof GuiNPCInterface){
int k2 = ((GuiNPCInterface) listener).mouseScroll;
int k2 = ((GuiNPCInterface) listener).mouseScroll = Mouse.getDWheel();
if(k2 != 0) {
this.scrolledLine -= k2/40;
this.scrolledLine = Math.max(Math.min(this.scrolledLine, this.container.linesCount - this.height / this.container.lineHeight), 0);