Jump to content

Custom main menu?


Recommended Posts

Sorry for my bad English, I'm from Poland :P.


Hello :D

I'd like to create custom main menu to minecraft. I have search tutorials, but I don't find something that an help me. I found Main Menu API by kingbdogz, but I've no idea how to use it (add to my mod).


I'd like to edit the buttons,  change background (without edit the vanilla code and assets!) and other things (like a text and add images).


So, help...

Link to comment
Share on other sites

So, I've problem with:

if (Minecraft.currentScreen != null && Minecraft.currentScreen.getClass() == GuiMainMenu.class){
fontRender.drawStringWithShadow("text", x, y, color);


When I add it, Minecraft crashing. Eclipse tell me to change currentScreen to static, but in vanilla code :C

Link to comment
Share on other sites

Ok, I've learned about it :P So, now I've that, what I need, but...

I can use GL11 to draw my main menu, but the buttons from... vanilla is still work. So, I've tried to change the screen to my own. I did it, but Minecraft crashing. I think it's because I don't include functions in my guiMainMenu ;P (Eclipse not asking about create them) I don't now how to start. I tried copy the vanilla guiMainMenu, but I've a lot of errors :C


My code in tickHandler:

if (mc.currentScreen != null && mc.currentScreen.getClass() == GuiMainMenu.class){
//fontRender.drawStringWithShadow("Mainmenu", x, y, color);
mc.currentScreen = new GuiRpgMainMenu();	         


I can't test it in vanilla guis, because they need a lot of parameters.


So, now my problem is how to code my own screen class. Tutorials, ideas, anything will help :D

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in

Sign In Now

  • Create New...

Important Information

By using this site, you agree to our Terms of Use.