public override void ShowGUI(List<ActionParameter> parameters)
        {
            changeType = (MenuChangeType) EditorGUILayout.EnumPopup ("Change type:", changeType);

            if (changeType == MenuChangeType.TurnOnMenu)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI ("Menu to turn on:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField ("Menu to turn on:", menuToChange);
                }
                doFade = EditorGUILayout.Toggle ("Fade?", doFade);
            }

            else if (changeType == MenuChangeType.TurnOffMenu)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI ("Menu to turn off:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField ("Menu to turn off:", menuToChange);
                }
                doFade = EditorGUILayout.Toggle ("Fade?", doFade);
            }

            else if (changeType == MenuChangeType.HideMenuElement)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI ("Menu containing element:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField ("Menu containing element:", menuToChange);
                }

                elementToChangeParameterID = Action.ChooseParameterGUI ("Element to hide:", parameters, elementToChangeParameterID, ParameterType.String);
                if (elementToChangeParameterID < 0)
                {
                    elementToChange = EditorGUILayout.TextField ("Element to hide:", elementToChange);
                }
            }

            else if (changeType == MenuChangeType.ShowMenuElement)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI ("Menu containing element:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField ("Menu containing element:", menuToChange);
                }

                elementToChangeParameterID = Action.ChooseParameterGUI ("Element to show:", parameters, elementToChangeParameterID, ParameterType.String);
                if (elementToChangeParameterID < 0)
                {
                    elementToChange = EditorGUILayout.TextField ("Element to show:", elementToChange);
                }
            }

            else if (changeType == MenuChangeType.LockMenu)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI ("Menu to lock:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField ("Menu to lock:", menuToChange);
                }
                doFade = EditorGUILayout.Toggle ("Fade?", doFade);
            }

            else if (changeType == MenuChangeType.UnlockMenu)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI ("Menu to unlock:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField ("Menu to unlock:", menuToChange);
                }
            }

            else if (changeType == MenuChangeType.AddJournalPage)
            {
                if (lineID > -1)
                {
                    EditorGUILayout.LabelField ("Speech Manager ID:", lineID.ToString ());
                }

                menuToChangeParameterID = Action.ChooseParameterGUI ("Menu containing element:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField ("Menu containing element:", menuToChange);
                }

                elementToChangeParameterID = Action.ChooseParameterGUI ("Journal element:", parameters, elementToChangeParameterID, ParameterType.String);
                if (elementToChangeParameterID < 0)
                {
                    elementToChange = EditorGUILayout.TextField ("Journal element:", elementToChange);
                }

                EditorGUILayout.LabelField ("New page text:");
                journalText = EditorGUILayout.TextArea (journalText);
                onlyAddNewJournal = EditorGUILayout.Toggle ("Only add if not already in?", onlyAddNewJournal);
                if (onlyAddNewJournal && lineID == -1)
                {
                    EditorGUILayout.HelpBox ("The page text must be added to the Speech Manager by clicking the 'Gather text' button, in order for duplicates to be prevented.", MessageType.Warning);
                }
            }

            if (doFade && (changeType == MenuChangeType.TurnOnMenu || changeType == MenuChangeType.TurnOffMenu || changeType == MenuChangeType.LockMenu))
            {
                willWait = EditorGUILayout.Toggle ("Wait until finish?", willWait);
            }

            AfterRunningOption ();
        }
