Jump to content

Rendering multiple separate GUI elements at once


Roboguy99

Recommended Posts

What I want to is render one GUI background layer which extends GuiContainer with all the slots in the correct place and no other features. I then want any progress bars, gauges, tanks, etc to be their own texture file rendered on top at the given co-ordinates. It's not working as I would like though, as you can see from this image:

cJp9KAC.png

 

What should be happening is a grey rectangle box in the middle of the screen somewhere (I haven't been able to fine-tune the location yet because of this bug), which is partially yellow depending on the progress values you give it (haven't coded this in properly so you have to hard-code it). No matter what co-ordinates I specify and no matter what progress I specify the result is always the same as in that image.

 

I've been trying to get this system to work with my generator block first, trying to render the inventory screen and a power bar.

 

I have quite a lot of code so here are the links to each one on my Github repo:

 

Generator GUI class: https://github.com/Roboguy99/Food-Tech/blob/master/src/main/java/roboguy99/foodTech/client/gui/GuiGeneratorBasic.java

Base GUI class: https://github.com/Roboguy99/Food-Tech/blob/master/src/main/java/roboguy99/foodTech/client/gui/GuiBase.java

Power bar class: https://github.com/Roboguy99/Food-Tech/blob/master/src/main/java/roboguy99/foodTech/client/gui/element/GuiElementPowerHorizontalLarge.java

Element base class: https://github.com/Roboguy99/Food-Tech/blob/master/src/main/java/roboguy99/foodTech/client/gui/element/GuiElement.java

 

Power bar texture: https://github.com/Roboguy99/Food-Tech/blob/master/src/main/resources/assets/roboguy99/textures/gui/elements/powerHorizontalLarge.png

Inventory screen texture: https://github.com/Roboguy99/Food-Tech/blob/master/src/main/resources/assets/roboguy99/textures/gui/blank.png

 

Sorry about the amount of links there, but I thought it would be easier than uploading all the code into spoilers. If anybody can help, that will be great. Thanks in advance.

I have no idea what I'm doing.

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.