From 87835f2481f5945262dc4e94810e6ae6c9577005 Mon Sep 17 00:00:00 2001 From: StanR Date: Wed, 2 Oct 2024 19:47:22 +0500 Subject: [PATCH 1/6] Uncap speed od accuracy scaling --- osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs index 67d88b6b01..2941aeb936 100644 --- a/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs +++ b/osu.Game.Rulesets.Osu/Difficulty/OsuPerformanceCalculator.cs @@ -177,7 +177,7 @@ private double computeSpeedValue(ScoreInfo score, OsuDifficultyAttributes attrib double relevantAccuracy = attributes.SpeedNoteCount == 0 ? 0 : (relevantCountGreat * 6.0 + relevantCountOk * 2.0 + relevantCountMeh) / (attributes.SpeedNoteCount * 6.0); // Scale the speed value with accuracy and OD. - speedValue *= (0.95 + Math.Pow(attributes.OverallDifficulty, 2) / 750) * Math.Pow((accuracy + relevantAccuracy) / 2.0, (14.5 - Math.Max(attributes.OverallDifficulty, 8)) / 2); + speedValue *= (0.95 + Math.Pow(attributes.OverallDifficulty, 2) / 750) * Math.Pow((accuracy + relevantAccuracy) / 2.0, (14.5 - attributes.OverallDifficulty) / 2); // Scale the speed value with # of 50s to punish doubletapping. speedValue *= Math.Pow(0.99, countMeh < totalHits / 500.0 ? 0 : countMeh - totalHits / 500.0); From 29418226c05eda74d72875441656683e65989b45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Thu, 3 Oct 2024 15:32:25 +0200 Subject: [PATCH 2/6] Do not add checkbox padding to the left of menu items if no item actually needs it RFC. As per https://discord.com/channels/188630481301012481/188630652340404224/1291346164976980009. The diff is extremely dumb but I tried a few smarter methods and they're either not fully correct or don't work. Primary problem is that menu items are mutable externally and there's no hook provided by the framework to know that items changed. One could probably be made but I'd prefer that this change be examined visually first before I engage in too much ceremony and start changing framework around. --- .../Graphics/UserInterface/DrawableOsuMenuItem.cs | 6 ++++++ osu.Game/Graphics/UserInterface/OsuMenu.cs | 11 +++++++++++ 2 files changed, 17 insertions(+) diff --git a/osu.Game/Graphics/UserInterface/DrawableOsuMenuItem.cs b/osu.Game/Graphics/UserInterface/DrawableOsuMenuItem.cs index 20de8e3c9f..cd44bd8fb9 100644 --- a/osu.Game/Graphics/UserInterface/DrawableOsuMenuItem.cs +++ b/osu.Game/Graphics/UserInterface/DrawableOsuMenuItem.cs @@ -6,6 +6,7 @@ using System.Collections.Generic; using System.Linq; using osu.Framework.Allocation; +using osu.Framework.Bindables; using osu.Framework.Extensions.Color4Extensions; using osu.Framework.Graphics; using osu.Framework.Graphics.Containers; @@ -26,6 +27,8 @@ public partial class DrawableOsuMenuItem : Menu.DrawableMenuItem public const int TEXT_SIZE = 17; public const int TRANSITION_LENGTH = 80; + public BindableBool ShowCheckbox { get; } = new BindableBool(); + private TextContainer text; private HotkeyDisplay hotkey; private HoverClickSounds hoverClickSounds; @@ -72,6 +75,7 @@ protected override void LoadComplete() { base.LoadComplete(); + ShowCheckbox.BindValueChanged(_ => updateState()); Item.Action.BindDisabledChanged(_ => updateState(), true); FinishTransforms(); } @@ -138,6 +142,8 @@ private void updateState() text.BoldText.FadeOut(TRANSITION_LENGTH, Easing.OutQuint); text.NormalText.FadeIn(TRANSITION_LENGTH, Easing.OutQuint); } + + text.CheckboxContainer.Alpha = ShowCheckbox.Value ? 1 : 0; } protected sealed override Drawable CreateContent() => text = CreateTextContainer(); diff --git a/osu.Game/Graphics/UserInterface/OsuMenu.cs b/osu.Game/Graphics/UserInterface/OsuMenu.cs index 2b9a26166f..719100e138 100644 --- a/osu.Game/Graphics/UserInterface/OsuMenu.cs +++ b/osu.Game/Graphics/UserInterface/OsuMenu.cs @@ -3,6 +3,7 @@ #nullable disable +using System.Linq; using osu.Framework.Allocation; using osu.Framework.Audio; using osu.Framework.Audio.Sample; @@ -42,6 +43,16 @@ private void load(AudioManager audio) sampleClose = audio.Samples.Get(@"UI/dropdown-close"); } + protected override void Update() + { + base.Update(); + + bool showCheckboxes = Items.Any(i => i is StatefulMenuItem); + + foreach (var drawableItem in ItemsContainer.OfType()) + drawableItem.ShowCheckbox.Value = showCheckboxes; + } + protected override void AnimateOpen() { if (!TopLevelMenu && !wasOpened) From e136568a18785f45d42a3d0590c5cdc1ea05215b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bart=C5=82omiej=20Dach?= Date: Fri, 4 Oct 2024 11:25:21 +0200 Subject: [PATCH 3/6] Remove linq usage to kill allocations --- osu.Game/Graphics/UserInterface/OsuMenu.cs | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/osu.Game/Graphics/UserInterface/OsuMenu.cs b/osu.Game/Graphics/UserInterface/OsuMenu.cs index 719100e138..6e7dad2b5f 100644 --- a/osu.Game/Graphics/UserInterface/OsuMenu.cs +++ b/osu.Game/Graphics/UserInterface/OsuMenu.cs @@ -3,7 +3,6 @@ #nullable disable -using System.Linq; using osu.Framework.Allocation; using osu.Framework.Audio; using osu.Framework.Audio.Sample; @@ -47,10 +46,19 @@ protected override void Update() { base.Update(); - bool showCheckboxes = Items.Any(i => i is StatefulMenuItem); + bool showCheckboxes = false; - foreach (var drawableItem in ItemsContainer.OfType()) - drawableItem.ShowCheckbox.Value = showCheckboxes; + foreach (var drawableItem in ItemsContainer) + { + if (drawableItem.Item is StatefulMenuItem) + showCheckboxes = true; + } + + foreach (var drawableItem in ItemsContainer) + { + if (drawableItem is DrawableOsuMenuItem osuItem) + osuItem.ShowCheckbox.Value = showCheckboxes; + } } protected override void AnimateOpen() From ff2777a3b941e7d7efc4fdc2298739342762f515 Mon Sep 17 00:00:00 2001 From: Dean Herbert Date: Fri, 4 Oct 2024 18:43:39 +0900 Subject: [PATCH 4/6] When adding a new combo colour, use the last colour as a starting point Also opens the popover automatically because you always want to edit it. --- .../Graphics/UserInterfaceV2/FormColourPalette.cs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/osu.Game/Graphics/UserInterfaceV2/FormColourPalette.cs b/osu.Game/Graphics/UserInterfaceV2/FormColourPalette.cs index 9575ebaa3b..fad58841e3 100644 --- a/osu.Game/Graphics/UserInterfaceV2/FormColourPalette.cs +++ b/osu.Game/Graphics/UserInterfaceV2/FormColourPalette.cs @@ -3,6 +3,7 @@ using System; using System.Collections.Specialized; +using System.Linq; using osu.Framework.Allocation; using osu.Framework.Bindables; using osu.Framework.Extensions; @@ -19,6 +20,7 @@ using osu.Game.Overlays; using osu.Game.Resources.Localisation.Web; using osuTK; +using osuTK.Graphics; namespace osu.Game.Graphics.UserInterfaceV2 { @@ -76,7 +78,7 @@ private void load() Spacing = new Vector2(5), Child = button = new RoundedButton { - Action = () => Colours.Add(Colour4.White), + Action = addNewColour, Size = new Vector2(70), Text = "+", } @@ -112,6 +114,16 @@ protected override void OnHoverLost(HoverLostEvent e) updateState(); } + private void addNewColour() + { + Color4 startingColour = Colours.Count > 0 + ? Colours.Last() + : Colour4.White; + + Colours.Add(startingColour); + flow.OfType().Last().TriggerClick(); + } + private void updateState() { background.Colour = colourProvider.Background5; From 232381c9fbfa2b0a00c8840f703634e982f3ba54 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Sat, 5 Oct 2024 23:00:04 +0900 Subject: [PATCH 5/6] Rollback iOS workload to last known working version --- .github/workflows/ci.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6fbb74dfba..fc6e231c4b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -133,10 +133,7 @@ jobs: dotnet-version: "8.0.x" - name: Install .NET Workloads - run: dotnet workload install maui-ios - - - name: Select Xcode 16 - run: sudo xcode-select -s /Applications/Xcode_16.app/Contents/Developer + run: dotnet workload install ios --from-rollback-file https://raw.githubusercontent.com/ppy/osu-framework/refs/heads/master/workloads.json - name: Build run: dotnet build -c Debug osu.iOS From 72ac2eeb1da5fcb12147c8f5038a2fe8f94d9db4 Mon Sep 17 00:00:00 2001 From: Dan Balasescu Date: Sun, 6 Oct 2024 07:54:56 +0900 Subject: [PATCH 6/6] Update osu!framework package --- osu.Android.props | 2 +- osu.Game/osu.Game.csproj | 2 +- osu.iOS.props | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/osu.Android.props b/osu.Android.props index 6b42258b49..d1f91abd1a 100644 --- a/osu.Android.props +++ b/osu.Android.props @@ -10,7 +10,7 @@ true - + diff --git a/osu.iOS.props b/osu.iOS.props index 8acd1deff1..8e2c3b4bd0 100644 --- a/osu.iOS.props +++ b/osu.iOS.props @@ -17,6 +17,6 @@ -all - +