Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: ppy/osu
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 2023.1229.1
Choose a base ref
...
head repository: ppy/osu
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 2023.1231.0
Choose a head ref
  • 18 commits
  • 6 files changed
  • 7 contributors

Commits on Dec 28, 2023

  1. Copy the full SHA
    637119f View commit details
  2. Copy the full SHA
    4760c6a View commit details
  3. Copy the full SHA
    f1f1221 View commit details
  4. make the hover scale bigger

    as a consequence, the rotation needs to be tweaked to be lower
    iminlikewithyou committed Dec 28, 2023
    Copy the full SHA
    51d26d2 View commit details

Commits on Dec 29, 2023

  1. Copy the full SHA
    8df9a1e View commit details
  2. Copy the full SHA
    08d88ec View commit details

Commits on Dec 30, 2023

  1. Copy the full SHA
    cc89390 View commit details
  2. Add failing test cases

    frenzibyte committed Dec 30, 2023
    Copy the full SHA
    68dd103 View commit details
  3. Copy the full SHA
    e6fe631 View commit details
  4. Copy the full SHA
    452f201 View commit details
  5. Copy the full SHA
    45f6c78 View commit details
  6. Copy the full SHA
    535177a View commit details
  7. Merge pull request #26271 from Joehuu/remove-main-menu-version-reference

    Remove outdated main menu version reference on issue template
    bdach authored Dec 30, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    58ea8f9 View commit details
  8. Verified

    This commit was signed with the committer’s verified signature.
    Gabixel Gabriel
    Copy the full SHA
    922b6cc View commit details

Commits on Dec 31, 2023

  1. Merge pull request #26235 from frenzibyte/fix-argon-miss-judgement-mania

    Fix argon miss judgement on mania placed on a different position
    smoogipoo authored Dec 31, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    8a40fa5 View commit details
  2. Merge pull request #26276 from Gabixel/update-user-profile-interests-…

    …icon
    
    Fix interests icon no longer visible in user profile
    peppy authored Dec 31, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    0834f0b View commit details
  3. Merge pull request #26267 from frenzibyte/fix-audio-offset-adjust-con…

    …trol
    
    Fix suggested value in audio offset adjust control being opposite in signs
    peppy authored Dec 31, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    68b1455 View commit details
  4. Merge pull request #26201 from iminlikewithyou/menu-button-tweaks

    Adjust menu buttons
    peppy authored Dec 31, 2023

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    e107338 View commit details
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug-issue.yml
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ body:
- type: input
attributes:
label: Version
description: The version you encountered this bug on. This is shown at the bottom of the main menu and also at the end of the settings screen.
description: The version you encountered this bug on. This is shown at the end of the settings overlay.
validations:
required: true
- type: markdown
6 changes: 4 additions & 2 deletions osu.Game.Rulesets.Mania/Skinning/Argon/ArgonJudgementPiece.cs
Original file line number Diff line number Diff line change
@@ -19,6 +19,8 @@ namespace osu.Game.Rulesets.Mania.Skinning.Argon
{
public partial class ArgonJudgementPiece : JudgementPiece, IAnimatableJudgement
{
private const float judgement_y_position = 160;

private RingExplosion? ringExplosion;

[Resolved]
@@ -30,7 +32,7 @@ public ArgonJudgementPiece(HitResult result)
AutoSizeAxes = Axes.Both;

Origin = Anchor.Centre;
Y = 160;
Y = judgement_y_position;
}

[BackgroundDependencyLoader]
@@ -76,7 +78,7 @@ public virtual void PlayAnimation()
this.ScaleTo(1.6f);
this.ScaleTo(1, 100, Easing.In);

this.MoveTo(Vector2.Zero);
this.MoveToY(judgement_y_position);
this.MoveToOffset(new Vector2(0, 100), 800, Easing.InQuint);

this.RotateTo(0);
88 changes: 78 additions & 10 deletions osu.Game.Tests/Visual/Settings/TestSceneAudioOffsetAdjustControl.cs
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@

using NUnit.Framework;
using osu.Framework.Allocation;
using osu.Framework.Bindables;
using osu.Framework.Extensions.ObjectExtensions;
using osu.Framework.Graphics;
using osu.Framework.Graphics.Containers;
using osu.Framework.Utils;
@@ -25,9 +25,15 @@ public partial class TestSceneAudioOffsetAdjustControl : OsuTestScene
private Container content = null!;
protected override Container Content => content;

private OsuConfigManager localConfig = null!;
private AudioOffsetAdjustControl adjustControl = null!;

[BackgroundDependencyLoader]
private void load()
{
localConfig = new OsuConfigManager(LocalStorage);
Dependencies.CacheAs(localConfig);

base.Content.AddRange(new Drawable[]
{
tracker,
@@ -41,23 +47,85 @@ private void load()
});
}

[Test]
public void TestBehaviour()
[SetUp]
public void SetUp() => Schedule(() =>
{
AddStep("create control", () => Child = new AudioOffsetAdjustControl
Child = adjustControl = new AudioOffsetAdjustControl
{
Current = new BindableDouble
{
MinValue = -500,
MaxValue = 500
}
});
Current = localConfig.GetBindable<double>(OsuSetting.AudioOffset),
};

localConfig.SetValue(OsuSetting.AudioOffset, 0.0);
tracker.ClearHistory();
});

