Custom-Main-Menu icon indicating copy to clipboard operation
Custom-Main-Menu copied to clipboard

I can't get loadWorld to work

Open AGiLE-EaGLE1994 opened this issue 3 years ago • 0 comments

It doesn't produce an error, here's the config: { "images": { "loadmenubg": { "image": "custommainmenu:textures/gui/loadmenutex.png", "posX": 0, "posY": 0, "width": 108, "height": 110, "alignment": "top_left" }

},

"buttons": {

	"mainmenu": {
		"text": "mainmenu",
		"texture": "custommainmenu:textures/gui/transparent.png",
		"posX": 0,
		"posY": 85,
		"width": 3000,
		"height": 2000,
		"color": 0,
		"alignment": "upper_left",

		"action": {
			"type": "openGui",
			"gui": "mainmenu"
		}

	},

	"singleplayer": {
		"text": "PLAY POKEMON",
		"posX": 4,
		"posY": 5,
		"width": 100,
		"height": 20,
		"hoverTextColor": 0,
		"normalTextColor": 0,
		"texture": "custommainmenu:textures/gui/transparent.png",
		"alignment": "upper_left",

		"action": {
			"type": "openGui",
			"gui": "singleplayer"
		}

	},
	
	"loadWorld": {
		"text": "PLAY POKEMON",
		"posX": 160,
		"posY": 45,
		"width": 100,
		"height": 20,
		"hoverTextColor": 0,
		"normalTextColor": 0,
		"texture": "custommainmenu:textures/gui/transparent.png",
		"alignment": "upper_left",

		"action": {
			"type": "custom.loadWorld",
			"dirName": "saves",
			"saveName": "saves"				
		}

	},		

	"multiplayer": {
		"text": "MOBILE",
		"posX": 4,
		"posY": 25,
		"width": 100,
		"height": 20,
		"hoverTextColor": 0,
		"normalTextColor": 0,
		"texture": "custommainmenu:textures/gui/transparent.png",
		"alignment": "upper_left",

		"action": {
			"type": "openGui",
			"gui": "custom.namecardmenu"
		}

	},
	"mobile2": {
		"text": "MOBILE2",
		"posX": 150,
		"posY": 25,
		"width": 100,
		"height": 20,
		"hoverTextColor": 0,
		"normalTextColor": 0,
		"texture": "custommainmenu:textures/gui/transparent.png",
		"alignment": "upper_left",

		"action": {
			"type": "openGui",
			"gui": "multiplayer"
		}

	},

	"mods": {
		"text": "MOBILE DLC",
		"posX": 4,
		"posY": 45,
		"width": 100,
		"height": 20,
		"hoverTextColor": 0,
		"normalTextColor": 0,
		"texture": "custommainmenu:textures/gui/transparent.png",
		"alignment": "upper_left",

		"action": {
			"type": "openGui",
			"gui": "mods"
		}

	},

	"options": {
		"text": "OPTION",
		"posX": 4,
		"posY": 65,
		"width": 100,
		"height": 20,
		"hoverTextColor": 0,
		"normalTextColor": 0,
		"texture": "custommainmenu:textures/gui/transparent.png",
		"alignment": "upper_left",
		"action": {
			"type": "openGui",
			"gui": "options"
		}
	},

	"quit": {
		"text": "QUIT",
		"posX": 4,
		"posY": 85,
		"width": 100,
		"height": 20,
		"hoverTextColor": 0,
		"normalTextColor": 0,
		"texture": "custommainmenu:textures/gui/transparent.png",
		"alignment": "upper_left",
		"action": {
			"type": "quit"
		}
	},

	"language": {
		"text": " ",
		"posX": 0,
		"posY": 110,
		"width": 16,
		"height": 16,
		"alignment": "upper_left",
		"texture": "custommainmenu:textures/gui/language.png",
		"action": {
			"type": "openGui",
			"gui": "languages"
		}
	},

	"refresh": {
		"text": " ",
		"posX": 16,
		"posY": 110,
		"width": 16,
		"height": 16,
		"alignment": "upper_left",
		"texture": "custommainmenu:textures/gui/refresh.png",
		"action": {
			"type": "refresh"
		}
	}

},

"labels": {

	"fml": {
		"text": "",
		"posX": 2,
		"posY": -40,
		"color": -1,
		"alignment": "bottom_left"
	}
},

"other": {

	"background": {
		"image": "",
		"mode": "stretch",
		"width": 160,
		"height": 160,
		"slideshow": {
			"images": ["custommainmenu:textures/gui/loadmenubg.png"],
			"displayDuration": 2,
			"fadeDuration": 0
		}
	}
}

} I tried replacing "custom.loadWorld" with just "loadWorld", and I tried using the actual name of the world I want to load (Pokecube Spaceworld is its name) and it doesn't error when I tested it with a world named SWIsles, but clicking the button doesn't do anything.

AGiLE-EaGLE1994 avatar Oct 23 '21 17:10 AGiLE-EaGLE1994