public void DrawBackButton(CerberusWindow window)
        {
            if (GUI.Button(new Rect(50, Screen.height - 60, 100, 30), CerberusTexts.BackButton))
            {
                if (cerberusStructureLogic.QuestionScreenID == 0)
                {
                    window.CerberusWindowState = CerberusWindowState.Organize;

                    cerberusStructureLogic.DirectoryPath = string.Empty;
                    directoryPathContentSize             = Vector2.zero;
                    directoryPathContentHeight           = 0;
                    cerberusStructureLogic.Clear();
                }
                else if (cerberusStructureLogic.QuestionScreenID == 4 && !cerberusStructureLogic.IsUserUsingEditorScripts)
                {
                    cerberusStructureLogic.QuestionScreenID -= 2;
                    cerberusStructureLogic.AddFilesFromGivenStepToAvailableFiles(cerberusStructureLogic.QuestionScreenID);
                }
                else
                {
                    cerberusStructureLogic.QuestionScreenID--;
                    cerberusStructureLogic.AddFilesFromGivenStepToAvailableFiles(cerberusStructureLogic.QuestionScreenID);
                }
            }
        }
Exemplo n.º 2
0
 public override void OnGUI(CerberusWindow window)
 {
     SetWindowTitle(window, CerberusTexts.CerberusWindowTitle);
     ShowLogo(windowIcon);
     DrawAndPositionToolHeader(cerberusStyles);
     ShowMainMenuButtons(window, CerberusWindowState.Clean, CerberusWindowState.Organize);
 }
 public void DrawBackButton(CerberusWindow window)
 {
     if (GUI.Button(new Rect(50, Screen.height - 60, 100, 30), CerberusTexts.BackButton))
     {
         window.CerberusWindowState = CerberusWindowState.Main;
     }
 }
 public void DrawStructureButton(CerberusWindow window)
 {
     if (GUI.Button(new Rect(Screen.width - 270, 170, 120, 30), CerberusTexts.ProjectStructureTitleWindow))
     {
         window.CerberusWindowState = CerberusWindowState.Structure;
     }
 }
 public void DrawCompressionButton(CerberusWindow window)
 {
     if (GUI.Button(new Rect(150, 170, 120, 30), CerberusTexts.FileCompressionTitleWindow))
     {
         window.CerberusWindowState = CerberusWindowState.Compression;
     }
 }
        public override void OnGUI(CerberusWindow window)
        {
            SetWindowTitle(window, CerberusTexts.StructureWindowTitle);
            ShowLogo(windowIcon);

            DrawBackButton(window);

            HandleQuestions(window);
        }
Exemplo n.º 7
0
 private void DrawButton(CerberusWindow window, CerberusWindowState buttonState)
 {
     GUILayout.BeginVertical();
     if (GUILayout.Button(buttonState.ToString(), GUILayout.Width(100), GUILayout.Height(50)))
     {
         window.CerberusWindowState = buttonState;
     }
     GUILayout.EndVertical();
 }
Exemplo n.º 8
0
        private void ShowMainMenuButtons(CerberusWindow window, CerberusWindowState firstButtonState, CerberusWindowState secondButtonState)
        {
            GUILayout.BeginHorizontal();
            GUILayout.Space(255);

            DrawButton(window, firstButtonState);
            DrawButton(window, secondButtonState);

            GUILayout.EndHorizontal();
        }
        public override void OnGUI(CerberusWindow window)
        {
            SetWindowTitle(window, CerberusTexts.OrganizeWindowTitle);
            ShowLogo(windowIcon);

            DrawAndPositionOrganizeHeader();
            DrawCompressionButton(window);
            DrawStructureButton(window);
            DrawBackButton(window);
        }
