Exemplo n.º 1
0
        void DrawPaneTabs()
        {
            if (DebugHardlightEditor)
            {
                NSEditorStyles.DrawLabel("Active Tab:" + (ActiveTab == null ? "Null Active Tab" : ActiveTab.GetType().ToString()));
            }

            //Draw horizontal row(s) of tab buttons.
            GUILayout.BeginHorizontal();
            if (HardlightPanes != null && HardlightPanes.Count > 0)
            {
                for (int i = 0; i < HardlightPanes.Count; i++)
                {
                    if (HardlightPanes[i] != null)
                    {
                        //if (HardlightPanes[i].Visible)
                        //{
                        bool Result = HardlightPanes[i].DrawTabButton(HardlightPanes[i].ShouldDisplay);

                        //Controls showing only one at a time.
                        if (Result)
                        {
                            SetActiveTab(HardlightPanes[i]);
                        }
                        //}
                    }
                    //NSEditorStyles.OperationToolbarButton(false, new GUIContent("ShortPaneTitle"));
                    //NSEditorStyles.OperationToolbarButton(false, new GUIContent("ShortPaneTitle"));
                }
            }
            GUILayout.EndHorizontal();
        }
Exemplo n.º 2
0
        public virtual void DrawPaneContent()
        {
            IsTutorialStep(2, () =>
            {
                NSEditorStyles.DrawLabel("A tutorial's content can even jump around and be out of order with the code order!");
            });


            NSEditorStyles.DrawLabel("This is text");


            IsTutorialStep(0, () =>
            {
                NSEditorStyles.DrawLabel("Welcome to a tutorial");
            });
            IsTutorialStep(1, () =>
            {
                NSEditorStyles.DrawLabel("A tutorial can contain much content");
            });
            IsTutorialStep(2, () =>
            {
                GUILayout.Space(20);
                NSEditorStyles.DrawLabel("Divided up amongst multiple entries.");
            });


            IsTutorialStep(3, () =>
            {
                NSEditorStyles.DrawLabel("Isn't that cool!");
            });

            NSEditorStyles.DrawLabel("This is ending text");
        }
Exemplo n.º 3
0
        /// <summary>
        /// Draws the actual tutorial box content.
        /// Does not check if it should or shouldn't display. Call IsTutorialStep instead.
        /// </summary>
        /// <param name="StepDelegate">The content to execute when this tutorial box is displayed</param>
        /// <param name="tutorialStepNumber">-1 will not show step number information</param>
        public void TutorialStepBox(TutorialStepDelegate StepDelegate, int tutorialStepNumber = -1, ColorBoxType boxType = ColorBoxType.Tutorial)
        {
            EditorGUILayout.BeginVertical("Box");
            EditorGUILayout.BeginVertical(NSEditorStyles.GetColoredHelpBoxStyle(boxType));
            StepDelegate();
            if (tutorialStepNumber != -1)
            {
                EditorGUILayout.BeginHorizontal();
                NSEditorStyles.DrawLabel("[" + tutorialStepNumber + "]");
                EditorGUILayout.EndHorizontal();
            }

            EditorGUILayout.EndVertical();
            EditorGUILayout.EndVertical();
        }
Exemplo n.º 4
0
        private void DrawTutorialButtons()
        {
            //GUILayout.Space(4);
            NSEditorStyles.DrawTitle("Tutorial", 0);
            NSEditorStyles.OpenHorizontal();

            //Draw a back button
            if (NSEditorStyles.TutorialToolbarButton(CurrentTutorialIndex <= 0, "Previous"))
            {
                //Decrement the current tutorial index
                CurrentTutorialIndex--;
            }

            //Draw a restart button
            if (NSEditorStyles.TutorialToolbarButton(CurrentTutorialIndex <= 0, "Restart"))
            {
                //Set the tutorial index back to 0.
                CurrentTutorialIndex = 0;
            }

            if (CurrentTutorialIndex > LargestTutorialIndex - 1)
            {
                //Draw a finish button
                if (NSEditorStyles.TutorialToolbarButton(false, "Finish!"))
                {
                    //Increment the current tutorial index
                    TutorialModeActive = false;
                }
            }
            else
            {
                //Draw a next button
                if (NSEditorStyles.TutorialToolbarButton(CurrentTutorialIndex > LargestTutorialIndex - 1, "Next"))
                {
                    //OutputMessage("Next button hit", MessageType.Info);
                    //Increment the current tutorial index
                    CurrentTutorialIndex++;
                }
            }

            NSEditorStyles.DrawLabel("Current Index: " + CurrentTutorialIndex);
            NSEditorStyles.CloseHorizontal();
            GUILayout.Space(2);
        }