Jump to content

Custom Textured Button unpredictably rendering Default Minecraft Textures


TBroski

Recommended Posts

Hello! I've been making a gui that implements my custom button widgets. My code is here, https://pastebin.com/wBnPA6kM. This pastebin link gives my "main" gui class that implements the widgets. I also included one of my widgets near the bottom, they are all similar and have the same issue. And images of the issue can be found here, https://imgur.com/a/sm7iIh4. As you can see in the images, my button texture actually renders but is fronted by the default minecraft button textures.  Anyways, all help is appreciated and I give all of my gratitude. If I need to give anything else, just let me know. I was hesitant to post this out of respect of your time. But, this is a forum for help, right?

 

Thanks again!??

 

EDIT: Fyi those images were taken in the same game session!

Edited by TBroski
Link to comment
Share on other sites

This seems like an issue of rendering the same widget twice. If you look at the super method for renderButton, you can see that the button is already rendered with the standard textures before calling your own blit to render. Try removing the super method and replacing what's missing inside your own method.

  • Like 1
Link to comment
Share on other sites

super.render already renders the buttons, and since you want your buttons to render only on certain conditions, I think you can just remove super.render in the render method.

 

edit: whelp when i posted this ChampionAsh's message didn't load ?

Edited by kaydogz
  • Like 1
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.