bool MogitorsRoot.IDragDropHandler.OnDrageEnter(DragData dragData) { IconTextItem item = dragData.SourceObject as IconTextItem; if (item == null) { return(false); } BaseEditorFactory factory = MogitorsRoot.Instance.GetEditorObjectFactory(item.Name + " Object"); if (factory == null) { return(false); } dragData.ObjectType = factory.TypeName; string placeHolder = ""; if (factory.RequirePlacement) { placeHolder = factory.PlaceHolderName; } if (placeHolder == "") { return(true); } dragData.Parameters["Init"] = "true"; dragData.Parameters["MeshFile"] = placeHolder; dragData.Parameters["Position"] = "999999 999999 999999"; BaseEditor parent = MogitorsRoot.Instance.SceneManagerEditor; dragData.Object = EntityEditor.Factory.CreateObject(ref parent, dragData.Parameters); dragData.Object.Load(); (dragData.Object.Handle as Mogre.Entity).SetMaterialName("scbMATWIREFRAME"); (dragData.Object.Handle as Mogre.Entity).QueryFlags = 0; return(true); }
protected override void OnTextViewCreated(ITextView textView) { // Ensure editor inherits core editor key bindings BaseEditorFactory.InitKeyBindings(textView); base.OnTextViewCreated(textView); }