SentinelCraft Legacy Forum 2013 - 2022

Everything Else => Non-Minecraft Topics => Topic started by: HvPanda on July 23, 2018, 11:06:59 AM

Title: CMM - Custom Main Menu
Post by: HvPanda on July 23, 2018, 11:06:59 AM
I started playing with CMM today. I was wondering if there are more players on Setinelcraft who made there own custom main menu? I've no experience with the coding most of it sounds really easy. If you wanna experiment don't forget to close it with a ` it got me stuck for a while.



If you wanna use mine or help improve here is the code. All the images are from the web so no need for a source folder.

Code: [Select]
{
    "images":
    {
        "title":
        {
            "image" : "custommainmenu:textures/gui/minecraft.png",
            "posX" : -170,
            "posY" : -20,
            "width" : 512,
            "height" : 512,
            "alignment" : "center"
        },
        "Sentinelcraft logo":
        {
            "image" : "web:http://www.sentinelcraft.net/images/global/sentinel_craft_logo.png",
            "posX" : -150,
            "posY" : 30,
            "width" : 216,
            "height" : 83,
            "alignment" : "center"
        },
        "Black":
        {
            "image" : "web:https://www.tasting-sicily.com/wp-content/uploads/2016/04/black-transparent-layer.png",
            "posX" : 60,
            "posY" : -300,
            "width" : 130,
            "height" : 2000,
            "alignment" : "left.center"
        },
        "Logo corner":
        {
            "image" : "web:http://sentinelcraft.net/resources/images/sentinelcraft_web_home_logo.png",
            "posX" : 90,
            "posY" : 0,
            "width" : 70,
            "height" : 90,
            "alignment" : "left.center"
        }
 
    },
   
    "buttons":
    {
        "singleplayer":
        {
            "text" : "menu.singleplayer",
            "posX" : 80,
            "posY" : 175,
            "width" : 90,
            "height" : 20,
            "alignment" : "left.center",
            "action" :
            {
                "type" : "openGui",
                "gui" : "singleplayer"
            }
        },
       
        "multiplayer":
        {
            "text" : "menu.multiplayer",
            "posX" : 80,
            "posY" : 200,
            "width" : 90,
            "height" : 20,
            "alignment" : "left.center",
            "action" :
            {
                "type" : "openGui",
                "gui" : "multiplayer"
            }
        },
       

        "SentinelCraft":
        {
            "text" : "SentinelCraft",
            "posX" : 80,
            "posY" : 225,
            "width" : 90,
            "height" : 20,
            "alignment" : "left.center",
            "action" :
            {
                "type" : "connectToServer",
                "ip" : "play.sentinelcraft.net"
            }
        },
        "Vote":
        {
            "text" : "Vote",
            "posX" : 80,
            "posY" : 250,
            "width" : 90,
            "height" : 20,
            "alignment" : "left.center",
            "action" :
            {
                "type" : "openLink",
                "link" : "http://sentinelcraft.net/vote.php"
            }
        },
        "Dynmap":
        {
            "text" : "Dynmap",
            "posX" : 80,
            "posY" : 275,
            "width" : 90,
            "height" : 20,
            "alignment" : "left.center",
            "action" :
            {
                "type" : "openLink",
                "link" : "http://play.sentinelcraft.net:8123/?worldname=Horizon&mapname=flat&zoom=4&x=1900&y=64&z=914"
            }
        },
        "mods":
        {
            "text" : "fml.menu.mods",
            "posX" : 80,
            "posY" : 400,
            "width" : 90,
            "height" : 20,
            "alignment" : "left.center",
            "action" :
            {
                "type" : "openGui",
                "gui" : "mods"
            }
        },
           
        "options":
        {
            "text" : "menu.options",
            "posX" : 80,
            "posY" : 424,
            "width" : 90,
            "height" : 20,
            "alignment" : "left.center",
            "action" :
            {
                "type" : "opengui",
                "gui" : "options"
            }
        },
       
        "quit":
        {
            "text" : "menu.quit",
            "posX" : 80,
            "posY" : 450,
            "width" : 90,
            "height" : 20,
            "alignment" : "left.center",
            "action" :
            {
                "type" : "quit"
            }
        },
       
        "language":
        {
            "text" : "",
            "posX" : 80,
            "posY" : 375,
            "width" : 20,
            "height" : 20,
            "alignment" : "left.center",
            "action" :
            {
                "type" : "openGui",
                "gui" : "languages"
            }
        },
       
        "refresh":
        {
            "text" : "",
            "posX" : 105,
            "posY" : 375,
            "width" : 20,
            "height" : 20,
            "texture" : "custommainmenu:textures/gui/buttons.png",
            "alignment" : "left.center",
            "action" :
            {
                "type" : "refresh"
            }
        }
    },
   
    "labels":
    {
        "mojang":
        {
            "text" : "Copyright to HvPanda, SentinelCraft",
            "hoverText" : "Copyright Mojang AB. Do not distribute!",
            "posX" : -197,
            "posY" : -10,
            "color" : -1,
            "alignment" : "bottom_right",
            "action" :
            {
                "type" : "openGui",
                "gui" : "credits"
            }
        },
       
        "fml":
        {
            "text" : "",
            "posX" : 2,
            "posY" : -40,
            "color" : -1,
            "alignment" : "bottom_left"
        }
    },
   
    "other":
    {
        "splash-text":
        {
            "posX" : 120,
            "posY" : 20,
            "color" : -256,
            "alignment" : "center",
            "texts" : "file:minecraft:texts/splashes.txt"
        },
       
        "panorama":
        {
            "images" : "minecraft:textures/gui/title/background/panorama_%c.png",
            "animate" : true,
            "animationSpeed" : 1,
            "blur" : true,
            "gradient" : true
        }

    }
}

(https://s22.postimg.cc/gu8ovvklp/Screen_Shot_2018-07-23_at_12.59.44.png) (https://postimg.cc/image/gu8ovvklp/)



More info about it at: https://minecraft.curseforge.com/projects/custom-main-menu (https://minecraft.curseforge.com/projects/custom-main-menu)
Title: Re: CMM - Custom Main Menu
Post by: Roby2 on July 23, 2018, 12:49:57 PM
Looks really good Panda! Mad respect for the coding!
Title: Re: CMM - Custom Main Menu
Post by: Quievi on July 24, 2018, 08:57:20 AM
This looks amazing! But I am really bad at coding do I make a new file and put that in or do I put those codes in an existing file?
Title: Re: CMM - Custom Main Menu
Post by: HvPanda on July 24, 2018, 12:12:41 PM
You get a file with the standart menu. then its just changing the numbers and copy pasting XD OMGcraft helped me a little.

How to Make Your Own Custom Minecraft Menu
https://youtu.be/MnJw_VjUhuU (https://youtu.be/MnJw_VjUhuU)
Title: Re: CMM - Custom Main Menu
Post by: Toxic_Demon93 on July 29, 2018, 04:11:50 PM
Okay so i took the base of what HvPanda did, and edited it slightly to make my own. Heres what i came up with:
(https://s33.postimg.cc/m598yzjnz/javaw_2018-07-29_10-29-56.png)
Code: [Select]
{
    "images":
    {
        "title":
        {
            "image" : "custommainmenu:textures/gui/minecraft.png",
            "posX" : -50,
            "posY" : -20,
            "width" : 0,
            "height" : 0,
            "alignment" : "center"
        },
        "Sentinelcraft logo":
        {
            "image" : "web:http://www.sentinelcraft.net/images/global/sentinel_craft_logo.png",
            "posX" : -100,
            "posY" : 0,
            "width" : 216,
            "height" : 83,
            "alignment" : "top_center"
        },
        "Black":
        {
            "image" : "web:https://www.tasting-sicily.com/wp-content/uploads/2016/04/black-transparent-layer.png",
            "posX" : 60,
            "posY" : -300,
            "width" : 130,
            "height" : 2000,
            "alignment" : "left.center"
        },
        "Logo corner":
        {
            "image" : "web:http://sentinelcraft.net/resources/images/sentinelcraft_web_home_logo.png",
            "posX" : 90,
            "posY" : 0,
            "width" : 70,
            "height" : 90,
            "alignment" : "left.center"
        }
 
    },
   
    "buttons":
    {
        "singleplayer":
        {
            "text" : "menu.singleplayer",
            "posX" : 80,
            "posY" : 175,
            "width" : 90,
            "height" : 20,
            "alignment" : "left.center",
            "action" :
            {
                "type" : "openGui",
                "gui" : "singleplayer"
            }
        },
       
        "multiplayer":
        {
            "text" : "menu.multiplayer",
            "posX" : 80,
            "posY" : 200,
            "width" : 90,
            "height" : 20,
            "alignment" : "left.center",
            "action" :
            {
                "type" : "openGui",
                "gui" : "multiplayer"
            }
        },
       

        "SentinelCraft":
        {
            "text" : "SentinelCraft",
            "posX" : 80,
            "posY" : 225,
            "width" : 90,
            "height" : 20,
            "alignment" : "left.center",
            "action" :
            {
                "type" : "connectToServer",
                "ip" : "play.sentinelcraft.net"
            }
        },
        "Vote":
        {
            "text" : "Vote",
            "posX" : 80,
            "posY" : 250,
            "width" : 90,
            "height" : 20,
            "alignment" : "left.center",
            "action" :
            {
                "type" : "openLink",
                "link" : "http://sentinelcraft.net/vote.php"
            }
        },
        "Dynmap":
        {
            "text" : "Dynmap",
            "posX" : 80,
            "posY" : 275,
            "width" : 90,
            "height" : 20,
            "alignment" : "left.center",
            "action" :
            {
                "type" : "openLink",
                "link" : "http://play.sentinelcraft.net:8123/?worldname=Horizon&mapname=flat&zoom=4&x=1900&y=64&z=914"
            }
        },
        "mods":
        {
            "text" : "fml.menu.mods",
            "posX" : 80,
            "posY" : 400,
            "width" : 90,
            "height" : 20,
            "alignment" : "left.center",
            "action" :
            {
                "type" : "openGui",
                "gui" : "mods"
            }
        },
           
        "options":
        {
            "text" : "menu.options",
            "posX" : 80,
            "posY" : 424,
            "width" : 90,
            "height" : 20,
            "alignment" : "left.center",
            "action" :
            {
                "type" : "opengui",
                "gui" : "options"
            }
        },
       
        "quit":
        {
            "text" : "menu.quit",
            "posX" : 80,
            "posY" : 450,
            "width" : 90,
            "height" : 20,
            "alignment" : "left.center",
            "action" :
            {
                "type" : "quit"
            }
        },
       
        "language":
        {
            "text" : "",
            "posX" : 80,
            "posY" : 375,
            "width" : 20,
            "height" : 20,
            "alignment" : "left.center",
            "action" :
            {
                "type" : "openGui",
                "gui" : "languages"
            }
        },
       
        "refresh":
        {
            "text" : "",
            "posX" : 80,
            "posY" : 300,
            "width" : 90,
            "height" : 20,
            "texture" : "custommainmenu:textures/gui/buttons.png",
            "alignment" : "left.center",
            "action" :
            {
                "type" : "refresh"
            }
        }
    },
   
    "labels":
    {
        "mojang":
        {
            "text" : "Copyright to Toxic_Demon93, SentinelCraft",
            "hoverText" : "Copyright Mojang AB. Do not distribute!",
            "posX" : -222,
            "posY" : -10,
            "color" : -1,
            "alignment" : "bottom_right",
            "action" :
            {
                "type" : "openGui",
                "gui" : "credits"
            }
        },
       
        "fml":
        {
            "text" : "",
            "posX" : 2,
            "posY" : -40,
            "color" : -1,
            "alignment" : "bottom_left"
        }
    },
   
    "other":
    {
        "splash-text":
        {
            "posX" : 120,
            "posY" : -75,
            "color" : -256,
            "alignment" : "center",
            "texts" : "file:minecraft:texts/splashes.txt"
        },
       
        "panorama":
        {
            "images" : "minecraft:textures/gui/title/background/panorama_%c.png",
            "animate" : true,
            "animationSpeed" : 1,
            "blur" : true,
            "gradient" : true
        }

    }
}
Title: Re: CMM - Custom Main Menu
Post by: HvPanda on July 29, 2018, 04:15:26 PM
Nice I like the new position of the logo.  <3 <3 <3