The_Fireplace Posted May 31, 2015 Share Posted May 31, 2015 Ok, I have a Gui which renders fine when the window is small, but when the window is maximized/put in to fullscreen, it renders in the wrong spot. My setup is: the UtilityGui renders, then at the end of its render code, tells the overlay gui to render on top of it. Then, the foreground(just 1 item icon in the screenshots) renders over that. The foreground and UtilityGui render correctly, it is the overlay gui(GuiFireplaceCoreTab) that is in the wrong spot. Here is my code: GuiFireplaceCoreTab: https://bitbucket.org/The_Fireplace/fireplace-core/src/ae9361509a1bd65c5a09b5cdfaa1b7766a33b844/src/main/java/the_fireplace/fireplacecore/gui/GuiFireplaceCoreTab.java?at=master GuiModTab(superclass of GuiFireplaceCoreTab): https://bitbucket.org/The_Fireplace/fireplace-core/src/ae9361509a1bd65c5a09b5cdfaa1b7766a33b844/src/main/java/the_fireplace/fireplacecore/gui/GuiModTab.java?at=master UtilityGui(link to the line it makes GuiFireplaceCoreTab render): https://bitbucket.org/The_Fireplace/fireplace-core/src/ae9361509a1bd65c5a09b5cdfaa1b7766a33b844/src/main/java/the_fireplace/fireplacecore/gui/UtilityGui.java?at=master#cl-216 Quote If I helped please press the Thank You button. Check out my mods at http://www.curse.com/users/The_Fireplace/projects Link to comment Share on other sites More sharing options...
Abastro Posted June 1, 2015 Share Posted June 1, 2015 You should move your gui constructor code into the initGui, since it is called when gui is opened and scaled. Quote I. Stellarium for Minecraft: Configurable Universe for Minecraft! (WIP) II. Stellar Sky, Better Star Rendering&Sky Utility mod, had separated from Stellarium. Link to comment Share on other sites More sharing options...
The_Fireplace Posted June 2, 2015 Author Share Posted June 2, 2015 You should move your gui constructor code into the initGui, since it is called when gui is opened and scaled. All that did was cause the gui to center on 0,0; at least when it is in the constructor, it centers correctly when the screen is small. Quote If I helped please press the Thank You button. Check out my mods at http://www.curse.com/users/The_Fireplace/projects 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.