Creepmander Posted December 8, 2013 Posted December 8, 2013 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! Quote
MineMaarten Posted December 8, 2013 Posted December 8, 2013 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(); Quote Author of PneumaticCraft, MineChess, Minesweeper Mod and Sokoban Mod. Visit www.minemaarten.com to take a look at them.
larsgerrits Posted December 8, 2013 Posted December 8, 2013 May i ask something: Why are you still modding in MC1.3.2? Why not update to MC1.6.4? Quote 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/
Creepmander Posted December 8, 2013 Author Posted December 8, 2013 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 ) Quote
larsgerrits Posted December 8, 2013 Posted December 8, 2013 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... Quote 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/
Creepmander Posted December 8, 2013 Author Posted December 8, 2013 Everbody have got his/her own opinion. Quote
Recommended Posts
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.