Fix illegal access exception, fixes #20

This commit is contained in:
Raoul Van den Berge
2016-04-03 23:09:29 +02:00
parent fe7c47928d
commit 8cb9fbf328
2 changed files with 9 additions and 1 deletions

View File

@@ -228,4 +228,12 @@ public abstract class GuiBase extends GuiContainer {
public abstract void drawBackground(int x, int y, int mouseX, int mouseY);
public abstract void drawForeground(int mouseX, int mouseY);
public int getGuiLeft() {
return guiLeft;
}
public int getGuiTop() {
return guiTop;
}
}

View File

@@ -51,7 +51,7 @@ public class Scrollbar {
public void draw(GuiBase gui) {
gui.bindTexture("icons.png");
gui.drawTexture(gui.guiLeft + x, gui.guiTop + y + (int) currentScroll, canScroll() ? 232 : 244, 0, 12, 15);
gui.drawTexture(gui.getGuiLeft() + x, gui.getGuiTop() + y + (int) currentScroll, canScroll() ? 232 : 244, 0, 12, 15);
}
public void update(GuiBase gui, int mouseX, int mouseY) {