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

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.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...

Important Information

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