Jump to content

[1.7.10] GUI scaling incorrectly


Arcadius

Recommended Posts

Welp, I have no idea how I accomplished this. I think the image sort of speaks for itself, but it's still baffling. The image size is the same as the dimensions I specified in the Gui class, but it still looks so oddly scaled. What would be the best solution?

 

width=800 height=525zQjDAkp.png?1 [/img]

 


public class GuiInscriptionTable extends GuiContainer {

private ResourceLocation texture = new ResourceLocation(RunicWeapons.MODID + ":" + "textures/gui/InscriptionTableGUI.png" );

public GuiInscriptionTable(InventoryPlayer invPlayer, World world, int x, int y, int z) {
	super(new ContainerInscriptionTable(invPlayer, world, x, y, z));

	this.xSize = 176;
	this.ySize = 166;
}

public void onGuiClosed(){
	super.onGuiClosed();
}

protected void drawGuiContainerForegroundLayer(int i, int j)
{
	this.fontRendererObj.drawString(StatCollector.translateToLocal("Inscription Table"), 75, 5, 0x000000);
}

@Override
protected void drawGuiContainerBackgroundLayer(float p_146976_1_, int p_146976_2_, int p_146976_3_) {
	GL11.glColor4f(1F, 1F, 1F, 1F);
	this.mc.renderEngine.bindTexture(texture);

	int k = (this.width - this.xSize) / 2;
        int l = (this.height - this.ySize) / 2;
	this.drawTexturedModalRect(k, l, 0, 0, xSize, ySize);
}}

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.