public void ChangeCursorIfCanTransform(List <Entity2D> selectedEntity2DList, Vector2D mousePos,
                                        ControlProcessor processor)
 {
     uiMouseCursor.mousePos            = mousePos;
     uiMouseCursor.selectedControlList = selectedEntity2DList;
     uiMouseCursor.controlProcessor    = processor;
 }
Example #2
0
 private void InitializeClasses()
 {
     ScreenSpace.Scene           = new SceneScreenSpace(editorService.Viewport.Window, SceneResolution);
     ControlProcessor            = new ControlProcessor();
     controlAdder                = new ControlAdder();
     controlChanger              = new ControlChanger();
     uiControl                   = new UIControl();
     controlTransformer          = new ControlTransformer(editorService);
     controlAllignmentAndMargins = new ControlAllignmentAndMargins(this);
     controlMaterialChanger      = new ControlMaterialChanger(this);
     uiSceneGrid                 = new UISceneGrid(this);
 }
Example #3
0
		private void InitializeClasses()
		{
			ScreenSpace.Scene = new SceneScreenSpace(editorService.Viewport.Window, SceneResolution);
			ControlProcessor = new ControlProcessor();
			controlAdder = new ControlAdder();
			controlChanger = new ControlChanger();
			uiControl = new UIControl();
			controlTransformer = new ControlTransformer(editorService);
			controlAllignmentAndMargins = new ControlAllignmentAndMargins(this);
			controlMaterialChanger = new ControlMaterialChanger(this);
			uiSceneGrid = new UISceneGrid(this);
		}
Example #4
0
 public bool AddControl(Vector2D position)
 {
     ControlTransformer.isTransforming = false;
     controlAdder.AddControl(position, this);
     uiControl.isClicking = false;
     if (SelectedEntity2DList == null)
     {
         return(true);                //ncrunch: no coverage
     }
     ControlProcessor.UpdateOutlines(SelectedEntity2DList);
     SetEntity2D((Control)ShownEntity2D);
     return(false);
 }
Example #5
0
 private void UpdateUIControlAndLists(Control control)
 {
     SelectedControlNamesInList.Add(control.Name);
     if (!SelectedEntity2DList.Contains(control))
     {
         SelectedEntity2DList.Add(control);
     }
     IsSelectingControl = true;
     uiControl.SetMaterials(SelectedEntity2DList);
     Messenger.Default.Send(SelectedControlNamesInList, "SetSelectedName");
     Messenger.Default.Send(uiControl.Index, "SetSelectedIndex");
     ControlProcessor.UpdateOutlines(SelectedEntity2DList);
     controlChanger.SetControlLayer(control.RenderLayer, this);
 }
Example #6
0
 public void TransformSelectedControl(Vector2D position)
 {
     if (controlTransformer.uiMouseCursor.CurrentCursor == ControlTransformer.MoveCursor)
     {
         ControlProcessor.MoveImage(position, SelectedEntity2DList, controlAdder.IsDragging, this);
         ControlTransformer.isTransforming = true;
     }
     if (controlTransformer.uiMouseCursor.CurrentCursor == ControlTransformer.ScaleCursor)
     {
         controlTransformer.ScaleControl(position, SelectedEntity2DList);
     }
     if (controlTransformer.uiMouseCursor.CurrentCursor == ControlTransformer.RotateCursor)
     {
         controlTransformer.RotateControl(position, SelectedEntity2DList);
     }
 }
Example #7
0
 private void UpdateControlListAfterDelete()
 {
     uiControl.Index = -1;
     ControlProcessor.UpdateOutlines(SelectedEntity2DList);
     Messenger.Default.Send("", "DeleteSelectedContent");
     if (SelectedEntity2DList.Count == 0)
     {
         return;
     }
     uiControl.Index =
         Scene.Controls.IndexOf(SelectedEntity2DList[SelectedEntity2DList.Count - 1]);
     SelectedControlNamesInList.Clear();
     SelectedControlNamesInList.Add((Scene.Controls[uiControl.Index] as Control).Name);
     Messenger.Default.Send(SelectedControlNamesInList, "SetSelectedName");
     Messenger.Default.Send(uiControl.Index, "SetSelectedIndex");
 }
		public void ChangeCursorIfCanTransform(List<Entity2D> selectedEntity2DList, Vector2D mousePos,
			ControlProcessor processor)
		{
			uiMouseCursor.mousePos = mousePos;
			uiMouseCursor.selectedControlList = selectedEntity2DList;
			uiMouseCursor.controlProcessor = processor;
		}
Example #9
0
        }         //ncrunch: no coverage end

        public void UpdateOutLine(List <Entity2D> selectedEntity2D)
        {
            ControlProcessor.UpdateOutlines(selectedEntity2D);
        }