mirror of
https://github.com/ppy/osu.git
synced 2024-11-15 12:27:26 +08:00
Merge branch 'master' into form-slider-bar-transfer-value-on-commit
This commit is contained in:
commit
1854e1c2f9
5
.github/workflows/ci.yml
vendored
5
.github/workflows/ci.yml
vendored
@ -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
|
||||
|
@ -177,7 +177,7 @@ namespace osu.Game.Rulesets.Osu.Difficulty
|
||||
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);
|
||||
|
@ -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 @@ namespace osu.Game.Graphics.UserInterface
|
||||
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 @@ namespace osu.Game.Graphics.UserInterface
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
ShowCheckbox.BindValueChanged(_ => updateState());
|
||||
Item.Action.BindDisabledChanged(_ => updateState(), true);
|
||||
FinishTransforms();
|
||||
}
|
||||
@ -138,6 +142,8 @@ namespace osu.Game.Graphics.UserInterface
|
||||
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();
|
||||
|
@ -42,6 +42,25 @@ namespace osu.Game.Graphics.UserInterface
|
||||
sampleClose = audio.Samples.Get(@"UI/dropdown-close");
|
||||
}
|
||||
|
||||
protected override void Update()
|
||||
{
|
||||
base.Update();
|
||||
|
||||
bool showCheckboxes = false;
|
||||
|
||||
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()
|
||||
{
|
||||
if (!TopLevelMenu && !wasOpened)
|
||||
|
@ -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.Graphics.UserInterface;
|
||||
using osu.Game.Overlays;
|
||||
using osu.Game.Resources.Localisation.Web;
|
||||
using osuTK;
|
||||
using osuTK.Graphics;
|
||||
|
||||
namespace osu.Game.Graphics.UserInterfaceV2
|
||||
{
|
||||
@ -76,7 +78,7 @@ namespace osu.Game.Graphics.UserInterfaceV2
|
||||
Spacing = new Vector2(5),
|
||||
Child = button = new RoundedButton
|
||||
{
|
||||
Action = () => Colours.Add(Colour4.White),
|
||||
Action = addNewColour,
|
||||
Size = new Vector2(70),
|
||||
Text = "+",
|
||||
}
|
||||
@ -112,6 +114,16 @@ namespace osu.Game.Graphics.UserInterfaceV2
|
||||
updateState();
|
||||
}
|
||||
|
||||
private void addNewColour()
|
||||
{
|
||||
Color4 startingColour = Colours.Count > 0
|
||||
? Colours.Last()
|
||||
: Colour4.White;
|
||||
|
||||
Colours.Add(startingColour);
|
||||
flow.OfType<ColourButton>().Last().TriggerClick();
|
||||
}
|
||||
|
||||
private void updateState()
|
||||
{
|
||||
background.Colour = colourProvider.Background5;
|
||||
|
Loading…
Reference in New Issue
Block a user