Jump to content

[SOLVED] [1.12] Non-container gui opening, but not drawing background


Recommended Posts

Posted (edited)

Just as the title states, I'm having trouble opening a container-less gui. It's just a button with a background as of now. I'm unsure if I'm handling it correctly, so any insight would be appreciated.

 

So, what's happening is that the gui itself is opening perfectly fine, the button and background are drawing and the button functions, the console prints my message, but my background png (simply the demobackground.png provided by Minecraft) isn't drawing. There isn't an error message when opening the gui as well.

 

I think this is all the relevant code and I've attached an image of what the gui is displaying. If you need anything else from me please let me know, thanks!

 

Gui:

  Reveal hidden contents

 

GuiHandler:

  Reveal hidden contents

Block:

  Reveal hidden contents

 

Main:

  Reveal hidden contents

 

ClientProxy:

  Reveal hidden contents

gui.png

Edited by blfngl
Put solved in title
Posted (edited)

Hi there!

Looks like you're not actually drawing your background anywhere, just binding the texture.

Try calling Gui#drawTexturedModalRect(...) in the drawScreen method

 

Edited by simicats
  • Like 1

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.