Posted April 29, 201411 yr Hey Guys. I searched for about 4 hours for this problem and I don't found anything... Now here is my Question: How can I edit the Main Menu (delete Buttons, edit Buttons, create new Buttons, etc.)? Please be insightful for my bad English (I'm German) and I warn you I'm a beginner ...
April 29, 201411 yr Try using GuiOpenEvent and cancel the gui for the main menu (GuiMainMenu), override it with your own main menu gui.
April 30, 201411 yr buttonList.add(new GuiButton(...)); Used in all gui of the game. You could have searched a bit.
May 2, 201411 yr Oh well, that a thema where I'm missing a tutorial. Well I think a year ago I had the same question and didn't find a tutorial or anything that would help me and so I gave there for one year up. Developer of Primeval Forest.
May 2, 201411 yr Yes, but how do I add this code? With an event? CoolBoy above already mentioned an event that looks like it would work. However, based on your questions it sounds like you've never done a mod that has intercepted an event before. So maybe you need to try out some tutorials on that first. No offense but when you ask for help you need to show you know enough that you can use the help and that you're not being too lazy. So create an event handler and try to intercept the event that CoolBoy mentioned and see what happens. If it doesn't work, post your code that you tried here and we can help further. Check out my tutorials here: http://jabelarminecraft.blogspot.com/
May 2, 201411 yr Author I got a NullPointerException: import net.minecraftforge.client.event.GuiOpenEvent; import net.minecraftforge.event.ForgeSubscribe; public class Core_Listener { @ForgeSubscribe public void Menu(GuiOpenEvent e){ e.gui.drawScreen(50, 10, 5f); } }
May 2, 201411 yr Do not start your methods with a capital letter; it's bad convention. You may want to create your own separate GuiScreen class that mimics the Main Menu screen. That way, you don't have to worry about deleting or screwing around with the vanilla screen, just make your own. Besides, it's a good learning experience.
May 3, 201411 yr Really, man? Was Google down? Anyway, here's a tutorial about GUIs: http://www.minecraftforum.net/topic/1412300-147forgeblaueseichoerns-gui-tutorial/ I would also highly suggest reading tutorials about UV texture coordinates in OpenGL too, as GUI building has a lot to do with it. Plus, it'll broaden your knowledge about OpenGL/LWJGL overall.
May 6, 201411 yr Author Now, I made my own gui. But I just found a way, how to open it form a Block or an Item. How can I now open it in the MainMenu?
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.