Ejemplo n.º 1
0
 public void SetSingleSelectedControl(Control control)
 {
     SelectedEntity2DList.Clear();
     SelectedControlNamesInList.Clear();
     SelectedEntity2DList.Add(control);
     SelectedControlNamesInList.Add(control.Name);
 }
Ejemplo n.º 2
0
 private void SetNewControlAfterDelete(int index)
 {
     SelectedEntity2DList.Clear();
     if (Scene.Controls.Count == 0)
     {
         return;
     }
     SelectedEntity2DList.Add(Scene.Controls.Count == index
                         ? Scene.Controls[index - 1] : Scene.Controls[index]);
 }
Ejemplo n.º 3
0
 public void ClearScene()
 {
     foreach (var control in Scene.Controls)
     {
         control.IsActive = false;
     }
     Scene.Controls.Clear();
     UIImagesInList.Clear();
     SelectedEntity2DList.Clear();
     EnableButtons = SelectedEntity2DList.Count != 0;
     foreach (var entity in EntitiesRunner.Current.GetEntitiesOfType <DrawableEntity>())
     {
         entity.IsActive = false;
     }
 }
Ejemplo n.º 4
0
 private void ClearSceneWhenNotMulitSelecting(Vector2D mousePosition)
 {
     CanDeleteSelectedControl = true;
     if (SelectedEntity2DList.Count != 0 && SelectedEntity2DList.Count < 2)
     {
         if (SelectedEntity2DList[0].GetType() == typeof(Button) &&
             SelectedEntity2DList[0].DrawArea.Contains(mousePosition))
         {
             uiControl.isClicking = true;
         }
     }
     ControlProcessor.lastMousePosition = mousePosition;
     if (IsMultiSelecting || IsAnchoringControls)
     {
         return;
     }
     SelectedEntity2DList.Clear();
     SelectedControlNamesInList.Clear();
 }
Ejemplo n.º 5
0
 public void SetEntity2D(Control control)
 {
     if (control == null)
     {
         return;
     }
     if (!IsMultiSelecting)
     {
         SelectedEntity2DList.Clear();
         SelectedControlNamesInList.Clear();
     }
     controlChanger.ChangeUIControlWidthAndHeight(control, uiControl);
     uiControl.Index = Scene.Controls.IndexOf(control);
     if (uiControl.Index < 0)
     {
         return;
     }
     UpdateUIControlAndLists(control);
     SelectedName = control.Name;
 }