public void SetSingleSelectedControl(Control control) { SelectedEntity2DList.Clear(); SelectedControlNamesInList.Clear(); SelectedEntity2DList.Add(control); SelectedControlNamesInList.Add(control.Name); }
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"); }
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(); }
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; }
public void DeleteSelectedContent(string arg) { UiEditorScene.DeleteSelectedContent(); SelectedControlNamesInList.Clear(); }