Esempio n. 1
0
 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;
 }
Esempio n. 2
0
        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();
		}
Esempio n. 3
0
        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);
        }
Esempio n. 4
0
 public void OnMouseWheel(LevelEditorCore.ViewControl vc, Point scrPt, int delta) { }
Esempio n. 5
0
 public void Render(object opaqueContext, LevelEditorCore.ViewControl vc) 
 {
     var context = opaqueContext as GUILayer.SimpleRenderingContext;
     if (context == null) return;
     _nativeManip.Render(context); 
 }
Esempio n. 6
0
 public void OnMouseWheel(LevelEditorCore.ViewControl vc, Point scrPt, int delta) { _nativeManip.OnMouseWheel(vc as GUILayer.IViewContext, scrPt, delta); }
Esempio n. 7
0
 public void OnDragging(LevelEditorCore.ViewControl vc, Point scrPt)    { _nativeManip.OnDragging(vc as GUILayer.IViewContext, scrPt); }
Esempio n. 8
0
 public bool Pick(LevelEditorCore.ViewControl vc, Point scrPt)          { return _nativeManip.MouseMove(vc as GUILayer.IViewContext, scrPt); }
Esempio n. 9
0
 public void OnEndDrag(LevelEditorCore.ViewControl vc, Point scrPt)
 {
     _nativeManip.OnEndDrag(vc, scrPt);
 }
Esempio n. 10
0
 public void Render(LevelEditorCore.ViewControl vc)
 {
     _nativeManip.Render(vc);
 }