mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-19 01:29:05 +00:00
Final Mouse Scroll Fix
This commit is contained in:
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);
|
||||
|
||||
Reference in new issue
Block a user