using UnityEngine;
using System.Collections;

public class DisplayHelp : MonoBehaviour
{
	bool displayHelp = true;
	float helpTime = 0.0f;
	
	void OnGUI()
	{
		if (Input.GetKeyDown(KeyCode.H) && !displayHelp)
		{
			displayHelp = true;
			helpTime = Time.time;
		}
		if (Input.GetKeyUp(KeyCode.H) && ((Time.time - 0.3f) > helpTime))
		{
			displayHelp = false;
		}
		
		if (displayHelp)
		{
			GUI.Label(new Rect(10, Screen.height - 228, 600, 202), 
				"Return\t\t\t\t\tNext Model (Left Shift for Previous)\n" +
				"Space\t\t\t\t\tNext Animation (Left Shift for Previous)\n" +
				"F1 .. F8\t\t\t\t\tDefault Cameras\n" +
				"WASD\t\t\t\t\tRotate Camera\n" +
				"+/-\t\t\t\t\t\tMove Camera forward/backward\n" +
				"PageUp/PageDn\tAlter camera target up/down\n" +
				"Backspace\t\t\tToggle view behind/in front\n" +
				"X\t\t\t\t\t\t\tToggle auto horizontal rotation (Left Shift for opposite direction)\n" +
				"Y\t\t\t\t\t\t\tToggle auto vertical rotation\n" +
				",\t\t\t\t\t\t\tRotate 45 degrees left\n" +
				".\t\t\t\t\t\t\tRotate 45 degrees right\n" +
				"0\t\t\t\t\t\t\tStop all rotation and set to view behind\n" +
				"F12\t\t\t\t\t\tReset to starting Camera\n");
		}
		GUI.Label(new Rect(10, Screen.height - 33, 600, 24), "H\t\t\t\t\t\t\tToggle Help\n");
	}
}
