/***Script exécuté lorsqu'on appuie sur la touche arrière de déplacement***/

if(UIocc == 1) // Affichage de l'Aide / UIocc = 1 signifie qu'on se trouve sur le menu de base de l'Aide
{
	if(touchespa == 0) // Variable touchespa détecte si on se trouve en haut ou en bas du menu pour empêcher de monter ou descendre trop
	{
		nbtrait++;
	}
	else // Dans le cas où on est au "max", renvoie un son d'erreur et rien ne se passe
	{
		sound.playSoundUI("sound.mainmenu_error");
	}
	if(nbtrait > 5) // Empêche de descendre plus bas que le 5eme choix
	{
		nbtrait--;
		sound.playSoundUI("sound.mainmenu_error");
		suite = false;
	}
	else
	{
		suite = true;
	}
	if(nbtrait == 2 && touchespa == 0)
	{
		if(suite)
		{
			sound.playSoundUI("sound.pausemenu_cursor");
		}
		taille = 225;
		place = place + 30;
		screen.clear();
		UIRect(0,0,1000,1000,0,0,0,0.7);
		UILabel("What is your problem ?", (w-s)/2, (h-s)/5);
		UILabel("I lost a unique item", (w-ui.getStringWidth("I lost a unique item"))/2, (h-s)/5+30);
		UILabel("I found a bug/glitch, where can I report it ?", (w-ui.getStringWidth("I found a bug/glitch, where can I report it ?"))/2, (h-s)/5+60);
		UILabel("I'm stuck in the game, where can I ask for help ?", (w-ui.getStringWidth("I'm stuck in the game, where can I ask for help ?"))/2, (h-s)/5+90);
		UILabel("I have a suggestion, where can I post it ?", (w-ui.getStringWidth("I have a suggestion, where can I post it ?"))/2, (h-s)/5+120);
		UILabel("I want to change an equipment shortcut", (w-ui.getStringWidth("I want to change an equipment shortcut"))/2, (h-s)/5+150);
		UILabel("Press 'H' to close", (w-ui.getStringWidth("Press 'H' to close"))/2, (h-s)/5+180);
		UIRect((w-taille)/2-1,(h-s)/5+place,taille,1,1,1,1,1);
	}
	else if(nbtrait == 3 && touchespa == 0)
	{
		if(suite)
		{
			sound.playSoundUI("sound.pausemenu_cursor");
		}
		taille =  260;
		place = place + 30;
		screen.clear();
		UIRect(0,0,1000,1000,0,0,0,0.7);
		UILabel("What is your problem ?", (w-s)/2, (h-s)/5);
		UILabel("I lost a unique item", (w-ui.getStringWidth("I lost a unique item"))/2, (h-s)/5+30);
		UILabel("I found a bug/glitch, where can I report it ?", (w-ui.getStringWidth("I found a bug/glitch, where can I report it ?"))/2, (h-s)/5+60);
		UILabel("I'm stuck in the game, where can I ask for help ?", (w-ui.getStringWidth("I'm stuck in the game, where can I ask for help ?"))/2, (h-s)/5+90);
		UILabel("I have a suggestion, where can I post it ?", (w-ui.getStringWidth("I have a suggestion, where can I post it ?"))/2, (h-s)/5+120);
		UILabel("I want to change an equipment shortcut", (w-ui.getStringWidth("I want to change an equipment shortcut"))/2, (h-s)/5+150);
		UILabel("Press 'H' to close", (w-ui.getStringWidth("Press 'H' to close"))/2, (h-s)/5+180);
		UIRect((w-taille)/2-1,(h-s)/5+place,taille,1,1,1,1,1);
	}
	else if(nbtrait == 4 && touchespa == 0)
	{
		if(suite)
		{
			sound.playSoundUI("sound.pausemenu_cursor");
		}
		place = place + 30;
		taille = 215;
		screen.clear();
		UIRect(0,0,1000,1000,0,0,0,0.7);
		UILabel("What is your problem ?", (w-s)/2, (h-s)/5);
		UILabel("I lost a unique item", (w-ui.getStringWidth("I lost a unique item"))/2, (h-s)/5+30);
		UILabel("I found a bug/glitch, where can I report it ?", (w-ui.getStringWidth("I found a bug/glitch, where can I report it ?"))/2, (h-s)/5+60);
		UILabel("I'm stuck in the game, where can I ask for help ?", (w-ui.getStringWidth("I'm stuck in the game, where can I ask for help ?"))/2, (h-s)/5+90);
		UILabel("I have a suggestion, where can I post it ?", (w-ui.getStringWidth("I have a suggestion, where can I post it ?"))/2, (h-s)/5+120);
		UILabel("I want to change an equipment shortcut", (w-ui.getStringWidth("I want to change an equipment shortcut"))/2, (h-s)/5+150);
		UILabel("Press 'H' to close", (w-ui.getStringWidth("Press 'H' to close"))/2, (h-s)/5+180);
		UIRect((w-taille)/2-1,(h-s)/5+place,taille,1,1,1,1,1);
	}
	else if(nbtrait == 5 && touchespa == 0)
	{
		if(suite)
		{
			sound.playSoundUI("sound.pausemenu_cursor");
		}
		if(taille != 200)
		{
			place = place + 30;
		}
		taille = 200;
		screen.clear();
		UIRect(0,0,1000,1000,0,0,0,0.7);
		UILabel("What is your problem ?", (w-s)/2, (h-s)/5);
		UILabel("I lost a unique item", (w-ui.getStringWidth("I lost a unique item"))/2, (h-s)/5+30);
		UILabel("I found a bug/glitch, where can I report it ?", (w-ui.getStringWidth("I found a bug/glitch, where can I report it ?"))/2, (h-s)/5+60);
		UILabel("I'm stuck in the game, where can I ask for help ?", (w-ui.getStringWidth("I'm stuck in the game, where can I ask for help ?"))/2, (h-s)/5+90);
		UILabel("I have a suggestion, where can I post it ?", (w-ui.getStringWidth("I have a suggestion, where can I post it ?"))/2, (h-s)/5+120);
		UILabel("I want to change an equipment shortcut", (w-ui.getStringWidth("I want to change an equipment shortcut"))/2, (h-s)/5+150);
		UILabel("Press 'H' to close", (w-ui.getStringWidth("Press 'H' to close"))/2, (h-s)/5+180);
		UIRect((w-taille)/2-1,(h-s)/5+place,taille,1,1,1,1,1);
	}
}

