protected override void OnDragEnd(DragEndEvent e) { if (e.Button == MouseButton.Right) { return; } if (DragBox.State == Visibility.Visible) { DragBox.Hide(); selectionHandler.UpdateVisibility(); } }
private void load() { selectionHandler = composer.CreateSelectionHandler(); selectionHandler.DeselectAll = deselectAll; var dragBox = new DragBox(select); dragBox.DragEnd += () => selectionHandler.UpdateVisibility(); InternalChildren = new[] { dragBox, selectionHandler, selectionBlueprints = new SelectionBlueprintContainer { RelativeSizeAxes = Axes.Both }, placementBlueprintContainer = new Container <PlacementBlueprint> { RelativeSizeAxes = Axes.Both }, dragBox.CreateProxy() }; foreach (var obj in composer.HitObjects) { addBlueprintFor(obj); } }
protected override void OnDragEnd(DragEndEvent e) { if (e.Button == MouseButton.Right) { return; } if (isDraggingBlueprint) { // handle positional change etc. foreach (var obj in selectedHitObjects) { Beatmap.Update(obj); } changeHandler?.EndChange(); isDraggingBlueprint = false; } if (DragBox.State == Visibility.Visible) { DragBox.Hide(); SelectionHandler.UpdateVisibility(); } }
protected override void OnDragEnd(DragEndEvent e) { if (e.Button == MouseButton.Right) { return; } if (isDraggingBlueprint) { changeHandler?.EndChange(); isDraggingBlueprint = false; } if (DragBox.State == Visibility.Visible) { DragBox.Hide(); selectionHandler.UpdateVisibility(); } }
/// <summary> /// Selects all <see cref="SelectionBlueprint"/>s. /// </summary> private void selectAll() { SelectionBlueprints.ToList().ForEach(m => m.Select()); SelectionHandler.UpdateVisibility(); }