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

Hey guys,

 

Got one last snag in my GUIWidgets mod. It's at a usable, releasable stage now, but this graphical bug is annoying me!

 

Basically, whenever I resize the screen, my text gets distorted. But, not always.

 

I'm in the process of switching to a slightly better way of rendering items which uses glScalef differently. Unfortunately, the old way of doing it (Read from the vanilla icons texture, scale it up 2.0F) made my text scale perfectly; but when I switched to my new way (Read from a custom png file, already scaled so no need to resize), the text distorts on scale up.

 

Here's an image which shows what I mean. Health and EXP are on the new system, Hunger is on the old system:

53008fdb8c337.jpg

 

 

here's the code for Health. I'm currently popping GL before I get to health and then pushing again, so I KNOW nothing previous will be affecting it.  Below that is the code from hunger where it's all inclusive.

 

		//render health bar
		if (config.healthText) {
			GL11.glPushMatrix();
			GL11.glScalef(0.5F, 0.5F, 0.5F);
			font.drawStringWithShadow("Health: " + health + "/" + maxHealth, xPos + 22, yPos + 6, config.healthTextColour);
			GL11.glPopMatrix();
		}

 

		GL11.glPushMatrix();
		GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);;
		GL11.glDisable(GL11.GL_LIGHTING);
		GL11.glScalef(0.5F, 0.5F, 0.5F);
		mc.renderEngine.bindTexture(guiStatsBar);

		this.drawTexturedModalRect(xPos, yPos, 0, 128, sizeX, sizeY);
		this.drawTexturedModalRect(xPos + 2, yPos + 2, 0, 76, hungerAmount, 16);
		this.drawTexturedModalRect(xPos, yPos, 0, 20, sizeX, sizeY);

		this.mc.renderEngine.bindTexture(vanillaIcons);
		GL11.glScalef(2.0F, 2.0F, 2.0F);
		this.drawTexturedModalRect(Math.round(xPos / 2) + 1, Math.round(yPos / 2), 16, 36, 9, 9);

		if (config.hungerText) {
			GL11.glScalef(0.5F, 0.5F, 0.5F);
			font.drawStringWithShadow("Hunger: " + hunger + "/" + maxHunger, xPos + 22, yPos + 6, config.hungerTextColour);
		}
		GL11.glPopMatrix();

width=463 height=200

http://s13.postimg.org/z9mlly2av/siglogo.png[/img]

My mods (Links coming soon)

Cities | Roads | Remula | SilvaniaMod | MoreStats

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.