public void SelectGroup(UnitListObject parent) { ClearRename(); if (Input.GetKey(KeyCode.LeftShift)) { AddToGrpSelection(parent); } else if (Input.GetKey(KeyCode.LeftControl)) { if (SelectedGroups.Contains(parent)) { RemoveFromGrpSelection(parent); } else { AddToGrpSelection(parent); } } else { ClearGrpSelection(); AddToGrpSelection(parent); } UpdateGroupSelection(); }
public void UpdateGroupSelection() { foreach (UnitListObject ulo in UnitGroups) { ulo.UpdateSelection(SelectedGroups.Contains(ulo), ulo == FirstSelected); } }
public void SelectGroup(UnitListObject parent, bool onTitle) { ClearRename(); if (Input.GetKey(KeyCode.LeftShift)) { AddToGrpSelection(parent); } else if (Input.GetKey(KeyCode.LeftControl)) { if (SelectedGroups.Contains(parent)) { RemoveFromGrpSelection(parent); } else { AddToGrpSelection(parent); } } else { if (SelectedGroups.Count == 1 && SelectedGroups[0] == parent) { if (!onTitle && Time.realtimeSinceStartup - LastClickTime < UnitListObject.DoubleClickTime) { SelectionManager.Current.CleanSelection(); List <UnitInstance> SelectedInstances = new List <UnitInstance>(128); parent.Source.GetAllUnitInstances(ref SelectedInstances); GameObject[] NewSelection = new GameObject[SelectedInstances.Count]; for (int i = 0; i < SelectedInstances.Count; i++) { NewSelection[i] = SelectedInstances[i].gameObject; } SelectionManager.Current.SelectObjects(NewSelection); } } else { ClearGrpSelection(); AddToGrpSelection(parent); } LastClickTime = Time.realtimeSinceStartup; } UpdateGroupSelection(); }
public Boolean MatchesFilter(TranslationItemViewModel translationLine) { if (translationLine == null) { return(false); } return((!TranslatedFilter.HasValue || translationLine.IsTranslated == TranslatedFilter.Value) && (!EditingFilter.HasValue || translationLine.HasChangesInEditor == EditingFilter.Value) && (String.IsNullOrWhiteSpace(AddressFilter) || translationLine.Address.StartsWith(AddressFilter, StringComparison.InvariantCultureIgnoreCase)) && (SelectedGroups.Count == 0 || (InverseGroupFilter && !SelectedGroups.Contains(translationLine.Group)) || (!InverseGroupFilter && SelectedGroups.Contains(translationLine.Group))) && MatchesContentFilter(translationLine) && (!PotentialOverflowFilter || translationLine.TranslatedLineLength > 320 && translationLine.LineLengthDifference > 0) && (!PotentialRepointIssueFilter || translationLine.RemainingLength < 0 && translationLine.PointerText.References.Where(r => r.Repoint).Count() != 1) ); }