protected override void createEditInterface()
 {
     editInterface = new EditInterface(Type);
     editInterface.addSubInterface(CameraStartPosition.getEditInterface("Start Position", ReflectedEditInterface.DefaultScanner));
     editInterface.addSubInterface(CameraEndPosition.getEditInterface("End Position", ReflectedEditInterface.DefaultScanner));
     editInterface.IconReferenceTag = Icon;
 }
Esempio n. 2
0
 protected override void createEditInterface()
 {
     editInterface = new EditInterface(Type);
     editInterface.addSubInterface(startPosition.getEditInterface("Start Position"));
     editInterface.addSubInterface(endPosition.getEditInterface("End Position"));
     editInterface.IconReferenceTag = Icon;
 }
Esempio n. 3
0
        protected override void createEditInterface()
        {
            EditInterface editInterface = new EditInterface("Blend Layers");

            editInterface.addSubInterface(startLayers.getEditInterface(Type, ReflectedEditInterface.DefaultScanner));
            editInterface.addSubInterface(endLayers.getEditInterface(Type, ReflectedEditInterface.DefaultScanner));
            editInterface.IconReferenceTag = Icon;
        }
        public EditInterface getEditInterface()
        {
            if (editInterface == null)
            {
                preActionEdit  = new TimelinePreActionEditInterface(timeline);
                postActionEdit = new TimelinePostActionEditInterface(timeline);

                editInterface = ReflectedEditInterface.createEditInterface(this, ReflectedEditInterface.DefaultScanner, "Timeline", null);
                editInterface.addSubInterface(preActionEdit.getEditInterface());
                editInterface.addSubInterface(postActionEdit.getEditInterface());

                editInterface.addCommand(new EditInterfaceCommand("Reverse Sides", callback => timeline.reverseSides()));
            }
            return(editInterface);
        }
Esempio n. 5
0
        public EditInterface getEditInterface()
        {
            if (editInterface == null)
            {
                editInterface = new EditInterface(name + " Behavior Manager");

                phasesEditInterface = new EditInterface("Update Phases",
                                                        uiCallback =>
                {
                    addUpdatePhase(new BehaviorUpdatePhase());
                },
                                                        (uiCallback, property) =>
                {
                    removeUpdatePhase((BehaviorUpdatePhase)property);
                }, null);
                EditablePropertyInfo propertyInfo = new EditablePropertyInfo();
                propertyInfo.addColumn(new EditablePropertyColumn("Name", false));
                phasesEditInterface.setPropertyInfo(propertyInfo);
                foreach (var phase in updatePhases)
                {
                    addPhaseProperty(phase);
                }

                editInterface.addSubInterface(phasesEditInterface);
            }
            return(editInterface);
        }
Esempio n. 6
0
 private void onTrackAdded(ShowPropSubActionPrototype prototype)
 {
     if (editInterface != null)
     {
         editInterface.addSubInterface(prototype, prototype.EditInterface);
     }
 }
Esempio n. 7
0
        protected override void onShown(EventArgs args)
        {
            base.onShown(args);
            if (firstShow)
            {
                firstShow = false;
                EditInterface editInterface = new EditInterface("Debug Visualizers");
                foreach (var debugInterface in pluginManager.DebugInterfaces)
                {
                    EditInterface        debugEditInterface = new EditInterface(debugInterface.Name);
                    EditablePropertyInfo propertyInfo       = new EditablePropertyInfo();
                    propertyInfo.addColumn(new EditablePropertyColumn("Name", true));
                    propertyInfo.addColumn(new EditablePropertyColumn("Value", false));
                    debugEditInterface.setPropertyInfo(propertyInfo);

                    debugEditInterface.addEditableProperty(new CallbackEditableProperty <bool>("Enabled",
                                                                                               () => debugInterface.Enabled, v => debugInterface.Enabled = v, canParseBool, bool.Parse));

                    debugEditInterface.addEditableProperty(new CallbackEditableProperty <bool>("Depth Testing",
                                                                                               () => debugInterface.DepthTesting, v => debugInterface.DepthTesting = v, canParseBool, bool.Parse));

                    foreach (var entry in debugInterface.Entries)
                    {
                        debugEditInterface.addEditableProperty(new CallbackEditableProperty <bool>(entry.Text,
                                                                                                   () => entry.Enabled, value => entry.Enabled = value, canParseBool, bool.Parse));
                    }

                    editInterface.addSubInterface(debugEditInterface);
                }

                objectEditor.EditInterface = editInterface;

                createDebugVisualizers();
            }
        }
Esempio n. 8
0
 public EditInterface getEditInterface()
 {
     if (editInterface == null)
     {
         editInterface = ReflectedEditInterface.createEditInterface(this, ReflectedEditInterface.DefaultScanner, name + "Simulation Scene", null);
         editInterface.addSubInterface(windowPresets.getEditInterface());
     }
     return(editInterface);
 }
 public EditInterface getEditInterface()
 {
     if (editInterface == null)
     {
         editInterface = ReflectedEditInterface.createEditInterface(this, ReflectedEditInterface.DefaultScanner, name + " - BEPUIk Scene", null);
         editInterface.addSubInterface(rootSolver.getEditInterface());
     }
     return(editInterface);
 }
Esempio n. 10
0
 /// <summary>
 /// Get the EditInterface.
 /// </summary>
 /// <returns>The EditInterface.</returns>
 public EditInterface getEditInterface()
 {
     if (editInterface == null)
     {
         editInterface = new EditInterface("Resource Manager");
         editInterface.IconReferenceTag = EngineIcons.Resource;
         foreach (SubsystemResources subsystem in subsystemResources.Values)
         {
             editInterface.addSubInterface(subsystem.getEditInterface());
         }
     }
     return(editInterface);
 }
