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

Hi!

I made a Gui screen for MC1.3.2, I think I write it good, but only the textfield dont want to work.

You need to travel to the past if you want to help me. :)

 

Here's the GuiScreen file:

@SideOnly(Side.CLIENT)
public class GuiLogin extends GuiScreen
{
private final GuiScreen parentScreen;
private GuiTextField username;

public void initGui()
{
	super.initGui();
	username = new GuiTextField(this.fontRenderer, this.width / 2, this.height / 2, 100, 20);
    	this.username.setTextColor(-1);
        this.username.setMaxStringLength(10);
        this.username.setEnableBackgroundDrawing(true);
        this.username.setVisible(true);
}

    public GuiLogin(GuiScreen par1GuiScreen)
    {
        this.parentScreen = par1GuiScreen;
    }
    
    @Override
    public void drawScreen(int x, int y, float f)
    {
    	this.initGui();
    	this.username.drawTextBox();
    	this.BackGround();
    	super.drawScreen(x, y, f);
    }
    
    private void BackGround()
    {
    	final int xSizeOfTexture = 176;
    	final int ySizeOfTexture = 88;
    	
    	drawDefaultBackground();
    	
    	int var4 = this.mc.renderEngine.getTexture("/mmod/media/default.png");
    	
    	GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
    	this.mc.renderEngine.bindTexture(var4);
    	
    	int posX = (this.width - xSizeOfTexture) / 2;
    	int posY = (this.height - ySizeOfTexture) / 2;
    	
    	drawTexturedModalRect(posX, posY, 0, 0, xSizeOfTexture, ySizeOfTexture);
    }
}

 

Please help me! :D

GuiScreen#initGui() should only be called when you open a GUI or when you change the resolution of your screen. This is already done for you, don't call it every render tick...

 

To maybe solve your problem: Try rendering the textbox after you've drawn your screen. It could be that the textbox is now rendered behind your screen.

this.BackGround();
this.username.drawTextBox();

Author of PneumaticCraft, MineChess, Minesweeper Mod and Sokoban Mod. Visit www.minemaarten.com to take a look at them.

May i ask something: Why are you still modding in MC1.3.2? Why not update to MC1.6.4?

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

  • Author

I dont like the "New Minecraft". I think the original minecraft sandbox feeling was lost after the patch 1.3.2. :)

 

EDIT:

MineMaarten, thanks, it works! (and im a retard 'couse i didnt see that xD)

I dont like the "New Minecraft". I think the original minecraft sandbox feeling was lost after the patch 1.3.2. :)

I understand that, but it didn't lost it in my opinion...

Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support.

 

1.12 -> 1.13 primer by williewillus.

 

1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support.

 

http://www.howoldisminecraft1710.today/

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.