BeardlessBrady Posted June 11, 2017 Share Posted June 11, 2017 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? Quote Link to comment Share on other sites More sharing options...
V0idWa1k3r Posted June 11, 2017 Share Posted June 11, 2017 GuiScreen::drawScreen. Just do not forget to call super.drawScreen() after you are done to render all the buttons and text fields Quote Link to comment Share on other sites More sharing options...
BeardlessBrady Posted June 11, 2017 Author Share Posted June 11, 2017 Yes but will this layer drawn things correctly? With Background and Foreground methods you can specify what goes behind what Quote Link to comment Share on other sites More sharing options...
V0idWa1k3r Posted June 11, 2017 Share Posted June 11, 2017 Background and foreground are called from this method regardless, background is just called first, then foreground. Quote Link to comment Share on other sites More sharing options...
BeardlessBrady Posted June 12, 2017 Author Share Posted June 12, 2017 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 Quote Link to comment Share on other sites More sharing options...
V0idWa1k3r Posted June 12, 2017 Share Posted June 12, 2017 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. Quote Link to comment Share on other sites More sharing options...
BeardlessBrady Posted June 12, 2017 Author Share Posted June 12, 2017 Derp, That makes sense. Thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.