Jump to content
View in the app

A better way to browse. Learn more.

Forge Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

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);
}}

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...

Important Information

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

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.