From d835def4abfc5d52d22d604e35f7f596e3c54a48 Mon Sep 17 00:00:00 2001 From: smoogipoo Date: Wed, 13 Nov 2019 17:36:46 +0900 Subject: [PATCH] Add point count to the menu item text --- .../Sliders/Components/PathControlPointVisualiser.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/Components/PathControlPointVisualiser.cs b/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/Components/PathControlPointVisualiser.cs index 97c756417c..8d598f1ab3 100644 --- a/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/Components/PathControlPointVisualiser.cs +++ b/osu.Game.Rulesets.Osu/Edit/Blueprints/Sliders/Components/PathControlPointVisualiser.cs @@ -4,6 +4,7 @@ using System; using System.Collections.Generic; using System.Linq; +using Humanizer; using osu.Framework.Allocation; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; @@ -143,12 +144,14 @@ namespace osu.Game.Rulesets.Osu.Edit.Blueprints.Sliders.Components { get { - if (!Pieces.Any(p => p.IsSelected.Value)) + int selectedPoints = Pieces.Count(p => p.IsSelected.Value); + + if (selectedPoints == 0) return null; return new MenuItem[] { - new OsuMenuItem("Delete control points", MenuItemType.Destructive, () => deleteSelected()) + new OsuMenuItem($"Delete {"control point".ToQuantity(selectedPoints)}", MenuItemType.Destructive, () => deleteSelected()) }; } }