mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-22 06:12:19 +00:00
Failed attempts at fixing scroll lists within scrolls
This commit is contained in:
1 parent
767ebc5131
commit
f9483b8292
2 files changed
+11
-15
No files matched your search
@@ -43,7 +43,8 @@ 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 static boolean recordScroll = true;
|
||||
|
||||
public float bgScale = 1;
|
||||
public float bgScaleX = 1;
|
||||
@@ -237,7 +238,9 @@ public abstract class GuiNPCInterface extends GuiScreen
|
||||
drawBackground();
|
||||
}
|
||||
|
||||
int scrolled = Mouse.getDWheel();
|
||||
if(recordScroll) {
|
||||
mouseScroll = Mouse.getDWheel();
|
||||
}
|
||||
|
||||
boolean subGui = hasSubGui();
|
||||
drawCenteredString(fontRendererObj, title, width / 2, guiTop + 4, 0xffffff);
|
||||
@@ -248,7 +251,7 @@ public abstract class GuiNPCInterface extends GuiScreen
|
||||
}
|
||||
for(GuiCustomScroll scroll : scrolls.values()){
|
||||
scroll.updateSubGUI(subGui);
|
||||
scroll.drawScreen(i, j, f, !subGui && scroll.isMouseOver(i, j)?scrolled:0);
|
||||
scroll.drawScreen(i, j, f, !subGui && scroll.isMouseOver(i, j)?mouseScroll:0);
|
||||
}
|
||||
for(GuiScreen gui : extra.values())
|
||||
gui.drawScreen(i, j, f);
|
||||
@@ -264,7 +267,7 @@ public abstract class GuiNPCInterface extends GuiScreen
|
||||
}
|
||||
}
|
||||
for(GuiScrollableComponent guiScrollableComponent : scrollableGuiInserts.values()){
|
||||
guiScrollableComponent.drawScreen(i, j, f, guiScrollableComponent.isMouseOver(i,j)?scrolled:0);
|
||||
guiScrollableComponent.drawScreen(i, j, f, guiScrollableComponent.isMouseOver(i,j)?mouseScroll:0);
|
||||
}
|
||||
|
||||
if(subgui != null)
|
||||
|
||||
Reference in new issue
Block a user