Exemplo n.º 1
0
 public void SetSingleSelectedControl(Control control)
 {
     SelectedEntity2DList.Clear();
     SelectedControlNamesInList.Clear();
     SelectedEntity2DList.Add(control);
     SelectedControlNamesInList.Add(control.Name);
 }
Exemplo n.º 2
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");
 }
Exemplo n.º 3
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();
 }
Exemplo n.º 4
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;
 }
Exemplo n.º 5
0
 public void DeleteSelectedContent(string arg)
 {
     UiEditorScene.DeleteSelectedContent();
     SelectedControlNamesInList.Clear();
 }