using UnityEngine;
using System.Collections;
public class StartButton : MonoBehaviour
{
	public GameObject masterObject;
	public Texture menuArrowTexture;
	private bool isCursorActive = false;
	public void OnMouseDown ()
	{
		triggerClickAction();
	}
	public void triggerClickAction ()
	{
		Application.LoadLevel("main");
	}
	public void OnMouseEnter ()
	{
		isCursorActive = true;
		MainMenu mm = masterObject.GetComponent<MainMenu>();
		mm.setMainMenuSelection(MainMenu.MainMenuSelection.Start);
		// Sfx?
	}
	public void OnMouseExit ()
	{
		isCursorActive = false;
		// Sfx?
	}
	public void OnGUI ()
	{
		if (isCursorActive)
		{
			GUI.matrix = Matrix4x4.TRS(new Vector3(0.0f, 0.0f, 0.0f), Quaternion.identity, new Vector3(1.0f, 1.0f, 1.0f));
			GUI.DrawTexture(new Rect(Screen.width / 2.0f - 128.0f, Screen.height / 2.0f - 26.0f, 64.0f, 64.0f), menuArrowTexture, ScaleMode.StretchToFill, true, 0.0f);
		}
	}
}