예제 #1
0
        override public void ShowGUI(List <ActionParameter> parameters)
        {
            menuNameParameterID = Action.ChooseParameterGUI("Menu containing Input:", parameters, menuNameParameterID, ParameterType.String);
            if (menuNameParameterID < 0)
            {
                menuName = EditorGUILayout.TextField("Menu containing Input:", menuName);
            }

            elementNameParameterID = Action.ChooseParameterGUI("Input element name:", parameters, elementNameParameterID, ParameterType.String);
            if (elementNameParameterID < 0)
            {
                elementName = EditorGUILayout.TextField("Input element name:", elementName);
            }

            setMenuInputBoxSource = (SetMenuInputBoxSource)EditorGUILayout.EnumPopup("New text is:", setMenuInputBoxSource);
            if (setMenuInputBoxSource == SetMenuInputBoxSource.EnteredHere)
            {
                newLabelParameterID = Action.ChooseParameterGUI("New text:", parameters, newLabelParameterID, ParameterType.String);
                if (newLabelParameterID < 0)
                {
                    newLabel = EditorGUILayout.TextField("New text:", newLabel);
                }
            }
            else if (setMenuInputBoxSource == SetMenuInputBoxSource.FromGlobalVariable)
            {
                varParameterID = Action.ChooseParameterGUI("String variable:", parameters, varParameterID, ParameterType.String);
                if (varParameterID == -1)
                {
                    varID = AdvGame.GlobalVariableGUI("String variable:", varID, VariableType.String);
                }
            }

            AfterRunningOption();
        }
예제 #2
0
        override public void ShowGUI(List <ActionParameter> parameters)
        {
            menuNameParameterID = Action.ChooseParameterGUI("Menu containing Input:", parameters, menuNameParameterID, ParameterType.String);
            if (menuNameParameterID < 0)
            {
                menuName = EditorGUILayout.TextField("Menu containing Input:", menuName);
            }

            elementNameParameterID = Action.ChooseParameterGUI("Input element name:", parameters, elementNameParameterID, ParameterType.String);
            if (elementNameParameterID < 0)
            {
                elementName = EditorGUILayout.TextField("Input element name:", elementName);
            }

            setMenuInputBoxSource = (SetMenuInputBoxSource)EditorGUILayout.EnumPopup("New text is:", setMenuInputBoxSource);
            if (setMenuInputBoxSource == SetMenuInputBoxSource.EnteredHere)
            {
                newLabelParameterID = Action.ChooseParameterGUI("New text:", parameters, newLabelParameterID, ParameterType.String);
                if (newLabelParameterID < 0)
                {
                    newLabel = EditorGUILayout.TextField("New text:", newLabel);
                }
            }
            else if (setMenuInputBoxSource == SetMenuInputBoxSource.FromGlobalVariable)
            {
                varParameterID = Action.ChooseParameterGUI("String variable:", parameters, varParameterID, ParameterType.String);
                if (varParameterID == -1)
                {
                    varID = AdvGame.GlobalVariableGUI("String variable:", varID);
                    if (varID >= 0 && AdvGame.GetReferences() && AdvGame.GetReferences().variablesManager)
                    {
                        GVar _var = AdvGame.GetReferences().variablesManager.GetVariable(varID);
                        if (_var != null && _var.type != VariableType.String)
                        {
                            EditorGUILayout.HelpBox("The chosen Variable must be a String.", MessageType.Warning);
                        }
                    }
                }
            }

            AfterRunningOption();
        }
예제 #3
0
        public override void ShowGUI(List<ActionParameter> parameters)
        {
            menuNameParameterID = Action.ChooseParameterGUI ("Menu containing Input:", parameters, menuNameParameterID, ParameterType.String);
            if (menuNameParameterID < 0)
            {
                menuName = EditorGUILayout.TextField ("Menu containing Input:", menuName);
            }

            elementNameParameterID = Action.ChooseParameterGUI ("Input element name:", parameters, elementNameParameterID, ParameterType.String);
            if (elementNameParameterID < 0)
            {
                elementName = EditorGUILayout.TextField ("Input element name:", elementName);
            }

            setMenuInputBoxSource = (SetMenuInputBoxSource) EditorGUILayout.EnumPopup ("New text is:", setMenuInputBoxSource);
            if (setMenuInputBoxSource == SetMenuInputBoxSource.EnteredHere)
            {
                newLabelParameterID = Action.ChooseParameterGUI ("New text:", parameters, newLabelParameterID, ParameterType.String);
                if (newLabelParameterID < 0)
                {
                    newLabel = EditorGUILayout.TextField ("New text:", newLabel);
                }
            }
            else if (setMenuInputBoxSource == SetMenuInputBoxSource.FromGlobalVariable)
            {
                varParameterID = Action.ChooseParameterGUI ("String variable:", parameters, varParameterID, ParameterType.String);
                if (varParameterID == -1)
                {
                    varID = AdvGame.GlobalVariableGUI ("String variable:", varID);
                    if (varID >= 0 && AdvGame.GetReferences () && AdvGame.GetReferences ().variablesManager)
                    {
                        GVar _var = AdvGame.GetReferences ().variablesManager.GetVariable (varID);
                        if (_var != null && _var.type != VariableType.String)
                        {
                            EditorGUILayout.HelpBox ("The chosen Variable must be a String.", MessageType.Warning);
                        }
                    }
                }
            }

            AfterRunningOption ();
        }