public void OpenPanel(WindowPanel backButtonPanel, SlideDiretion dir = SlideDiretion.Left) { slideDirection = dir; SetState(false, true); backButtonPanel.slideDirection = dir; backButtonPanel.SetState(true, true); }
public void init() { minSize = maxSize = new Vector2(450, 500); #if UNITY_5_0 title = "Dreamteck Splines " + PluginInfo.version; #else titleContent = new GUIContent("Dreamteck Splines " + PluginInfo.version); #endif float x = position.x; if (x < 50) { x = 50; } else if (x > Screen.width - 500) { x = Screen.width - 500; } float y = position.y; if (y < 50) { x = 50; } else if (y > Screen.height - 550) { x = Screen.height - 550; } position = new Rect(x, y, 500, 550); changeLogPanel = new WindowPanel(); supportPanel = new WindowPanel(); homePanel = new WindowPanel(); learnPanel = new WindowPanel(); changeLogPanel.size = supportPanel.size = homePanel.size = learnPanel.size = new Vector2(maxSize.x, maxSize.y - 82); changeLogPanel.slideDuration = supportPanel.slideDuration = homePanel.slideDuration = learnPanel.slideDuration = 0.25f; homePanel.SetState(true, false); header = ImageDB.GetImage("plugin_header.png", "Splines/Editor/Icons"); changelogIcon = ImageDB.GetImage("changelog.png", "Splines/Editor/Icons"); learnIcon = ImageDB.GetImage("get_started.png", "Splines/Editor/Icons"); supportIcon = ImageDB.GetImage("support.png", "Splines/Editor/Icons"); rateIcon = ImageDB.GetImage("rate.png", "Splines/Editor/Icons"); pdfIcon = ImageDB.GetImage("pdf.png", "Splines/Editor/Icons"); videoIcon = ImageDB.GetImage("video_tutorials.png", "Splines/Editor/Icons"); string path = ResourceUtility.FindFolder(Application.dataPath, "Dreamteck/Splines/Editor"); if (Directory.Exists(path)) { if (File.Exists(path + "/changelog.txt")) { string[] lines = File.ReadAllLines(path + "/changelog.txt"); changelogText = ""; for (int i = 0; i < lines.Length; i++) { changelogText += lines[i] + "\r\n"; } } } windowInitialized = true; }
public void BackButton(WindowPanel backButtonPanel, SlideDiretion dir = SlideDiretion.Left) { if (GUILayout.Button("◄", GUILayout.Width(60), GUILayout.Height(35))) { slideDirection = dir; SetState(false, true); backButtonPanel.slideDirection = dir; backButtonPanel.SetState(true, true); } }
public void init() { minSize = maxSize = new Vector2(450, 500); #if UNITY_5_0 title = "Dreamteck Splines " + PluginInfo.version; #else titleContent = new GUIContent("Dreamteck Splines " + PluginInfo.version); #endif position = new Rect(Screen.width / 2f - 200, Screen.height / 2f - 200, 450, 500); changeLogPanel = new WindowPanel(); supportPanel = new WindowPanel(); homePanel = new WindowPanel(); learnPanel = new WindowPanel(); changeLogPanel.size = supportPanel.size = homePanel.size = learnPanel.size = new Vector2(maxSize.x, maxSize.y - 82); changeLogPanel.slideDuration = supportPanel.slideDuration = homePanel.slideDuration = learnPanel.slideDuration = 0.25f; homePanel.SetState(true, false); header = SplineEditorGUI.LoadTexture("plugin_header.png"); changelogIcon = SplineEditorGUI.LoadTexture("changelog.png"); learnIcon = SplineEditorGUI.LoadTexture("get_started.png"); supportIcon = SplineEditorGUI.LoadTexture("support.png"); rateIcon = SplineEditorGUI.LoadTexture("rate.png"); pdfIcon = SplineEditorGUI.LoadTexture("pdf.png"); videoIcon = SplineEditorGUI.LoadTexture("video_tutorials.png"); string path = Application.dataPath + "/Dreamteck/Splines/Editor/"; if (Directory.Exists(path)) { if (File.Exists(path + "changelog.txt")) { string[] lines = File.ReadAllLines(path + "changelog.txt"); changelogText = ""; for (int i = 0; i < lines.Length; i++) { changelogText += lines[i] + "\r\n"; } } } }