Ejemplo n.º 1
0
        /// <summary>
        /// Create a shape instance
        /// </summary>
        /// <returns></returns>
        public override ShapeBase CreateShapeInstance()
        {
            // create a shape
            FmodEventShape Event = new FmodEventShape("Fmod - Event");

            Event.Position = EditorManager.Scene.CurrentShapeSpawnPosition;
            return(Event);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// This function must be overridden, since we have to reset the hotspot
        /// </summary>
        /// <returns></returns>
        public override ShapeBase Clone()
        {
            FmodEventShape copy = (FmodEventShape)base.Clone();

            System.Diagnostics.Debug.Assert(!copy.Selected); // turned off in ShapeBase

            copy._hotSpotStartEvent = null;

            return(copy);
        }
Ejemplo n.º 3
0
        public override object EditValue(ITypeDescriptorContext context, IServiceProvider provider, object value)
        {
            editorService = provider.GetService(typeof(IWindowsFormsEditorService)) as IWindowsFormsEditorService;
            if (editorService == null)
            {
                return(value);
            }

            FmodEventShape Shape = context.Instance as FmodEventShape;

            System.Diagnostics.Debug.Assert(Shape != null, "EventSelectionEditor only valid for FmodEventShapes!");

            // Create a TreeView and populate it
            treeView                 = new TreeView();
            treeView.ImageList       = EditorManager.GUI.ShapeTreeImages.ImageList;
            treeView.Bounds          = new Rectangle(0, 0, 400, 500);
            treeView.NodeMouseClick += new System.Windows.Forms.TreeNodeMouseClickEventHandler(treeView_NodeMouseClick);
            treeView.AfterSelect    += new TreeViewEventHandler(treeView_AfterSelect);
            FmodManaged.ManagedModule.GetEventTree(Shape.EventProject, Shape.EventGroup, treeView);
            treeView.ExpandAll();

            // Show our listbox as a DropDownControl.
            // This methods returns, when the DropDownControl is closed.
            editorService.DropDownControl(treeView);

            if (!bIsEvent)
            {
                return(Shape.Event);
            }

            TreeNode selectedNode = treeView.SelectedNode;

            if (selectedNode != null)
            {
                string fullPath = selectedNode.FullPath;
                return(fullPath.Replace("\\", "/"));
            }
            else
            {
                return(Shape.Event);
            }
        }
Ejemplo n.º 4
0
 /// <summary>
 /// Create a shape instance
 /// </summary>
 /// <returns></returns>
 public override ShapeBase CreateShapeInstance()
 {
     // create a shape
       FmodEventShape Event = new FmodEventShape("Fmod - Event");
       Event.Position = EditorManager.Scene.CurrentShapeSpawnPosition;
       return Event;
 }