Exemplo n.º 1
0
        protected override void OnDragEnd(DragEndEvent e)
        {
            if (e.Button == MouseButton.Right)
            {
                return;
            }

            if (DragBox.State == Visibility.Visible)
            {
                DragBox.Hide();
                selectionHandler.UpdateVisibility();
            }
        }
Exemplo n.º 2
0
        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);
            }
        }
Exemplo n.º 3
0
        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();
            }
        }
Exemplo n.º 4
0
        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();
            }
        }
Exemplo n.º 5
0
 /// <summary>
 /// Selects all <see cref="SelectionBlueprint"/>s.
 /// </summary>
 private void selectAll()
 {
     SelectionBlueprints.ToList().ForEach(m => m.Select());
     SelectionHandler.UpdateVisibility();
 }