TuxedoBerries.ScenePanel.Drawers.ScreenshotDrawer.DrawFull C# (CSharp) Method

DrawFull() public method

Draws the configuration, controls and previews for a screenshot using the last screenshot taken.
public DrawFull ( ) : void
return void
        public void DrawFull()
        {
            bool refresh = false;
            bool deleteAll = false;
            EditorGUILayout.BeginVertical ();
            {
                DrawConfiguration ();
                EditorGUILayout.Space ();
                var givenName = string.Format ("screenshot_{0:000}.png", _history.Count);
                var givenPath = string.Format ("Screenshots/{0}",givenName);
                EditorGUILayout.LabelField (string.Format("Current Screenshot: {0}", givenPath));
                EditorGUILayout.BeginHorizontal ();
                {
                    EditorGUILayout.BeginVertical (_column1);
                    {
                        // Take Snapshot
                        DrawTakeScreenshotButton(givenPath, true, "Screenshots", givenName);

                        // Refresh
                        DrawRefreshScreenshotButton (_history.Current);

                        // Open
                        DrawOpenFolderButton(_history.Current);
                    }
                    EditorGUILayout.EndVertical ();

                    EditorGUILayout.BeginVertical (_column1);
                    {
                        DrawPreview (_history.Current);
                    }
                    EditorGUILayout.EndVertical ();

                    var exist = GetTexture (givenPath, false);
                    if(exist != null)
                        _history.Push (givenPath);
                }
                EditorGUILayout.EndHorizontal ();

                // History
                EditorGUILayout.LabelField (string.Format("Screenshots Taken: {0}", _history.Count));
                EditorGUILayout.BeginHorizontal ();
                {
                    if (GUILayout.Button ("Refresh")) {
                        refresh = true;
                    }
                    if (GUILayout.Button ("Delete All")) {
                        deleteAll = true;
                    }
                }
                EditorGUILayout.EndHorizontal ();

                _scrolls.DrawScrollable ("Saved Screenshots", DrawScreenshots);
            }
            EditorGUILayout.EndVertical ();

            if (refresh)
                RefreshScreenshots ();
            if (deleteAll)
                DeleteAllGeneralScreenshots ();
        }