mirror of
https://github.com/ppy/osu.git
synced 2024-09-22 12:47:25 +08:00
Merge branch 'master' into first-run-behaviour-screen
This commit is contained in:
commit
4638dd97db
@ -123,7 +123,12 @@ namespace osu.Desktop
|
|||||||
tools.RemoveUninstallerRegistryEntry();
|
tools.RemoveUninstallerRegistryEntry();
|
||||||
}, onEveryRun: (version, tools, firstRun) =>
|
}, onEveryRun: (version, tools, firstRun) =>
|
||||||
{
|
{
|
||||||
tools.SetProcessAppUserModelId();
|
// While setting the `ProcessAppUserModelId` fixes duplicate icons/shortcuts on the taskbar, it currently
|
||||||
|
// causes the right-click context menu to function incorrectly.
|
||||||
|
//
|
||||||
|
// This may turn out to be non-required after an alternative solution is implemented.
|
||||||
|
// see https://github.com/clowd/Clowd.Squirrel/issues/24
|
||||||
|
// tools.SetProcessAppUserModelId();
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,9 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
|
|
||||||
protected override void AddCheckSteps()
|
protected override void AddCheckSteps()
|
||||||
{
|
{
|
||||||
|
AddUntilStep("player is playing", () => Player.LocalUserPlaying.Value);
|
||||||
AddUntilStep("wait for fail", () => Player.GameplayState.HasFailed);
|
AddUntilStep("wait for fail", () => Player.GameplayState.HasFailed);
|
||||||
|
AddAssert("player is not playing", () => !Player.LocalUserPlaying.Value);
|
||||||
AddUntilStep("wait for multiple judgements", () => ((FailPlayer)Player).ScoreProcessor.JudgedHits > 1);
|
AddUntilStep("wait for multiple judgements", () => ((FailPlayer)Player).ScoreProcessor.JudgedHits > 1);
|
||||||
AddAssert("total number of results == 1", () =>
|
AddAssert("total number of results == 1", () =>
|
||||||
{
|
{
|
||||||
|
@ -85,7 +85,10 @@ namespace osu.Game.Tests.Visual.Gameplay
|
|||||||
{
|
{
|
||||||
AddStep("move cursor outside", () => InputManager.MoveMouseTo(Player.ScreenSpaceDrawQuad.TopLeft - new Vector2(10)));
|
AddStep("move cursor outside", () => InputManager.MoveMouseTo(Player.ScreenSpaceDrawQuad.TopLeft - new Vector2(10)));
|
||||||
pauseAndConfirm();
|
pauseAndConfirm();
|
||||||
|
AddAssert("player not playing", () => !Player.LocalUserPlaying.Value);
|
||||||
|
|
||||||
resumeAndConfirm();
|
resumeAndConfirm();
|
||||||
|
AddUntilStep("player playing", () => Player.LocalUserPlaying.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
[Test]
|
[Test]
|
||||||
|
@ -108,7 +108,7 @@ namespace osu.Game.Graphics.UserInterface
|
|||||||
if (Enabled.Value)
|
if (Enabled.Value)
|
||||||
{
|
{
|
||||||
Debug.Assert(backgroundColour != null);
|
Debug.Assert(backgroundColour != null);
|
||||||
Background.FlashColour(backgroundColour.Value, 200);
|
Background.FlashColour(backgroundColour.Value.Lighten(0.4f), 200);
|
||||||
}
|
}
|
||||||
|
|
||||||
return base.OnClick(e);
|
return base.OnClick(e);
|
||||||
|
@ -375,13 +375,13 @@ namespace osu.Game.Rulesets.Scoring
|
|||||||
{
|
{
|
||||||
if (acc == 1)
|
if (acc == 1)
|
||||||
return ScoreRank.X;
|
return ScoreRank.X;
|
||||||
if (acc > 0.95)
|
if (acc >= 0.95)
|
||||||
return ScoreRank.S;
|
return ScoreRank.S;
|
||||||
if (acc > 0.9)
|
if (acc >= 0.9)
|
||||||
return ScoreRank.A;
|
return ScoreRank.A;
|
||||||
if (acc > 0.8)
|
if (acc >= 0.8)
|
||||||
return ScoreRank.B;
|
return ScoreRank.B;
|
||||||
if (acc > 0.7)
|
if (acc >= 0.7)
|
||||||
return ScoreRank.C;
|
return ScoreRank.C;
|
||||||
|
|
||||||
return ScoreRank.D;
|
return ScoreRank.D;
|
||||||
|
@ -66,7 +66,7 @@ namespace osu.Game.Screens.Play
|
|||||||
private readonly FillFlowContainer bottomRightElements;
|
private readonly FillFlowContainer bottomRightElements;
|
||||||
private readonly FillFlowContainer topRightElements;
|
private readonly FillFlowContainer topRightElements;
|
||||||
|
|
||||||
internal readonly IBindable<bool> IsBreakTime = new Bindable<bool>();
|
internal readonly IBindable<bool> IsPlaying = new Bindable<bool>();
|
||||||
|
|
||||||
private bool holdingForHUD;
|
private bool holdingForHUD;
|
||||||
|
|
||||||
@ -152,7 +152,7 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
ShowHud.BindValueChanged(visible => hideTargets.ForEach(d => d.FadeTo(visible.NewValue ? 1 : 0, FADE_DURATION, FADE_EASING)));
|
ShowHud.BindValueChanged(visible => hideTargets.ForEach(d => d.FadeTo(visible.NewValue ? 1 : 0, FADE_DURATION, FADE_EASING)));
|
||||||
|
|
||||||
IsBreakTime.BindValueChanged(_ => updateVisibility());
|
IsPlaying.BindValueChanged(_ => updateVisibility());
|
||||||
configVisibilityMode.BindValueChanged(_ => updateVisibility(), true);
|
configVisibilityMode.BindValueChanged(_ => updateVisibility(), true);
|
||||||
|
|
||||||
replayLoaded.BindValueChanged(replayLoadedValueChanged, true);
|
replayLoaded.BindValueChanged(replayLoadedValueChanged, true);
|
||||||
@ -218,7 +218,7 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
case HUDVisibilityMode.HideDuringGameplay:
|
case HUDVisibilityMode.HideDuringGameplay:
|
||||||
// always show during replay as we want the seek bar to be visible.
|
// always show during replay as we want the seek bar to be visible.
|
||||||
ShowHud.Value = replayLoaded.Value || IsBreakTime.Value;
|
ShowHud.Value = replayLoaded.Value || !IsPlaying.Value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case HUDVisibilityMode.Always:
|
case HUDVisibilityMode.Always:
|
||||||
|
@ -457,7 +457,7 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
private void updateGameplayState()
|
private void updateGameplayState()
|
||||||
{
|
{
|
||||||
bool inGameplay = !DrawableRuleset.HasReplayLoaded.Value && !DrawableRuleset.IsPaused.Value && !breakTracker.IsBreakTime.Value;
|
bool inGameplay = !DrawableRuleset.HasReplayLoaded.Value && !DrawableRuleset.IsPaused.Value && !breakTracker.IsBreakTime.Value && !GameplayState.HasFailed;
|
||||||
OverlayActivationMode.Value = inGameplay ? OverlayActivation.Disabled : OverlayActivation.UserTriggered;
|
OverlayActivationMode.Value = inGameplay ? OverlayActivation.Disabled : OverlayActivation.UserTriggered;
|
||||||
localUserPlaying.Value = inGameplay;
|
localUserPlaying.Value = inGameplay;
|
||||||
}
|
}
|
||||||
@ -812,6 +812,8 @@ namespace osu.Game.Screens.Play
|
|||||||
GameplayState.HasFailed = true;
|
GameplayState.HasFailed = true;
|
||||||
Score.ScoreInfo.Passed = false;
|
Score.ScoreInfo.Passed = false;
|
||||||
|
|
||||||
|
updateGameplayState();
|
||||||
|
|
||||||
// There is a chance that we could be in a paused state as the ruleset's internal clock (see FrameStabilityContainer)
|
// There is a chance that we could be in a paused state as the ruleset's internal clock (see FrameStabilityContainer)
|
||||||
// could process an extra frame after the GameplayClock is stopped.
|
// could process an extra frame after the GameplayClock is stopped.
|
||||||
// In such cases we want the fail state to precede a user triggered pause.
|
// In such cases we want the fail state to precede a user triggered pause.
|
||||||
@ -945,7 +947,7 @@ namespace osu.Game.Screens.Play
|
|||||||
failAnimationLayer.Background = b;
|
failAnimationLayer.Background = b;
|
||||||
});
|
});
|
||||||
|
|
||||||
HUDOverlay.IsBreakTime.BindTo(breakTracker.IsBreakTime);
|
HUDOverlay.IsPlaying.BindTo(localUserPlaying);
|
||||||
DimmableStoryboard.IsBreakTime.BindTo(breakTracker.IsBreakTime);
|
DimmableStoryboard.IsBreakTime.BindTo(breakTracker.IsBreakTime);
|
||||||
|
|
||||||
DimmableStoryboard.StoryboardReplacesBackground.BindTo(storyboardReplacesBackground);
|
DimmableStoryboard.StoryboardReplacesBackground.BindTo(storyboardReplacesBackground);
|
||||||
|
@ -212,12 +212,12 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
|
|||||||
Padding = new MarginPadding { Vertical = -15, Horizontal = -20 },
|
Padding = new MarginPadding { Vertical = -15, Horizontal = -20 },
|
||||||
Children = new[]
|
Children = new[]
|
||||||
{
|
{
|
||||||
new RankBadge(1f, getRank(ScoreRank.X)),
|
new RankBadge(1, getRank(ScoreRank.X)),
|
||||||
new RankBadge(0.95f, getRank(ScoreRank.S)),
|
new RankBadge(0.95, getRank(ScoreRank.S)),
|
||||||
new RankBadge(0.9f, getRank(ScoreRank.A)),
|
new RankBadge(0.9, getRank(ScoreRank.A)),
|
||||||
new RankBadge(0.8f, getRank(ScoreRank.B)),
|
new RankBadge(0.8, getRank(ScoreRank.B)),
|
||||||
new RankBadge(0.7f, getRank(ScoreRank.C)),
|
new RankBadge(0.7, getRank(ScoreRank.C)),
|
||||||
new RankBadge(0.35f, getRank(ScoreRank.D)),
|
new RankBadge(0.35, getRank(ScoreRank.D)),
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
rankText = new RankText(score.Rank)
|
rankText = new RankText(score.Rank)
|
||||||
|
@ -23,7 +23,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// The accuracy value corresponding to the <see cref="ScoreRank"/> displayed by this badge.
|
/// The accuracy value corresponding to the <see cref="ScoreRank"/> displayed by this badge.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public readonly float Accuracy;
|
public readonly double Accuracy;
|
||||||
|
|
||||||
private readonly ScoreRank rank;
|
private readonly ScoreRank rank;
|
||||||
|
|
||||||
@ -35,7 +35,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
|
|||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="accuracy">The accuracy value corresponding to <paramref name="rank"/>.</param>
|
/// <param name="accuracy">The accuracy value corresponding to <paramref name="rank"/>.</param>
|
||||||
/// <param name="rank">The <see cref="ScoreRank"/> to be displayed in this <see cref="RankBadge"/>.</param>
|
/// <param name="rank">The <see cref="ScoreRank"/> to be displayed in this <see cref="RankBadge"/>.</param>
|
||||||
public RankBadge(float accuracy, ScoreRank rank)
|
public RankBadge(double accuracy, ScoreRank rank)
|
||||||
{
|
{
|
||||||
Accuracy = accuracy;
|
Accuracy = accuracy;
|
||||||
this.rank = rank;
|
this.rank = rank;
|
||||||
@ -90,7 +90,7 @@ namespace osu.Game.Screens.Ranking.Expanded.Accuracy
|
|||||||
base.Update();
|
base.Update();
|
||||||
|
|
||||||
// Starts at -90deg (top) and moves counter-clockwise by the accuracy
|
// Starts at -90deg (top) and moves counter-clockwise by the accuracy
|
||||||
rankContainer.Position = circlePosition(-MathF.PI / 2 - (1 - Accuracy) * MathF.PI * 2);
|
rankContainer.Position = circlePosition(-MathF.PI / 2 - (1 - (float)Accuracy) * MathF.PI * 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
private Vector2 circlePosition(float t)
|
private Vector2 circlePosition(float t)
|
||||||
|
Loading…
Reference in New Issue
Block a user