Esempio n. 11
0
        private void readFile(String file, String name)
        {
            String         css   = editorController.ResourceProvider.readFileAsString(file);
            SlideshowStyle style = new SlideshowStyle(name, css);

            style.Changed += (arg) =>
            {
                StringBuilder styleString = new StringBuilder(500);
                ((SlideshowStyle)arg).buildStyleSheet(styleString);
                editorController.ResourceProvider.ResourceCache.add(new ResourceProviderTextCachedResource(file, Encoding.UTF8, styleString.ToString(), editorController.ResourceProvider));
                editorController.refreshRmlAndThumbnail();
            };
            editInterface.addSubInterface(style.getEditInterface());
        }
Esempio n. 12
0
 /// <summary>
 /// Helper function for adding a resource group EditInterface.
 /// </summary>
 /// <param name="group">The ResourceGroup to add the interface for.</param>
 private void addResourceGroupEditInterface(ResourceGroup group)
 {
     editInterface.addSubInterface(group, group.getEditInterface());
 }
Esempio n. 13
0
 /// <summary>
 /// Helper function to create the EditInterface for a given SimElementDefinition.
 /// </summary>
 /// <param name="definition"></param>
 private void createElementInterface(SimElementDefinition definition)
 {
     editInterface.addSubInterface(definition, definition.getEditInterface());
 }
Esempio n. 14
0
        /// <summary>
        /// Get the EditInterface for this SimSceneDefinition.
        /// </summary>
        /// <returns>The EditInterface for this SimSceneDefinition.</returns>
        public EditInterface getEditInterface()
        {
            if (editInterface == null)
            {
                editInterface = ReflectedEditInterface.createEditInterface(this, ReflectedEditInterface.DefaultScanner, "Sim Scene", () =>
                {
                    if (hasSimSubSceneDefinitions())
                    {
                        if (DefaultSubScene == null)
                        {
                            throw new ValidationException("Please specify one of the Subscenes as the default.");
                        }
                        if (!hasSimSubSceneDefinition(DefaultSubScene))
                        {
                            throw new ValidationException("{0} is not a valid Subscene. Please specify an existing scene.", DefaultSubScene);
                        }
                    }
                });
                editInterface.IconReferenceTag = EngineIcons.Scene;

                simElementEditor = new EditInterface("Sim Element Managers");
                var elementManagerInterfaces = simElementEditor.createEditInterfaceManager <SimElementManagerDefinition>();
                elementManagerInterfaces.addCommand(new EditInterfaceCommand("Destroy", destroySimElementManagerDefinition));
                foreach (AddSimElementManagerCommand command in PluginManager.Instance.getCreateSimElementManagerCommands())
                {
                    simElementEditor.addCommand(new EditInterfaceCommand(command.Name, callback =>
                    {
                        callback.getInputString("Enter a name.", delegate(String input, ref String errorPrompt)
                        {
                            if (input == null || input == "")
                            {
                                errorPrompt = "Please enter a non empty name.";
                                return(false);
                            }
                            if (this.hasSimElementManagerDefinition(input))
                            {
                                errorPrompt = "That name is already in use. Please provide another.";
                                return(false);
                            }

                            SimElementManagerDefinition def = command.execute(input, callback);
                            this.addSimElementManagerDefinition(def);

                            return(true);
                        });
                    }));
                }
                editInterface.addSubInterface(simElementEditor);

                subScenes = new EditInterface("Subscenes");
                var subSceneInterfaces = subScenes.createEditInterfaceManager <SimSubSceneDefinition>();
                subSceneInterfaces.addCommand(new EditInterfaceCommand("Destroy", destroySimSubSceneDefinition));
                EditInterfaceCommand createSubSceneCommand = new EditInterfaceCommand("Create Subscene", createSimSubSceneDefinition);
                subScenes.addCommand(createSubSceneCommand);
                editInterface.addSubInterface(subScenes);

                foreach (SimElementManagerDefinition elementDef in elementManagers)
                {
                    createEditInterface(elementDef);
                }
                foreach (SimSubSceneDefinition subSceneDef in subSceneDefinitions.Values)
                {
                    createEditInterface(subSceneDef);
                }
            }
            return(editInterface);
        }
Esempio n. 15
0
 private void addGroupSubInterface(InstanceGroup group)
 {
     editInterface.addSubInterface(group, group.getEditInterface());
 }
Esempio n. 16
0
 /// <summary>
 /// Helper function to create an edit interface.
 /// </summary>
 /// <param name="def"></param>
 private void createEditInterface(SimElementManagerDefinition def)
 {
     simElementEditor.addSubInterface(def, def.getEditInterface());
 }
Esempio n. 17
0
 /// <summary>
 /// Helper function to create an edit interface.
 /// </summary>
 /// <param name="def"></param>
 private void createEditInterface(SimSubSceneDefinition def)
 {
     subScenes.addSubInterface(def, def.getEditInterface());
 }
Esempio n. 18
0
 /// <summary>
 /// Helper function to add an EditInterface for an EntityDefinition.
 /// </summary>
 /// <param name="definition"></param>
 private void addMovableObjectEdit(MovableObjectDefinition definition)
 {
     editInterface.addSubInterface(definition, definition.getEditInterface());
 }
 public void preActionAdded(TimelineInstantAction action)
 {
     editInterface.addSubInterface(action, action.getEditInterface());
 }
Esempio n. 20
0
 protected override void customizeEditInterface(EditInterface editInterface)
 {
     editInterface.addSubInterface(buttons.getEditInterface("Buttons"));
     base.customizeEditInterface(editInterface);
 }