private void DrawBaseGUI() { GUILayout.BeginArea(new Rect(screenMargin, screenMargin, leftPanelWidth, Screen.height - screenMargin)); GUILayout.BeginVertical(); GUILayout.Box(Logo, GUIStyle.none, GUILayout.Width(200), GUILayout.Height(200)); if(GUILayout.Button("Online")) { GuiState = GUI_STATE.UI_STATE_ONLINE; } if(GUILayout.Button("Offline")) { //GuiState = GUI_STATE.UI_STATE_OFFLINE; Application.LoadLevel("level_testing"); } if(GUILayout.Button("Options")) { GuiState = GUI_STATE.UI_STATE_OPTIONS; } if(GUILayout.Button("Credits")) { GuiState = GUI_STATE.UI_STATE_CREDITS; } if(GUILayout.Button("Quit to desktop")) { GuiState = GUI_STATE.UI_STATE_QUIT; } GUILayout.EndVertical(); GUILayout.EndArea(); }
private void DrawBaseGUI() { GUILayout.BeginArea(new Rect(screenMargin, screenMargin, leftPanelWidth, Screen.height - screenMargin)); GUILayout.BeginVertical(); GUILayout.Box(Logo, GUIStyle.none, GUILayout.Width(300), GUILayout.Height(300)); if (GUILayout.Button(new GUIContent("Online", "b"))) { GuiState = GUI_STATE.UI_STATE_ONLINE; PlayMousePress(); } if (GUILayout.Button(new GUIContent("Offline", "b"))) { PlayMousePress(); //GuiState = GUI_STATE.UI_STATE_OFFLINE; Application.LoadLevel("level_testing"); } if (GUILayout.Button(new GUIContent("Options", "b"))) { GuiState = GUI_STATE.UI_STATE_OPTIONS; PlayMousePress(); } if (GUILayout.Button(new GUIContent("Credits", "b"))) { GuiState = GUI_STATE.UI_STATE_CREDITS; PlayMousePress(); } if (GUILayout.Button(new GUIContent("Quit to desktop", "b"))) { GuiState = GUI_STATE.UI_STATE_QUIT; PlayMousePress(); } GUILayout.EndVertical(); GUILayout.EndArea(); }
private void DrawQuitGameConfirationGUI() { int boxWidth = 400; int boxHeight = 200; GUILayout.BeginArea(new Rect(Screen.width / 2 - boxWidth / 2, Screen.height / 2 - boxHeight / 2, boxWidth, boxHeight)); GUILayout.Label("Really quit?"); GUILayout.BeginHorizontal(); if (GUILayout.Button("Yes")) { Application.Quit(); } if (GUILayout.Button("No")) { GuiState = GUI_STATE.UI_STATE_DEFAULT; } GUILayout.EndHorizontal(); GUILayout.EndArea(); }
private void DrawQuitGameConfirationGUI() { int boxWidth = 400; int boxHeight = 200; GUILayout.BeginArea(new Rect(Screen.width / 2 - boxWidth / 2, Screen.height / 2 - boxHeight / 2, boxWidth, boxHeight)); GUILayout.Label("Really quit?"); GUILayout.BeginHorizontal(); if(GUILayout.Button("Yes")) { Application.Quit(); } if(GUILayout.Button("No")) { GuiState = GUI_STATE.UI_STATE_DEFAULT; } GUILayout.EndHorizontal(); GUILayout.EndArea(); }