Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream'
Browse files Browse the repository at this point in the history
  • Loading branch information
jvyden committed Apr 17, 2021
2 parents 6773162 + 1832f62 commit 1e56f14
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
3 changes: 3 additions & 0 deletions osu.Game.Rulesets.Osu/Mods/OsuModBarrelRoll.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
// See the LICENCE file in the repository root for full licence text.

using osu.Framework.Bindables;
using osu.Framework.Extensions;
using osu.Framework.Graphics;
using osu.Game.Configuration;
using osu.Game.Rulesets.Mods;
Expand Down Expand Up @@ -30,6 +31,8 @@ public class OsuModBarrelRoll : Mod, IUpdatableByPlayfield, IApplicableToDrawabl
public override string Description => "The whole playfield is on a wheel!";
public override double ScoreMultiplier => 1;

public override string SettingDescription => $"{SpinSpeed.Value} rpm {Direction.Value.GetDescription().ToLowerInvariant()}";

public void Update(Playfield playfield)
{
playfield.Rotation = (Direction.Value == RotationDirection.CounterClockwise ? -1 : 1) * 360 * (float)(playfield.Time.Current / 60000 * SpinSpeed.Value);
Expand Down
9 changes: 9 additions & 0 deletions osu.Game.Tests/Visual/Components/TestSceneIdleTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,13 @@ public void TestNudge()
[Test]
public void TestMovement()
{
checkIdleStatus(1, false);
checkIdleStatus(2, false);
checkIdleStatus(3, false);
checkIdleStatus(4, false);

waitForAllIdle();

AddStep("move to top right", () => InputManager.MoveMouseTo(box2));

checkIdleStatus(1, true);
Expand All @@ -106,6 +113,8 @@ public void TestMovement()
[Test]
public void TestTimings()
{
waitForAllIdle();

AddStep("move to centre", () => InputManager.MoveMouseTo(Content));

checkIdleStatus(1, false);
Expand Down
6 changes: 6 additions & 0 deletions osu.Game/Input/IdleTracker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ public IdleTracker(double timeToIdle)
RelativeSizeAxes = Axes.Both;
}

protected override void LoadComplete()
{
base.LoadComplete();
updateLastInteractionTime();
}

protected override void Update()
{
base.Update();
Expand Down

0 comments on commit 1e56f14

Please sign in to comment.