Beispiel #2
0
        public override void ShowGUI(List<ActionParameter> parameters)
        {
            changeType = (MenuChangeType) EditorGUILayout.EnumPopup ("Change type:", changeType);

            if (changeType == MenuChangeType.TurnOnMenu)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI ("Menu to turn on:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField ("Menu to turn on:", menuToChange);
                }
                doFade = EditorGUILayout.Toggle ("Fade?", doFade);
            }

            else if (changeType == MenuChangeType.TurnOffMenu)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI ("Menu to turn off:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField ("Menu to turn off:", menuToChange);
                }
                doFade = EditorGUILayout.Toggle ("Fade?", doFade);
            }

            else if (changeType == MenuChangeType.HideMenuElement)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI ("Menu containing element:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField ("Menu containing element:", menuToChange);
                }

                elementToChangeParameterID = Action.ChooseParameterGUI ("Element to hide:", parameters, elementToChangeParameterID, ParameterType.String);
                if (elementToChangeParameterID < 0)
                {
                    elementToChange = EditorGUILayout.TextField ("Element to hide:", elementToChange);
                }
            }

            else if (changeType == MenuChangeType.ShowMenuElement)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI ("Menu containing element:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField ("Menu containing element:", menuToChange);
                }

                elementToChangeParameterID = Action.ChooseParameterGUI ("Element to show:", parameters, elementToChangeParameterID, ParameterType.String);
                if (elementToChangeParameterID < 0)
                {
                    elementToChange = EditorGUILayout.TextField ("Element to show:", elementToChange);
                }
            }

            else if (changeType == MenuChangeType.LockMenu)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI ("Menu to lock:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField ("Menu to lock:", menuToChange);
                }
                doFade = EditorGUILayout.Toggle ("Fade?", doFade);
            }

            else if (changeType == MenuChangeType.UnlockMenu)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI ("Menu to unlock:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField ("Menu to unlock:", menuToChange);
                }
            }

            else if (changeType == MenuChangeType.AddJournalPage)
            {
                if (lineID > -1)
                {
                    EditorGUILayout.LabelField ("Speech Manager ID:", lineID.ToString ());
                }

                menuToChangeParameterID = Action.ChooseParameterGUI ("Menu containing element:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField ("Menu containing element:", menuToChange);
                }

                elementToChangeParameterID = Action.ChooseParameterGUI ("Journal elementw:", parameters, elementToChangeParameterID, ParameterType.String);
                if (elementToChangeParameterID < 0)
                {
                    elementToChange = EditorGUILayout.TextField ("Journal element:", elementToChange);
                }

                EditorGUILayout.LabelField ("New page text:");
                journalText = EditorGUILayout.TextArea (journalText);
            }

            if (doFade && (changeType == MenuChangeType.TurnOnMenu || changeType == MenuChangeType.TurnOffMenu || changeType == MenuChangeType.LockMenu))
            {
                willWait = EditorGUILayout.Toggle ("Wait until finish?", willWait);
            }

            AfterRunningOption ();
        }
Beispiel #3
0
        override public void ShowGUI(List <ActionParameter> parameters)
        {
            changeType = (MenuChangeType)EditorGUILayout.EnumPopup("Change type:", changeType);

            if (changeType == MenuChangeType.TurnOnMenu)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI("Menu to turn on:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField("Menu to turn on:", menuToChange);
                }
                doFade = EditorGUILayout.Toggle("Fade?", doFade);
            }

            else if (changeType == MenuChangeType.TurnOffMenu)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI("Menu to turn off:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField("Menu to turn off:", menuToChange);
                }
                doFade = EditorGUILayout.Toggle("Fade?", doFade);
            }

            else if (changeType == MenuChangeType.HideMenuElement)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI("Menu containing element:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField("Menu containing element:", menuToChange);
                }

                elementToChangeParameterID = Action.ChooseParameterGUI("Element to hide:", parameters, elementToChangeParameterID, ParameterType.String);
                if (elementToChangeParameterID < 0)
                {
                    elementToChange = EditorGUILayout.TextField("Element to hide:", elementToChange);
                }
            }

            else if (changeType == MenuChangeType.ShowMenuElement)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI("Menu containing element:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField("Menu containing element:", menuToChange);
                }

                elementToChangeParameterID = Action.ChooseParameterGUI("Element to show:", parameters, elementToChangeParameterID, ParameterType.String);
                if (elementToChangeParameterID < 0)
                {
                    elementToChange = EditorGUILayout.TextField("Element to show:", elementToChange);
                }
            }

            else if (changeType == MenuChangeType.LockMenu)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI("Menu to lock:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField("Menu to lock:", menuToChange);
                }
                doFade = EditorGUILayout.Toggle("Fade?", doFade);
            }

            else if (changeType == MenuChangeType.UnlockMenu)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI("Menu to unlock:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField("Menu to unlock:", menuToChange);
                }
            }

            else if (changeType == MenuChangeType.AddJournalPage)
            {
                if (lineID > -1)
                {
                    EditorGUILayout.LabelField("Speech Manager ID:", lineID.ToString());
                }

                menuToChangeParameterID = Action.ChooseParameterGUI("Menu containing element:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField("Menu containing element:", menuToChange);
                }

                elementToChangeParameterID = Action.ChooseParameterGUI("Journal element:", parameters, elementToChangeParameterID, ParameterType.String);
                if (elementToChangeParameterID < 0)
                {
                    elementToChange = EditorGUILayout.TextField("Journal element:", elementToChange);
                }

                EditorGUILayout.LabelField("New page text:");
                journalText       = EditorGUILayout.TextArea(journalText);
                onlyAddNewJournal = EditorGUILayout.Toggle("Only add if not already in?", onlyAddNewJournal);
                if (onlyAddNewJournal && lineID == -1)
                {
                    EditorGUILayout.HelpBox("The page text must be added to the Speech Manager by clicking the 'Gather text' button, in order for duplicates to be prevented.", MessageType.Warning);
                }

                journalPageIndexParameterID = Action.ChooseParameterGUI("Index to insert into:", parameters, journalPageIndexParameterID, ParameterType.Integer);
                if (journalPageIndexParameterID < 0)
                {
                    journalPageIndex = EditorGUILayout.IntField("Index to insert into:", journalPageIndex);
                    EditorGUILayout.HelpBox("An index value of -1 will add the page to the end of the Journal.", MessageType.Info);
                }
            }

            else if (changeType == MenuChangeType.RemoveJournalPage)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI("Menu containing element:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField("Menu containing element:", menuToChange);
                }

                elementToChangeParameterID = Action.ChooseParameterGUI("Journal element:", parameters, elementToChangeParameterID, ParameterType.String);
                if (elementToChangeParameterID < 0)
                {
                    elementToChange = EditorGUILayout.TextField("Journal element:", elementToChange);
                }

                removeJournalPageMethod = (RemoveJournalPageMethod)EditorGUILayout.EnumPopup("Removal method:", removeJournalPageMethod);
                if (removeJournalPageMethod == RemoveJournalPageMethod.RemoveSinglePage)
                {
                    journalPageIndexParameterID = Action.ChooseParameterGUI("Page number to remove:", parameters, journalPageIndexParameterID, ParameterType.Integer);
                    if (journalPageIndexParameterID < 0)
                    {
                        journalPageIndex = EditorGUILayout.IntField("Page number to remove:", journalPageIndex);
                        EditorGUILayout.HelpBox("An index value of -1 will remove the last page of the Journal.", MessageType.Info);
                    }
                }
            }

            if (doFade && (changeType == MenuChangeType.TurnOnMenu || changeType == MenuChangeType.TurnOffMenu || changeType == MenuChangeType.LockMenu))
            {
                willWait = EditorGUILayout.Toggle("Wait until finish?", willWait);
            }

            AfterRunningOption();
        }
