Posted June 11, 20178 yr With the GuiContainer there are methods #drawGuiContainerBackgroundLayer and #drawGuiContainerForegroundLayer but there are no similar methods (that I can find) in Gui Screen. Any ideas how to layer draw on Gui Screen?
June 11, 20178 yr GuiScreen::drawScreen. Just do not forget to call super.drawScreen() after you are done to render all the buttons and text fields
June 11, 20178 yr Author Yes but will this layer drawn things correctly? With Background and Foreground methods you can specify what goes behind what
June 11, 20178 yr Background and foreground are called from this method regardless, background is just called first, then foreground.
June 12, 20178 yr Author Alright so my button is appearing behind the background texture Button defined here: https://github.com/BeardlessBrady/Currency-Mod/blob/master-1.11.2/src/main/java/gunn/modcurrency/mod/client/gui/GuiGuide.java#L49 Background drawn: https://github.com/BeardlessBrady/Currency-Mod/blob/master-1.11.2/src/main/java/gunn/modcurrency/mod/client/gui/GuiGuide.java#L56
June 12, 20178 yr 23 hours ago, V0idWa1k3r said: Just do not forget to call super.drawScreen() after you are done to render all the buttons and text fields Calling super first makes the button drawn first and then everything is drawn over it. Call super last and it will draw the buttons over the rest of the ui.
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.