protected void renderSplitHighlight(int x, int y, int widthIn, int heightIn) { GlStateManager.enableBlend(); RenderUtil.renderQuad2D(getGuiLeft() + x, getGuiTop() + y, 0, widthIn, heightIn / 2, PULL_COLOR); RenderUtil.renderQuad2D(getGuiLeft() + x, getGuiTop() + y + (heightIn / 2), 0, widthIn, heightIn / 2, PUSH_COLOR); GlStateManager.disableBlend(); }
protected void renderSlotHighlight(@Nonnull Vector4f col, int x, int y, int widthIn, int heightIn) { GlStateManager.enableBlend(); RenderUtil.renderQuad2D(getGuiLeft() + x, getGuiTop() + y, 0, widthIn, heightIn, col); GlStateManager.disableBlend(); }
protected void renderSplitHighlight(int x, int y, int widthIn, int heightIn) { GL11.glEnable(GL11.GL_BLEND); RenderUtil.renderQuad2D(getGuiLeft() + x, getGuiTop() + y, 0, widthIn, heightIn / 2, PULL_COLOR); RenderUtil.renderQuad2D(getGuiLeft() + x, getGuiTop() + y + (heightIn / 2), 0, widthIn, heightIn / 2, PUSH_COLOR); GL11.glDisable(GL11.GL_BLEND); }
protected void renderSlotHighlight(@Nonnull Vector4f col, int x, int y, int widthIn, int heightIn) { GlStateManager.enableBlend(); RenderUtil.renderQuad2D(getGuiLeft() + x, getGuiTop() + y, 0, widthIn, heightIn, col); GlStateManager.disableBlend(); }
@Override public void draw(int mouseX, int mouseY, float partialTick) { RenderUtil.renderQuad2D(bounds.x, bounds.y, 0, bounds.width, bounds.height, ColorUtil.getRGB(Color.black)); Minecraft mc = Minecraft.getMinecraft(); ScaledResolution scaledresolution = new ScaledResolution(mc); int vpx = ((screen.getGuiRootLeft() + screen.getOverlayOffsetXLeft() + 5) * scaledresolution.getScaleFactor()); int vpy = (screen.getGuiRootTop() + 4) * scaledresolution.getScaleFactor(); int w = bounds.width * scaledresolution.getScaleFactor(); int h = bounds.height * scaledresolution.getScaleFactor(); renderer.drawScreen(mouseX, mouseY, partialTick, new Rectangle(vpx, vpy, w, h), bounds); }
@Override public void draw(int mouseX, int mouseY, float partialTick) { RenderHelper.enableGUIStandardItemLighting(); GlStateManager.enableBlend(); RenderUtil.renderQuad2D(8, 8, 0, getXSize() - 11, getYSize() - 11, new Vector4f(0, 0, 0, 1)); RenderUtil.renderQuad2D(10, 10, 0, getXSize() - 15, getYSize() - 15, new Vector4f(0.6, 0.6, 0.6, 1)); RenderItem itemRenderer = mc.getRenderItem(); GlStateManager.enableDepth(); NNList<ItemStack> snapshot = filter.getSnapshot(); int x = 15; int y = 10; int count = 0; for (ItemStack st : snapshot) { if (!st.isEmpty()) { itemRenderer.renderItemAndEffectIntoGUI(st, x, y); } x += 20; count++; if (count % 9 == 0) { x = 15; y += 20; } } }
public static void render(@Nonnull Gui gui, int x, int y, int length, @Nonnull ExperienceContainer xpCont, int required) { String text = xpCont.getExperienceLevel() + ""; int color = 8453920; boolean shadow = true; if (required > 0) { text += "/" + required; if (required > xpCont.getExperienceLevel()) { color = ColorUtil.getRGB(1f, 0, 0.1f); shadow = false; } } FontRenderer fr = Minecraft.getMinecraft().fontRenderer; int strX = x + length / 2 - fr.getStringWidth(text) / 2; fr.drawString(text, strX, y - 11, color, shadow); RenderUtil.bindTexture(IconEIO.TEXTURE); GlStateManager.color(1f, 1f, 1f, 1f); int xpScaled = xpCont.getXpBarScaled(length - 2); // x, y, u, v, width, height // start of 'slot' gui.drawTexturedModalRect(x, y, 0, 91, 1, 5); gui.drawTexturedModalRect(x + 1, y, 1, 91, length - 2, 5); gui.drawTexturedModalRect(x + length - 1, y, 125, 91, 1, 5); RenderUtil.renderQuad2D(x + 1, y + 1, 0, xpScaled, 3, ColorUtil.getRGB(0, 127, 14)); }
@Override protected void drawForegroundImpl(int mouseX, int mouseY) { super.drawForegroundImpl(mouseX, mouseY); if (!isConfigOverlayEnabled()) { for (int i = TileFarmStation.minSupSlot; i <= TileFarmStation.maxSupSlot; i++) { if (getTileEntity().isSlotLocked(i)) { Slot slot = inventorySlots.getSlot(i); GlStateManager.enableBlend(); GlStateManager.blendFunc(GL11.GL_SRC_ALPHA, GL11.GL_ONE_MINUS_SRC_ALPHA); RenderUtil.renderQuad2D(slot.xPos, slot.yPos, 0, 16, 16, new Vector4f(0, 0, 0, 0.25)); GlStateManager.disableBlend(); } } } }
RenderUtil.renderQuad2D(x, y, 0, IconEIO.IO_WHATSIT.width, IconEIO.IO_WHATSIT.height, new Vector4f(0.4f, 0.4f, 0.4f, 0.6f)); GlStateManager.disableBlend(); inNeigButBounds = true;