Beispiel #4
0
        override public void ShowGUI(List <ActionParameter> parameters)
        {
            changeType = (MenuChangeType)EditorGUILayout.EnumPopup("Change type:", changeType);

            if (changeType == MenuChangeType.TurnOnMenu)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI("Menu to turn on:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField("Menu to turn on:", menuToChange);
                }
                doFade = EditorGUILayout.Toggle("Fade?", doFade);
            }

            else if (changeType == MenuChangeType.TurnOffMenu)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI("Menu to turn off:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField("Menu to turn off:", menuToChange);
                }
                doFade = EditorGUILayout.Toggle("Fade?", doFade);
            }

            else if (changeType == MenuChangeType.HideMenuElement)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI("Menu containing element:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField("Menu containing element:", menuToChange);
                }

                elementToChangeParameterID = Action.ChooseParameterGUI("Element to hide:", parameters, elementToChangeParameterID, ParameterType.String);
                if (elementToChangeParameterID < 0)
                {
                    elementToChange = EditorGUILayout.TextField("Element to hide:", elementToChange);
                }
            }

            else if (changeType == MenuChangeType.ShowMenuElement)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI("Menu containing element:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField("Menu containing element:", menuToChange);
                }

                elementToChangeParameterID = Action.ChooseParameterGUI("Element to show:", parameters, elementToChangeParameterID, ParameterType.String);
                if (elementToChangeParameterID < 0)
                {
                    elementToChange = EditorGUILayout.TextField("Element to show:", elementToChange);
                }
            }

            else if (changeType == MenuChangeType.LockMenu)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI("Menu to lock:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField("Menu to lock:", menuToChange);
                }
                doFade = EditorGUILayout.Toggle("Fade?", doFade);
            }

            else if (changeType == MenuChangeType.UnlockMenu)
            {
                menuToChangeParameterID = Action.ChooseParameterGUI("Menu to unlock:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField("Menu to unlock:", menuToChange);
                }
            }

            else if (changeType == MenuChangeType.AddJournalPage)
            {
                if (lineID > -1)
                {
                    EditorGUILayout.LabelField("Speech Manager ID:", lineID.ToString());
                }

                menuToChangeParameterID = Action.ChooseParameterGUI("Menu containing element:", parameters, menuToChangeParameterID, ParameterType.String);
                if (menuToChangeParameterID < 0)
                {
                    menuToChange = EditorGUILayout.TextField("Menu containing element:", menuToChange);
                }

                elementToChangeParameterID = Action.ChooseParameterGUI("Journal elementw:", parameters, elementToChangeParameterID, ParameterType.String);
                if (elementToChangeParameterID < 0)
                {
                    elementToChange = EditorGUILayout.TextField("Journal element:", elementToChange);
                }

                EditorGUILayout.LabelField("New page text:");
                journalText = EditorGUILayout.TextArea(journalText);
            }

            if (doFade && (changeType == MenuChangeType.TurnOnMenu || changeType == MenuChangeType.TurnOffMenu || changeType == MenuChangeType.LockMenu))
            {
                willWait = EditorGUILayout.Toggle("Wait until finish?", willWait);
            }

            AfterRunningOption();
        }