mirror of
https://github.com/GTNewHorizons/bdlib.git
synced 2026-11-22 05:02:33 +00:00
Fixed BaseScreen not drawing the background in correct position
This commit is contained in:
1 parent
c2a1cc09e3
commit
5f9c311f41
1 file changed
+6
-1
@@ -12,6 +12,7 @@ package net.bdew.lib.gui
|
||||
import net.minecraft.client.gui.inventory.GuiContainer
|
||||
import net.minecraft.inventory.Container
|
||||
import scala.collection.mutable
|
||||
import org.lwjgl.opengl.GL11
|
||||
|
||||
abstract class BaseScreen(cont: Container, xSz: Int, ySz: Int) extends GuiContainer(cont) {
|
||||
xSize = xSz
|
||||
@@ -60,6 +61,10 @@ abstract class BaseScreen(cont: Container, xSz: Int, ySz: Int) extends GuiContai
|
||||
protected def drawGuiContainerBackgroundLayer(f: Float, x: Int, y: Int) {
|
||||
if (background != null)
|
||||
widgets.drawTexture(rect, background)
|
||||
widgets.drawBackground(Point(x, y))
|
||||
|
||||
GL11.glPushMatrix()
|
||||
GL11.glTranslatef(rect.x, rect.y, 0)
|
||||
widgets.drawBackground(Point(x, y) - rect.origin)
|
||||
GL11.glPopMatrix()
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user