public GameEditor( IContextRegistry contextRegistry, IDocumentRegistry documentRegistry, IControlHostService controlHostService, ICommandService commandService, IDocumentService documentService, IPaletteService paletteService, ISettingsService settingsService, IResourceService resourceService, LevelEditorCore.ResourceLister resourceLister, BookmarkLister bookmarkLister ) { m_contextRegistry = contextRegistry; m_documentRegistry = documentRegistry; m_paletteService = paletteService; m_settingsService = settingsService; m_documentService = documentService; m_resourceService = resourceService; m_resourceLister = resourceLister; m_bookmarkLister = bookmarkLister; //to-do wire it to to command service InputScheme.ActiveControlScheme = new MayaControlScheme(); ResolveOnLoad = true; }
public void OnEndDrag(LevelEditorCore.ViewControl vc, Point scrPt) { _nativeManip.OnEndDrag(vc as GUILayer.IViewContext, scrPt); // we need to create operations and turn them into a transaction: // string transName = string.Format("Apply {0} brush", brush.Name); // // GameContext context = m_designView.Context.As<GameContext>(); // context.DoTransaction( // delegate // { // foreach(var op in m_tmpOps) // context.TransactionOperations.Add(op); // }, transName); // m_tmpOps.Clear(); }
public PlacementManipulator(IContextRegistry contextRegistry, LevelEditorCore.ResourceLister resourceLister) { _manipContext = new GUILayer.ActiveManipulatorContext(); _nativeManip = null; _manipSettings = new Settings(); _nativeManip = new GUILayer.NativeManipulatorLayer(_manipContext); if (resourceLister != null) { resourceLister.SelectionChanged += resourceLister_SelectionChanged; _resourceLister = new WeakReference(resourceLister); } _contextRegistry = new WeakReference(contextRegistry); contextRegistry.ActiveContextChanged += OnActiveContextChanged; _nativeManip = new GUILayer.NativeManipulatorLayer(_manipContext); }
public void OnMouseWheel(LevelEditorCore.ViewControl vc, Point scrPt, int delta) { }
public void Render(object opaqueContext, LevelEditorCore.ViewControl vc) { var context = opaqueContext as GUILayer.SimpleRenderingContext; if (context == null) return; _nativeManip.Render(context); }
public void OnMouseWheel(LevelEditorCore.ViewControl vc, Point scrPt, int delta) { _nativeManip.OnMouseWheel(vc as GUILayer.IViewContext, scrPt, delta); }
public void OnDragging(LevelEditorCore.ViewControl vc, Point scrPt) { _nativeManip.OnDragging(vc as GUILayer.IViewContext, scrPt); }
public bool Pick(LevelEditorCore.ViewControl vc, Point scrPt) { return _nativeManip.MouseMove(vc as GUILayer.IViewContext, scrPt); }
public void OnEndDrag(LevelEditorCore.ViewControl vc, Point scrPt) { _nativeManip.OnEndDrag(vc, scrPt); }
public void Render(LevelEditorCore.ViewControl vc) { _nativeManip.Render(vc); }