[Test]
public void TestDisplay()
{
AddStep("set new score", () => statics.SetValue(Static.LastLocalUserScore, new ScoreInfo
{
HitEvents = TestSceneHitEventTimingDistributionGraph.CreateDistributedHitEvents(RNG.NextDouble(-100, 100)),
BeatmapInfo = Beatmap.Value.BeatmapInfo,
}));
AddStep("clear history", () => tracker.ClearHistory());
}

[Test]
public void TestBehaviour()
{
AddStep("set score with -20ms", () => setScore(-20));
AddAssert("suggested global offset is 20ms", () => adjustControl.SuggestedOffset.Value, () => Is.EqualTo(20));
AddStep("clear history", () => tracker.ClearHistory());

AddStep("set score with 40ms", () => setScore(40));
AddAssert("suggested global offset is -40ms", () => adjustControl.SuggestedOffset.Value, () => Is.EqualTo(-40));
AddStep("clear history", () => tracker.ClearHistory());
}

[Test]
public void TestNonZeroGlobalOffset()
{
AddStep("set global offset to -20ms", () => localConfig.SetValue(OsuSetting.AudioOffset, -20.0));
AddStep("set score with -20ms", () => setScore(-20));
AddAssert("suggested global offset is 0ms", () => adjustControl.SuggestedOffset.Value, () => Is.EqualTo(0));
AddStep("clear history", () => tracker.ClearHistory());

AddStep("set global offset to 20ms", () => localConfig.SetValue(OsuSetting.AudioOffset, 20.0));
AddStep("set score with 40ms", () => setScore(40));
AddAssert("suggested global offset is -20ms", () => adjustControl.SuggestedOffset.Value, () => Is.EqualTo(-20));
AddStep("clear history", () => tracker.ClearHistory());
}

[Test]
public void TestMultiplePlays()
{
AddStep("set score with -20ms", () => setScore(-20));
AddStep("set score with -10ms", () => setScore(-10));
AddAssert("suggested global offset is 15ms", () => adjustControl.SuggestedOffset.Value, () => Is.EqualTo(15));
AddStep("clear history", () => tracker.ClearHistory());

AddStep("set score with -20ms", () => setScore(-20));
AddStep("set global offset to 30ms", () => localConfig.SetValue(OsuSetting.AudioOffset, 30.0));
AddStep("set score with 10ms", () => setScore(10));
AddAssert("suggested global offset is 20ms", () => adjustControl.SuggestedOffset.Value, () => Is.EqualTo(20));
AddStep("clear history", () => tracker.ClearHistory());
}

private void setScore(double averageHitError)
{
statics.SetValue(Static.LastLocalUserScore, new ScoreInfo
{
HitEvents = TestSceneHitEventTimingDistributionGraph.CreateDistributedHitEvents(averageHitError),
BeatmapInfo = Beatmap.Value.BeatmapInfo,
});
}

protected override void Dispose(bool isDisposing)
{
if (localConfig.IsNotNull())
localConfig.Dispose();

base.Dispose(isDisposing);
}
}
}
2 changes: 1 addition & 1 deletion osu.Game/Overlays/Profile/Header/BottomHeaderContainer.cs
Original file line number Diff line number Diff line change
@@ -145,7 +145,7 @@ private void updateDisplay(APIUser? user)
bool anyInfoAdded = false;

anyInfoAdded |= tryAddInfo(FontAwesome.Solid.MapMarker, user.Location);
anyInfoAdded |= tryAddInfo(OsuIcon.Heart, user.Interests);
anyInfoAdded |= tryAddInfo(FontAwesome.Solid.Heart, user.Interests);
anyInfoAdded |= tryAddInfo(FontAwesome.Solid.Suitcase, user.Occupation);

