Пример #1
0
        public void FlipVertical()
        {
            // Find min and max Y position
            var max = SelectedItems.Max(element => Math.Abs(element.Y));
            var min = SelectedItems.Min(element => Math.Abs(element.Y));

            foreach (var lightViewModel in SelectedItems)
            {
                lightViewModel.Light.Y = max - (lightViewModel.Light.Y - min);
            }
        }
Пример #2
0
        public void FlipHorizontal()
        {
            // Find min and max X position
            var max = SelectedItems.Max(element => Math.Abs(element.X));
            var min = SelectedItems.Min(element => Math.Abs(element.X));

            foreach (var lightViewModel in SelectedItems)
            {
                lightViewModel.Light.X = max - (lightViewModel.Light.X - min);
            }
        }
Пример #3
0
        public override bool HandleReverse()
        {
            double selectionStartTime = SelectedItems.Min(h => h.StartTime);
            double selectionEndTime   = SelectedItems.Max(h => h.GetEndTime());

            EditorBeatmap.PerformOnSelection(hitObject =>
            {
                hitObject.StartTime = selectionEndTime - (hitObject.GetEndTime() - selectionStartTime);

                if (hitObject is JuiceStream juiceStream)
                {
                    juiceStream.Path.Reverse(out Vector2 positionalOffset);
                    juiceStream.OriginalX        += positionalOffset.X;
                    juiceStream.LegacyConvertedY += positionalOffset.Y;
                    EditorBeatmap.Update(juiceStream);
                }
            });
            return(true);
        }
Пример #4
0
        public void DistributeVertically()
        {
            if (SelectedItems.Count > 2)
            {
                var minY  = SelectedItems.Min(x => x.Light.Y);
                var maxY  = SelectedItems.Max(x => x.Light.Y);
                var count = SelectedItems.Count - 1;

                var dist = (maxY - minY) / count;

                int    y         = 0;
                double holdValue = minY;
                foreach (var lightViewModel in SelectedItems.OrderBy(x => x.Y))
                {
                    if (y != 0)
                    {
                        holdValue       += dist;
                        lightViewModel.Y = holdValue;
                    }

                    y++;
                }
            }
        }
Пример #5
0
        public void DistributeHorizontally()
        {
            if (SelectedItems.Count > 2)
            {
                var minX  = SelectedItems.Min(x => x.Light.X);
                var maxX  = SelectedItems.Max(x => x.Light.X);
                var count = SelectedItems.Count - 1;

                var dist = (maxX - minX) / count;

                int    y         = 0;
                double holdValue = minX;
                foreach (var lightViewModel in SelectedItems.OrderBy(x => x.X))
                {
                    if (y != 0)
                    {
                        holdValue       += dist;
                        lightViewModel.X = holdValue;
                    }

                    y++;
                }
            }
        }