Jump to content

1.5 GUI problems


endershadow

Recommended Posts

how would I bind the texture for the GUI in 1.5? here's what i have

@Override
        protected void drawGuiContainerBackgroundLayer(float par1, int par2,
                        int par3) {
                //draw your Gui here, only thing you need to change is the path
                int texture = mc.renderEngine.getTexture("/matt/lyoko/gui/supercalculator.png");
                GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
                this.mc.renderEngine.bindTexture(texture);
                int x = (width - xSize) / 2;
                int y = (height - ySize) / 2;
                this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
        }

It says that I need to make bindTexture public. should i be doing this differently?

Link to comment
Share on other sites

nevermind. just do this for the texture

@Override
        protected void drawGuiContainerBackgroundLayer(float par1, int par2,
                        int par3) {
                //draw your Gui here, only thing you need to change is the path
                GL11.glColor4f(1.0F, 1.0F, 1.0F, 1.0F);
                this.mc.renderEngine.func_98187_b("/mods/lyoko/textures/gui/supercalculator.png");
                int x = (width - xSize) / 2;
                int y = (height - ySize) / 2;
                this.drawTexturedModalRect(x, y, 0, 0, xSize, ySize);
        }

Link to comment
Share on other sites

Thank you for sharing your bit of code there.  I was wondering if you could or would share some of your 1.5* GUI knowledge.  I have been racking my brain over it for days and it seems as though there is not a decent tutorial out for 1.5 and later as of yet.  I know you don't know me and do not have a reason to care, but I am sure that I speak on behalf of many new moders when I say, it would be greatly appreciated.

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.

Announcements



×
×
  • Create New...

Important Information

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