Posted November 7, 201410 yr My gui appears fine. However, only the top-left part of my Gui is drawn. In the code, I specify the correct width and height of the image, so I'm at a loss as to what is doing it. Here is the code: package com.artman41.pockets.gui; import org.lwjgl.opengl.GL11; import com.artman41.pockets.misc.Reference; import net.minecraft.client.Minecraft; import net.minecraft.client.gui.GuiScreen; import net.minecraft.entity.player.EntityPlayer; import net.minecraft.util.ResourceLocation; public class Pocket1 extends GuiScreen{ ResourceLocation texture = new ResourceLocation(Reference.modID.toLowerCase(), "textures/gui/background.png"); public final int xSizeofTexture = 105, ySizeofTexture = 107; public Pocket1(EntityPlayer player){ } @Override public void drawScreen(int x, int y, float f){ drawDefaultBackground(); GL11.glColor4f(1f, 1f, 1f, 1f); Minecraft.getMinecraft().getTextureManager().bindTexture(texture); int posX = (this.width - xSizeofTexture) / 2; int posY = (this.height - ySizeofTexture) / 2; drawTexturedModalRect(posX, posY, 0, 0, xSizeofTexture, ySizeofTexture); super.drawScreen(x, y, f); } @Override public boolean doesGuiPauseGame(){ return false; } } And here is the image:
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.