Esempio n. 1
0
        bool DrawPackParameter(EditorProp parameter)
        {
            //name
            bool nameChanged = GUIUtils.DrawTextProp(parameter[nameField], GUIUtils.TextFieldType.Normal, false, "param name", GUILayout.MinWidth(32));
            //type
            GUILayoutOption pFieldWidth = GUILayout.Width(100);

            GUIUtils.DrawEnumProp(
                parameter[CustomParameterEditor.typeField],
                (int i) => (CustomParameter.ParamType)i,
                (Enum s) => (int)((CustomParameter.ParamType)s),
                pFieldWidth
                );
            //value
            GUIUtils.DrawProp(CustomParameterEditor.GetParamValueProperty(parameter), GUILayout.Width(128));
            return(nameChanged);
        }
Esempio n. 2
0
        void DrawAOParameters(bool drawingSingle, EditorProp ao)
        {
            for (int i = 0; i < parameterLabels.Length; i++)
            {
                EditorGUILayout.BeginHorizontal();

                //multi set button
                GUI.enabled = !drawingSingle;
                if (GUIUtils.SmallButton(multiSetValueGUI))
                {
                    multiSetParameterIndex = i;
                }
                GUI.enabled = true;

                GUIUtils.Label(parameterLabels[i], parameterLabelWidth);
                GUIUtils.DrawProp(CustomParameterEditor.GetParamValueProperty(ao[AOStateMachineEditor.paramsField][i]));

                EditorGUILayout.EndHorizontal();
            }
        }