Exemplo n.º 10
0
 public void DrawBackButton(CerberusWindow window)
 {
     if (GUI.Button(new Rect(50, Screen.height - 60, 100, 30), CerberusTexts.BackButton))
     {
         window.CerberusWindowState       = CerberusWindowState.Main;
         cerberusCleanLogic.DirectoryPath = string.Empty;
         directoryPathContentSize         = Vector2.zero;
         directoryPathContentSize.y       = 0;
         cerberusCleanLogic.Clear();
     }
 }
        public void DrawApplyButton(bool buttonEnabled, CerberusWindow window)
        {
            GUI.enabled = buttonEnabled;

            if (GUI.Button(new Rect(Screen.width - 200, Screen.height - 60, 150, 30), CerberusTexts.ApplyButton))
            {
                if (cerberusStructureLogic.ApplyButtonLogic())
                {
                    window.CerberusWindowState = CerberusWindowState.Main;
                }
            }

            GUI.enabled = true;
        }
Exemplo n.º 12
0
        public override void OnGUI(CerberusWindow window)
        {
            SetWindowTitle(window, CerberusTexts.CleanWindowTitle);
            ShowLogo(windowIcon);

            DisplayDirectoryPathLabelAndButton(cerberusCleanLogic);
            DrawScrollViewAndDisplayFileList();
            DrawBackButton(window);
            DrawSelectAllButton(cerberusCleanLogic);
            DrawDeselectAllButton(cerberusCleanLogic);
            DrawFoundAndChosenFilesLabels();
            DrawAndEnableApplyButton();
            DrawRemoveBinMoveButtons();

            if (cerberusCleanLogic.ShouldMove)
            {
                DrawShouldMoveDirectoryDialogButton();
            }
        }
        public override void OnGUI(CerberusWindow window)
        {
            SetWindowTitle(window, CerberusTexts.CompressionWindowTitle);
            ShowLogo(windowIcon);

            DisplayDirectoryPathLabelAndButton(cerberusCompressionLogic);
            DrawScrollViewAndDisplayFileList();
            DrawBackButton(window);
            DrawSelectAllButton(cerberusCompressionLogic);
            DrawDeselectAllButton(cerberusCompressionLogic);
            DrawFoundAndChosenFilesLabels();

            if (cerberusCompressionLogic.ShouldUseImageCompression)
            {
                GUI.enabled = cerberusCompressionLogic.IsImageWidthOrHeightCorrect();
            }

            DrawApplyButton();
        }
        private void HandleQuestions(CerberusWindow window)
        {
            bool enableButton = false;

            switch (cerberusStructureLogic.QuestionScreenID)
            {
            case 0:
            {
                enableButton = HandleSelectingDirectoryPath();
            }
            break;

            case 1:
            {
                enableButton = HandleIsUserUsingPlugins();
            }
            break;

            case 2:
            {
                enableButton = HandleIsUserUsingEditorScripts();
            }
            break;

            case 3:
            {
                enableButton = HandleIsUserLoadingAssetsFromEditorScripts();
            }
            break;

            case 4:
            {
                enableButton = HandleIsUserUsingStreamingAssets();
            }
            break;

            case 5:
            {
                enableButton = HandleIsUserUsingImportedStandardAssets();
            }
            break;

            case 6:
            {
                enableButton = HandleIsUserUsingResourcesAssets();
            }
            break;

            case 7:
            {
                enableButton = HandleIsUserUsingGizmosGraphics();
            }
            break;

            case 8:
            {
                enableButton = HandleFinalConfirmation();
            }
            break;
            }

            DrawApplyButton(enableButton, window);
        }
Exemplo n.º 15
0
        private static void ShowWindow()
        {
            CerberusWindow window = GetWindow <CerberusWindow>();

            window.Show();
        }
Exemplo n.º 16
0
 public void SetWindowTitle(CerberusWindow window, string windowName)
 {
     window.titleContent = new GUIContent(windowName, windowIcon);
 }
Exemplo n.º 17
0
 public virtual void OnGUI(CerberusWindow window)
 {
 }