if (anyInfoAdded)
Original file line number Diff line number Diff line change
@@ -24,6 +24,8 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
{
public partial class AudioOffsetAdjustControl : SettingsItem<double>
{
public IBindable<double?> SuggestedOffset => ((AudioOffsetPreview)Control).SuggestedOffset;

[BackgroundDependencyLoader]
private void load()
{
@@ -44,7 +46,7 @@ public Bindable<double> Current

private readonly IBindableList<SessionAverageHitErrorTracker.DataPoint> averageHitErrorHistory = new BindableList<SessionAverageHitErrorTracker.DataPoint>();

private readonly Bindable<double?> suggestedOffset = new Bindable<double?>();
public readonly Bindable<double?> SuggestedOffset = new Bindable<double?>();

private Container<Box> notchContainer = null!;
private TextFlowContainer hintText = null!;
@@ -90,8 +92,8 @@ private void load(SessionAverageHitErrorTracker hitErrorTracker)
Text = "Apply suggested offset",
Action = () =>
{
if (suggestedOffset.Value.HasValue)
current.Value = suggestedOffset.Value.Value;
if (SuggestedOffset.Value.HasValue)
current.Value = SuggestedOffset.Value.Value;
hitErrorTracker.ClearHistory();
}
}
@@ -104,7 +106,7 @@ protected override void LoadComplete()
base.LoadComplete();

averageHitErrorHistory.BindCollectionChanged(updateDisplay, true);
suggestedOffset.BindValueChanged(_ => updateHintText(), true);
SuggestedOffset.BindValueChanged(_ => updateHintText(), true);
}

private void updateDisplay(object? _, NotifyCollectionChangedEventArgs e)
@@ -143,17 +145,17 @@ private void updateDisplay(object? _, NotifyCollectionChangedEventArgs e)
break;
}

suggestedOffset.Value = averageHitErrorHistory.Any() ? -averageHitErrorHistory.Average(dataPoint => dataPoint.SuggestedGlobalAudioOffset) : null;
SuggestedOffset.Value = averageHitErrorHistory.Any() ? averageHitErrorHistory.Average(dataPoint => dataPoint.SuggestedGlobalAudioOffset) : null;
}

private float getXPositionForOffset(double offset) => (float)(Math.Clamp(offset, current.MinValue, current.MaxValue) / (2 * current.MaxValue));

private void updateHintText()
{
hintText.Text = suggestedOffset.Value == null
hintText.Text = SuggestedOffset.Value == null
? @"Play a few beatmaps to receive a suggested offset!"
: $@"Based on the last {averageHitErrorHistory.Count} play(s), the suggested offset is {suggestedOffset.Value:N0} ms.";
applySuggestion.Enabled.Value = suggestedOffset.Value != null;
: $@"Based on the last {averageHitErrorHistory.Count} play(s), the suggested offset is {SuggestedOffset.Value:N0} ms.";
applySuggestion.Enabled.Value = SuggestedOffset.Value != null;
}
}
}
17 changes: 11 additions & 6 deletions osu.Game/Screens/Menu/MainMenuButton.cs
Original file line number Diff line number Diff line change
@@ -31,6 +31,9 @@ namespace osu.Game.Screens.Menu
/// </summary>
public partial class MainMenuButton : BeatSyncedContainer, IStateful<ButtonState>
{
public const float BOUNCE_COMPRESSION = 0.9f;
public const float HOVER_SCALE = 1.2f;
public const float BOUNCE_ROTATION = 8;
public event Action<ButtonState>? StateChanged;

public readonly Key[] TriggerKeys;
@@ -125,8 +128,9 @@ public MainMenuButton(LocalisableString text, string sampleName, IconUsage symbo
Shadow = true,
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Size = new Vector2(30),
Size = new Vector2(32),
Position = new Vector2(0, 0),
Margin = new MarginPadding { Top = -4 },
Icon = symbol
},
new OsuSpriteText
@@ -136,6 +140,7 @@ public MainMenuButton(LocalisableString text, string sampleName, IconUsage symbo
Anchor = Anchor.Centre,
Origin = Anchor.Centre,
Position = new Vector2(0, 35),
Margin = new MarginPadding { Left = -3 },
Text = text
}
}
@@ -153,14 +158,14 @@ protected override void OnNewBeat(int beatIndex, TimingControlPoint timingPoint,

double duration = timingPoint.BeatLength / 2;

icon.RotateTo(rightward ? 10 : -10, duration * 2, Easing.InOutSine);
icon.RotateTo(rightward ? BOUNCE_ROTATION : -BOUNCE_ROTATION, duration * 2, Easing.InOutSine);

icon.Animate(
i => i.MoveToY(-10, duration, Easing.Out),
i => i.ScaleTo(1, duration, Easing.Out)
i => i.ScaleTo(HOVER_SCALE, duration, Easing.Out)
).Then(
i => i.MoveToY(0, duration, Easing.In),
i => i.ScaleTo(new Vector2(1, 0.9f), duration, Easing.In)
i => i.ScaleTo(new Vector2(HOVER_SCALE, HOVER_SCALE * BOUNCE_COMPRESSION), duration, Easing.In)
);

rightward = !rightward;
@@ -177,8 +182,8 @@ protected override bool OnHover(HoverEvent e)
double duration = TimeUntilNextBeat;

icon.ClearTransforms();
icon.RotateTo(rightward ? -10 : 10, duration, Easing.InOutSine);
icon.ScaleTo(new Vector2(1, 0.9f), duration, Easing.Out);
icon.RotateTo(rightward ? -BOUNCE_ROTATION : BOUNCE_ROTATION, duration, Easing.InOutSine);
icon.ScaleTo(new Vector2(HOVER_SCALE, HOVER_SCALE * BOUNCE_COMPRESSION), duration, Easing.Out);
return true;
}