Esempio n. 1
0
        public override bool OnGUI()
        {
            var action = target as SetData;

            EditorGUI.BeginChangeCheck();

            using (new GUILayout.VerticalScope("Box"))
            {
                GUILayout.Label("From Variable:", "boldLabel");

                action.dataType = (SetData.DataType)EditorGUILayout.EnumPopup(action.dataType);
                EditField("from" + action.dataType.ToString());
            }

            using (new GUILayout.VerticalScope("Box"))
            {
                GUILayout.Label("To Databox:", "boldLabel");
                EditField("databoxObject");


                if (!action.databoxObject.IsNone)
                {
                    DrawDataboxSelectionPopup.Draw(action.databoxObject.Value as DataboxObject, DrawDataboxSelectionPopup.DrawType.tableEntryValue,
                                                   action.data, out action.data);
                }
            }

            var isDirty = EditorGUI.EndChangeCheck();

            return(isDirty || GUI.changed);
        }
Esempio n. 2
0
        public override bool OnGUI()
        {
            var action = target as GetData;

            EditorGUI.BeginChangeCheck();

            using (new GUILayout.VerticalScope("Box"))
            {
                GUILayout.Label("Databox Data:", "boldLabel");
                EditField("databoxObject");
                EditField("usePlayMakerIDFields");

                if (!action.databoxObject.IsNone)
                {
                    if (!action.usePlayMakerIDFields)
                    {
                        DrawDataboxSelectionPopup.Draw(action.databoxObject.Value as DataboxObject, DrawDataboxSelectionPopup.DrawType.tableEntryValue,
                                                       action.data, out action.data);
                    }
                    else
                    {
                        using (new GUILayout.VerticalScope("Box"))
                        {
                            EditField("table");
                        }
                        using (new GUILayout.VerticalScope("Box"))
                        {
                            EditField("entry");
                        }
                        using (new GUILayout.VerticalScope("Box"))
                        {
                            EditField("value");
                        }
                    }
                }
            }

            using (new GUILayout.VerticalScope("Box"))
            {
                GUILayout.Label("Store result:", "boldLabel");
                action.dataType = (GetData.DataType)EditorGUILayout.EnumPopup(action.dataType);
                EditField("storeResult" + action.dataType.ToString());
            }

            var isDirty = EditorGUI.EndChangeCheck();

            return(isDirty || GUI.changed);
        }
        public override bool OnGUI()
        {
            var action = target as ResetValue;

            EditorGUI.BeginChangeCheck();

            EditField("databoxObject");

            if (!action.databoxObject.IsNone)
            {
                DrawDataboxSelectionPopup.Draw(action.databoxObject.Value as DataboxObject, DrawDataboxSelectionPopup.DrawType.tableEntryValue,
                                               action.data, out action.data);
            }

            var isDirty = EditorGUI.EndChangeCheck();

            return(isDirty || GUI.changed);
        }
Esempio n. 4
0
        public override bool OnGUI()
        {
            var action = target as RemoveEntry;

            EditorGUI.BeginChangeCheck();

            EditField("databoxObject");

            //action.data.useOwnerInstanceID = GUILayout.Toggle(action.useOwnerInstanceID, "use owner instance id");

            if (!action.databoxObject.IsNone)
            {
                DrawDataboxSelectionPopup.Draw(action.databoxObject.Value as DataboxObject, DrawDataboxSelectionPopup.DrawType.tableEntry,
                                               action.data, out action.data);
            }

            var isDirty = EditorGUI.EndChangeCheck();

            return(isDirty || GUI.changed);
        }