public static void Init() { NewGameWizardWindow window = (NewGameWizardWindow)EditorWindow.GetWindow(typeof(NewGameWizardWindow)); window.GetReferences(); window.title = "New Game Wizard"; window.position = new Rect(300, 200, 350, 300); }
public static void Init() { NewGameWizardWindow window = EditorWindow.GetWindowWithRect <NewGameWizardWindow> (new Rect(0, 0, 420, 360), true, "New Game Wizard", true); window.GetReferences(); UnityVersionHandler.SetWindowTitle(window, "New Game wizard"); window.position = new Rect(300, 200, 420, 360); }
public static void Init() { NewGameWizardWindow window = (NewGameWizardWindow)EditorWindow.GetWindow(typeof(NewGameWizardWindow)); window.GetReferences(); UnityVersionHandler.SetWindowTitle(window, "New Game wizard"); window.position = new Rect(300, 200, 350, 300); }
public static void Init() { NewGameWizardWindow window = EditorWindow.GetWindowWithRect <NewGameWizardWindow> (new Rect(0, 0, 420, 360), true, "New Game Wizard", true); window.GetReferences(); window.titleContent.text = "New Game wizard"; window.position = new Rect(300, 200, 420, 360); }
private void OnGUI() { GUILayout.BeginVertical(CustomStyles.thinBox, GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true)); GUILayout.Label(GetTitle(), CustomStyles.managerHeader); if (GetTitle() != "") { EditorGUILayout.Separator(); GUILayout.Space(10f); } ShowPage(); GUILayout.Space(15f); GUILayout.BeginHorizontal(); if (pageNumber < 1) { if (pageNumber < 0) { pageNumber = 0; } GUI.enabled = false; } if (pageNumber < numPages) { if (GUILayout.Button("Previous", EditorStyles.miniButtonLeft)) { pageNumber--; } } else { if (GUILayout.Button("Restart", EditorStyles.miniButtonLeft)) { pageNumber = 0; gameName = ""; } } GUI.enabled = true; if (pageNumber < numPages - 1) { if (pageNumber == 1 && gameName == "") { GUI.enabled = false; } if (GUILayout.Button("Next", EditorStyles.miniButtonRight)) { pageNumber++; if (pageNumber == numPages - 1) { Process(); } } GUI.enabled = true; } else { if (pageNumber == numPages) { if (GUILayout.Button("Close", EditorStyles.miniButtonRight)) { NewGameWizardWindow window = (NewGameWizardWindow)EditorWindow.GetWindow(typeof(NewGameWizardWindow)); pageNumber = 0; window.Close(); } } else { if (GUILayout.Button("Finish", EditorStyles.miniButtonRight)) { pageNumber++; Finish(); } } } GUILayout.EndHorizontal(); GUI.Label(pageRect, "Page " + (pageNumber + 1) + " of " + (numPages + 1)); GUILayout.FlexibleSpace(); EditorGUILayout.EndVertical(); }
private void OnGUI() { GUILayout.Label(GetTitle(), EditorStyles.largeLabel); if (GetTitle() != "") { EditorGUILayout.Separator(); GUILayout.Space(10f); } ShowPage(); GUILayout.Space(15f); GUILayout.BeginHorizontal(); if (pageNumber < 1) { if (pageNumber < 0) { pageNumber = 0; } GUI.enabled = false; } if (pageNumber < numPages) { if (GUILayout.Button("Previous", EditorStyles.miniButtonLeft)) { pageNumber--; } } else { if (GUILayout.Button("Restart", EditorStyles.miniButtonLeft)) { pageNumber = 0; gameName = ""; } } GUI.enabled = true; if (pageNumber < numPages - 1) { if (pageNumber == 1 && gameName == "") { GUI.enabled = false; } if (GUILayout.Button("Next", EditorStyles.miniButtonRight)) { pageNumber++; if (pageNumber == numPages - 1) { Process(); } } GUI.enabled = true; } else { /*if (pageNumber == numPages) * { * GUI.enabled = false; * } * if (GUILayout.Button ("Finish", EditorStyles.miniButtonRight)) * { * pageNumber ++; * Finish (); * } * GUI.enabled = true;*/ if (pageNumber == numPages) { if (GUILayout.Button("Close", EditorStyles.miniButtonRight)) { NewGameWizardWindow window = (NewGameWizardWindow)EditorWindow.GetWindow(typeof(NewGameWizardWindow)); pageNumber = 0; window.Close(); } } else { if (GUILayout.Button("Finish", EditorStyles.miniButtonRight)) { pageNumber++; Finish(); } } } GUILayout.EndHorizontal(); GUILayout.Label("Page " + (pageNumber + 1) + " of " + (numPages + 1)); }
private void OnGUI() { GUILayout.BeginVertical(CustomStyles.thinBox, GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true)); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); GUILayout.BeginVertical(); GUILayout.Space(20f); if (Resource.ACLogo) { GUI.DrawTexture(new Rect(80, 25, 256, 128), Resource.ACLogo); GUILayout.Space(132f); } else { GUILayout.Label("Adventure Creator", CustomStyles.managerHeader); } GUILayout.Label("By Chris Burton, ICEBOX Studios", CustomStyles.managerHeader); if (GUILayout.Button("www.adventurecreator.org", CustomStyles.linkCentre)) { Application.OpenURL(Resource.websiteLink); } GUILayout.Label("<b>v" + AdventureCreator.version + "</b>", CustomStyles.smallCentre); GUILayout.Space(12f); GUI.enabled = !UpdateChecker.IsChecking(); if (GUILayout.Button("Check for updates")) { UpdateChecker.CheckForUpdate(); } GUI.enabled = true; if (GUILayout.Button("Documentation")) { Application.OpenURL(Resource.manualLink); } if (GUILayout.Button("Tutorials")) { Application.OpenURL(Resource.tutorialsLink); } /*if (GUILayout.Button ("Asset Store page")) * { * Application.OpenURL (Resource.assetLink); * }*/ if (!ACInstaller.IsInstalled()) { if (GUILayout.Button("Auto-configure Unity project settings")) { ACInstaller.DoInstall(); } } else { if (GUILayout.Button("New Game Wizard")) { this.Close(); NewGameWizardWindow.Init(); } } GUILayout.EndVertical(); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.EndVertical(); }
private void OnGUI() { GUILayout.BeginVertical(CustomStyles.thinBox, GUILayout.ExpandWidth(true), GUILayout.ExpandHeight(true)); GUILayout.BeginHorizontal(); GUILayout.FlexibleSpace(); GUILayout.BeginVertical(); GUILayout.Space(20f); if (Resource.ACLogo) { GUILayout.Label(Resource.ACLogo); } else { GUILayout.Label("Adventure Creator", CustomStyles.managerHeader); } GUILayout.Label("By Chris Burton, ICEBOX Studios", CustomStyles.managerHeader); GUILayout.Label("<b>" + AdventureCreator.version + "</b>", CustomStyles.smallCentre); GUILayout.Space(12f); if (GUILayout.Button("Documentation")) { Application.OpenURL(Resource.manualLink); } if (GUILayout.Button("Website")) { Application.OpenURL(Resource.websiteLink); } if (GUILayout.Button("Asset Store page")) { Application.OpenURL(Resource.assetLink); } if (!ACInstaller.IsInstalled()) { if (GUILayout.Button("Auto-configure Unity project settings")) { ACInstaller.DoInstall(); } } else { if (GUILayout.Button("New Game Wizard")) { NewGameWizardWindow.Init(); } } GUILayout.EndVertical(); GUILayout.FlexibleSpace(); GUILayout.EndHorizontal(); GUILayout.EndVertical(); }