if(UIocc == 2) // Affichage de l'Aide / UIocc = 2 signifie qu'on a choisi l'option "I found a bug/glitch..."
{
	if(nbtrait == 2)
	{
		nbtrait2++;
		if(nbtrait2 > 3)
		{
			nbtrait2--;
			sound.playSoundUI("sound.mainmenu_error");
			suite = false;
		}
		else
		{
			suite = true;
		}
		if(nbtrait2 == 2)
		{
			if(suite)
			{
				sound.playSoundUI("sound.pausemenu_cursor");
			}
			screen.clear();
			UIRect(0,0,1000,1000,0,0,0,0.7);
			UILabel("If it is a bug/glitch about the game,", (w-ui.getStringWidth("If it is a bug/glitch about the game,"))/2, (h-s)/5+30);
			UILabel("you can report it in the topic of the map (following link).", (w-ui.getStringWidth("you can report it in the topic of the map (following link)."))/2, (h-s)/5+40);
			UILabel("Go to the topic of the map", (w-ui.getStringWidth("Go to the topic of the map"))/2, (h-s)/5+55);
			UILabel("If it is a bug/glitch about the mod,", (w-ui.getStringWidth("If it is a bug/glitch about the mod,"))/2, (h-s)/5+70);
			UILabel("you can report it in the topic of the mod (following link).", (w-ui.getStringWidth("you can report it in the topic of the mod (following link)."))/2, (h-s)/5+80);
			UILabel("Go to the topic of the mod", (w-ui.getStringWidth("Go to the topic of the mod"))/2, (h-s)/5+95);
			UILabel("Back", (w-ui.getStringWidth("Back"))/2, (h-s)/5+120);
			UIRect((w-130)/2-1,(h-s)/5+105,130,1,1,1,1,1);
		}
		else if(nbtrait2 == 3)
		{
			if(suite)
			{
				sound.playSoundUI("sound.pausemenu_cursor");
			}
			screen.clear();
			UIRect(0,0,1000,1000,0,0,0,0.7);
			UILabel("If it is a bug/glitch about the game,", (w-ui.getStringWidth("If it is a bug/glitch about the game,"))/2, (h-s)/5+30);
			UILabel("you can report it in the topic of the map (following link).", (w-ui.getStringWidth("you can report it in the topic of the map (following link)."))/2, (h-s)/5+40);
			UILabel("Go to the topic of the map", (w-ui.getStringWidth("Go to the topic of the map"))/2, (h-s)/5+55);
			UILabel("If it is a bug/glitch about the mod,", (w-ui.getStringWidth("If it is a bug/glitch about the mod,"))/2, (h-s)/5+70);
			UILabel("you can report it in the topic of the mod (following link).", (w-ui.getStringWidth("you can report it in the topic of the mod (following link)."))/2, (h-s)/5+80);
			UILabel("Go to the topic of the mod", (w-ui.getStringWidth("Go to the topic of the mod"))/2, (h-s)/5+95);
			UILabel("Back", (w-ui.getStringWidth("Back"))/2, (h-s)/5+120);
			UIRect((w-30)/2-1,(h-s)/5+130,30,1,1,1,1,1);
		}
	}
}

if(UIocc == 10) // Affichage de l'Aide / UIocc = 10 signifie qu'on se trouve sur le menu de l'Aide permettant de changer les touches d'équipement
{	
	if(nbtrait == 5)
	{
		nbtrait3++;
		if(nbtrait3 > 2)
		{
			nbtrait3--;
			sound.playSoundUI("sound.mainmenu_error");
			suite = false;
		}
		else
		{
			suite = true;
		}
		if(nbtrait3 == 2)
		{
			if(suite)
			{
				sound.playSoundUI("sound.pausemenu_cursor");
			}
			screen.clear();
			UIRect(0,0,1000,1000,0,0,0,0.7);
			UILabel("Which shortcut do you want to change ?", (w-ui.getStringWidth("Which shortcut do you want to change ?"))/2, (h-s)/5+10);
			UILabel("Iron Boots", (w-ui.getStringWidth("Iron Boots"))/2, (h-s)/5+40);
			UILabel("Back", (w-ui.getStringWidth("Back"))/2, (h-s)/5+70);
			UIRect((w-30)/2-1,(h-s)/5+80,30,1,1,1,1,1);
		}
	}
}