diff options
Diffstat (limited to 'src/main/java/makamys/lodmod/util/GuiHelper.java')
-rw-r--r-- | src/main/java/makamys/lodmod/util/GuiHelper.java | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/src/main/java/makamys/lodmod/util/GuiHelper.java b/src/main/java/makamys/lodmod/util/GuiHelper.java index 0f0f80e..3054237 100644 --- a/src/main/java/makamys/lodmod/util/GuiHelper.java +++ b/src/main/java/makamys/lodmod/util/GuiHelper.java @@ -26,7 +26,6 @@ public class GuiHelper { public static void drawRectangle(int x, int y, int w, int h, int color) { Tessellator tessellator = Tessellator.instance; - //GL11.glEnable(GL11.GL_BLEND); tessellator.startDrawingQuads(); tessellator.setColorOpaque_I(color); tessellator.addVertex(x, y, 0); @@ -37,6 +36,22 @@ public class GuiHelper { tessellator.draw(); } + public static void drawRectangle(int x, int y, int w, int h, int color, int opacity) { + GL11.glEnable(GL11.GL_BLEND); + + Tessellator tessellator = Tessellator.instance; + tessellator.startDrawingQuads(); + tessellator.setColorRGBA_I(color, opacity); + tessellator.addVertex(x, y, 0); + tessellator.addVertex(x, y+h, 0); + tessellator.addVertex(x+w, y+h, 0); + tessellator.addVertex(x+w, y, 0); + + tessellator.draw(); + + GL11.glDisable(GL11.GL_BLEND); + } + public static void end() { //GL11.glDisable(GL11.GL_BLEND); |