Custom-Main-Menu
Custom-Main-Menu copied to clipboard
Hi ! HI ! HIII ! How to make a button
No, I won't say Hi ! again ! Like the title say, I can't make a button ! How to make a button !
"buttonexample":
{
"text" : "Test.",
"hoverText" : "§nTest.",
"posX" : 36,
"posY" : 70,
"texture" : "test:btnexample.png",
"alignment" : "top_left",
"action" :
{
"type" : "openLink",
"link" : "www.example.com"
}
}
Don't forget if there's something after this add a comma after the last curly bracket Buttons have 2 states hover and nohover basically you can create a texture for it with 2 states with the width of 16 and height of 32, button states occupy a 16x16 or you can have no like hover animation and instead make the text/color (or both) change when hovered there's also actions like { "type" : "openGui", "gui" : "example2ndgui" } (You can create custom guis you need more json files if so { "type" : "connectToServer", "ip" : "play.skycade.net" } (example server btw it does actually exist tho) { "type" : "loadWorld", "dirName" : "John's favorite world", "saveName" : "blegh" (optional) } (random name for world) { "type" : "openFolder", "folderName" : "mods" (uses minecraft instance folder as root folder) } https://www.curseforge.com/minecraft/mc-mods/custom-main-menu/pages/custom-main-menu/actions https://pastebin.com/dJzLgnSL (List of open-able guis by default)
if your talking about the image being halfed, every button requires a hover image. all you need to do I reproduce the image in either the same or different format then place it directly below the current image. all will be in the same image. the top half is what appears as the normal image and the bottom half will only appear when they hover over the image.