using UnityEngine;
using System.Collections;
using UnityEngine.SceneManagement;

public class MenuSkrypt : MonoBehaviour {
	public Texture LogoGry;						// Wczytanie logo gry
	public float ButtonHeight = 60;
	public float ButtonWidth = 250;
	public GUISkin skin; 						// Skórka GUI - pozwala zmieniać wygląd buttonów w okienku UNITY
	public GUIStyle NonActiveButton;			// Zmienna pomocnicza - pozwala zmieniać wygląd GUISkin w okienku UNITY

	private float ButtonSpace = 30;				// Zmienna pomocnicza do oddzienia przycisków przerwą, żeby nie nachodziły na siebie

	void OnGUI()
	{
		GUI.skin = skin;						// Wykorzystanie skórki GUI
		GUI.DrawTexture(new Rect((Screen.width / 5 ) * 3, (Screen.height / 5 ), (Screen.width / 5 ) * 1, (Screen.height / 5 ) * 2), LogoGry);		// Aplikacja logo gry do projektu


		GUI.BeginGroup(new Rect (Screen.width / 8, Screen.height / 5, ButtonWidth * 4, (ButtonHeight + ButtonSpace) * 6));
		if (GUI.Button (new Rect (0, 0, ButtonWidth, ButtonHeight), "New Game", NonActiveButton)) {
			SceneManager.LoadScene ("1Level");
			//Application.LoadLevel ("1Level");
		}
		if (GUI.Button (new Rect (0, ButtonHeight + ButtonSpace, ButtonWidth, ButtonHeight), "Options", NonActiveButton)) {
		}
		if (GUI.Button (new Rect (0, (ButtonHeight + ButtonSpace) * 2, ButtonWidth, ButtonHeight), "Exit", NonActiveButton)) {
			Application.Quit ();
		}
		GUI.EndGroup ();
	}

	// Use this for initialization
	void Start () {
		/*ButtonWidth = (ButtonWidth * Screen.width) / 1920;
		ButtonHeight = (ButtonHeight * Screen.height) / 1080;
		ButtonSpace = (ButtonSpace * Screen.height) / 1080;*/
	}
	
	// Update is called once per frame
	void Update () {
	
	}
}
