mirror of
https://github.com/ppy/osu
synced 2025-01-04 13:22:08 +00:00
Merge branch 'master' into s-rank-change
This commit is contained in:
commit
5bae9074aa
@ -65,14 +65,15 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon
|
||||
if (Result == HitResult.IgnoreMiss || Result == HitResult.LargeTickMiss)
|
||||
{
|
||||
this.RotateTo(-45);
|
||||
this.ScaleTo(1.8f);
|
||||
this.ScaleTo(1.6f);
|
||||
this.ScaleTo(1.2f, 100, Easing.In);
|
||||
|
||||
this.MoveTo(Vector2.Zero);
|
||||
this.MoveToOffset(new Vector2(0, 10), 800, Easing.InQuint);
|
||||
this.FadeOutFromOne(400);
|
||||
}
|
||||
else if (Result.IsMiss())
|
||||
{
|
||||
this.FadeOutFromOne(800);
|
||||
|
||||
this.ScaleTo(1.6f);
|
||||
this.ScaleTo(1, 100, Easing.In);
|
||||
|
||||
@ -84,14 +85,14 @@ namespace osu.Game.Rulesets.Osu.Skinning.Argon
|
||||
}
|
||||
else
|
||||
{
|
||||
this.FadeOutFromOne(800);
|
||||
|
||||
JudgementText
|
||||
.FadeInFromZero(300, Easing.OutQuint)
|
||||
.ScaleTo(Vector2.One)
|
||||
.ScaleTo(new Vector2(1.2f), 1800, Easing.OutQuint);
|
||||
}
|
||||
|
||||
this.FadeOutFromOne(800);
|
||||
|
||||
ringExplosion?.PlayAnimation();
|
||||
}
|
||||
|
||||
|
@ -1,7 +1,6 @@
|
||||
// Copyright (c) ppy Pty Ltd <contact@ppy.sh>. Licensed under the MIT Licence.
|
||||
// See the LICENCE file in the repository root for full licence text.
|
||||
|
||||
using System;
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
@ -153,16 +152,12 @@ namespace osu.Game.Rulesets.Taiko.Skinning.Legacy
|
||||
|
||||
if (target != null)
|
||||
{
|
||||
const float alpha_amount = 1;
|
||||
|
||||
const float down_time = 80;
|
||||
const float up_time = 50;
|
||||
|
||||
target.Animate(
|
||||
t => t.FadeTo(Math.Min(target.Alpha + alpha_amount, 1), down_time)
|
||||
).Then(
|
||||
t => t.FadeOut(up_time)
|
||||
);
|
||||
target
|
||||
.FadeTo(1, down_time * (1 - target.Alpha), Easing.Out)
|
||||
.Delay(100).FadeOut(up_time);
|
||||
}
|
||||
|
||||
return false;
|
||||
|
@ -10,9 +10,9 @@ namespace osu.Game.Localisation
|
||||
private const string prefix = @"osu.Game.Resources.Localisation.BeatmapOffsetControl";
|
||||
|
||||
/// <summary>
|
||||
/// "Beatmap offset"
|
||||
/// "Audio offset (this beatmap)"
|
||||
/// </summary>
|
||||
public static LocalisableString BeatmapOffset => new TranslatableString(getKey(@"beatmap_offset"), @"Beatmap offset");
|
||||
public static LocalisableString AudioOffsetThisBeatmap => new TranslatableString(getKey(@"beatmap_offset"), @"Audio offset (this beatmap)");
|
||||
|
||||
/// <summary>
|
||||
/// "Previous play:"
|
||||
|
@ -12,12 +12,14 @@ using osu.Framework.Graphics;
|
||||
using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Shapes;
|
||||
using osu.Framework.Graphics.UserInterface;
|
||||
using osu.Framework.Localisation;
|
||||
using osu.Game.Configuration;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Graphics.UserInterface;
|
||||
using osu.Game.Graphics.UserInterfaceV2;
|
||||
using osu.Game.Localisation;
|
||||
using osu.Game.Screens.Play.PlayerSettings;
|
||||
using osuTK;
|
||||
|
||||
namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
@ -67,7 +69,7 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
Direction = FillDirection.Vertical,
|
||||
Children = new Drawable[]
|
||||
{
|
||||
new TimeSlider
|
||||
new OffsetSliderBar
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
Current = { BindTarget = Current },
|
||||
@ -157,6 +159,11 @@ namespace osu.Game.Overlays.Settings.Sections.Audio
|
||||
: $@"Based on the last {averageHitErrorHistory.Count} play(s), the suggested offset is {SuggestedOffset.Value:N0} ms.";
|
||||
applySuggestion.Enabled.Value = SuggestedOffset.Value != null;
|
||||
}
|
||||
|
||||
private partial class OffsetSliderBar : RoundedSliderBar<double>
|
||||
{
|
||||
public override LocalisableString TooltipText => BeatmapOffsetControl.GetOffsetExplanatoryText(Current.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -45,13 +45,14 @@ namespace osu.Game.Rulesets.Judgements
|
||||
if (Result == HitResult.IgnoreMiss || Result == HitResult.LargeTickMiss)
|
||||
{
|
||||
this.RotateTo(-45);
|
||||
this.ScaleTo(1.8f);
|
||||
this.ScaleTo(1.6f);
|
||||
this.ScaleTo(1.2f, 100, Easing.In);
|
||||
|
||||
this.MoveTo(Vector2.Zero);
|
||||
this.MoveToOffset(new Vector2(0, 10), 800, Easing.InQuint);
|
||||
this.FadeOutFromOne(400);
|
||||
return;
|
||||
}
|
||||
else if (Result.IsMiss())
|
||||
|
||||
if (Result.IsMiss())
|
||||
{
|
||||
this.ScaleTo(1.6f);
|
||||
this.ScaleTo(1, 100, Easing.In);
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Framework.Threading;
|
||||
using osu.Framework.Utils;
|
||||
using osu.Game.Graphics;
|
||||
using osu.Game.Skinning;
|
||||
@ -43,8 +44,6 @@ namespace osu.Game.Screens.Menu
|
||||
|
||||
private const double shoot_duration = 800;
|
||||
|
||||
protected override bool CanSpawnParticles => lastShootTime != null && Time.Current - lastShootTime < shoot_duration;
|
||||
|
||||
[Resolved]
|
||||
private ISkinSource skin { get; set; } = null!;
|
||||
|
||||
@ -57,7 +56,6 @@ namespace osu.Game.Screens.Menu
|
||||
private void load(TextureStore textures)
|
||||
{
|
||||
Texture = skin.GetTexture("Menu/fountain-star") ?? textures.Get("Menu/fountain-star");
|
||||
Active.Value = true;
|
||||
}
|
||||
|
||||
protected override FallingParticle CreateParticle()
|
||||
@ -81,8 +79,15 @@ namespace osu.Game.Screens.Menu
|
||||
return lastShootDirection * x_velocity_from_direction * (float)(1 - 2 * (Clock.CurrentTime - lastShootTime!.Value) / shoot_duration) + getRandomVariance(x_velocity_random_variance);
|
||||
}
|
||||
|
||||
private ScheduledDelegate? deactivateDelegate;
|
||||
|
||||
public void Shoot(int direction)
|
||||
{
|
||||
Active.Value = true;
|
||||
|
||||
deactivateDelegate?.Cancel();
|
||||
deactivateDelegate = Scheduler.AddDelayed(() => Active.Value = false, shoot_duration);
|
||||
|
||||
lastShootTime = Clock.CurrentTime;
|
||||
lastShootDirection = direction;
|
||||
}
|
||||
|
@ -40,8 +40,6 @@ namespace osu.Game.Screens.OnlinePlay.Lounge
|
||||
{
|
||||
public override string Title => "Lounge";
|
||||
|
||||
protected override bool PlayExitSound => false;
|
||||
|
||||
protected override BackgroundScreen CreateBackground() => new LoungeBackgroundScreen
|
||||
{
|
||||
SelectedRoom = { BindTarget = SelectedRoom }
|
||||
|
@ -44,8 +44,6 @@ namespace osu.Game.Screens.OnlinePlay.Multiplayer
|
||||
|
||||
public override string ShortTitle => "room";
|
||||
|
||||
protected override bool PlayExitSound => !exitConfirmed;
|
||||
|
||||
[Resolved]
|
||||
private MultiplayerClient client { get; set; }
|
||||
|
||||
|
@ -13,6 +13,8 @@ namespace osu.Game.Screens.OnlinePlay
|
||||
|
||||
public virtual string ShortTitle => Title;
|
||||
|
||||
protected sealed override bool PlayExitSound => false;
|
||||
|
||||
[Resolved]
|
||||
protected IRoomManager? RoomManager { get; private set; }
|
||||
|
||||
|
@ -223,7 +223,12 @@ namespace osu.Game.Screens
|
||||
|
||||
public override bool OnExiting(ScreenExitEvent e)
|
||||
{
|
||||
if (ValidForResume && PlayExitSound)
|
||||
// Only play the exit sound if we are the last screen in the exit sequence.
|
||||
// This stops many sample playbacks from stacking when a huge screen purge happens (ie. returning to menu via the home button
|
||||
// from a deeply nested screen).
|
||||
bool arrivingAtFinalDestination = e.Next == e.Destination;
|
||||
|
||||
if (ValidForResume && PlayExitSound && arrivingAtFinalDestination)
|
||||
sampleExit?.Play();
|
||||
|
||||
if (ValidForResume && logo != null)
|
||||
|
@ -99,6 +99,9 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
private readonly SkinComponentsContainer mainComponents;
|
||||
|
||||
[CanBeNull]
|
||||
private readonly SkinComponentsContainer rulesetComponents;
|
||||
|
||||
/// <summary>
|
||||
/// A flow which sits at the left side of the screen to house leaderboard (and related) components.
|
||||
/// Will automatically be positioned to avoid colliding with top scoring elements.
|
||||
@ -111,7 +114,6 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
public HUDOverlay([CanBeNull] DrawableRuleset drawableRuleset, IReadOnlyList<Mod> mods, bool alwaysShowLeaderboard = true)
|
||||
{
|
||||
Drawable rulesetComponents;
|
||||
this.drawableRuleset = drawableRuleset;
|
||||
this.mods = mods;
|
||||
|
||||
@ -125,8 +127,8 @@ namespace osu.Game.Screens.Play
|
||||
clicksPerSecondController = new ClicksPerSecondController(),
|
||||
InputCountController = new InputCountController(),
|
||||
mainComponents = new HUDComponentsContainer { AlwaysPresent = true, },
|
||||
rulesetComponents = drawableRuleset != null
|
||||
? new HUDComponentsContainer(drawableRuleset.Ruleset.RulesetInfo) { AlwaysPresent = true, }
|
||||
drawableRuleset != null
|
||||
? (rulesetComponents = new HUDComponentsContainer(drawableRuleset.Ruleset.RulesetInfo) { AlwaysPresent = true, })
|
||||
: Empty(),
|
||||
playfieldComponents = drawableRuleset != null
|
||||
? new SkinComponentsContainer(new SkinComponentsContainerLookup(SkinComponentsContainerLookup.TargetArea.Playfield, drawableRuleset.Ruleset.RulesetInfo)) { AlwaysPresent = true, }
|
||||
@ -170,7 +172,10 @@ namespace osu.Game.Screens.Play
|
||||
},
|
||||
};
|
||||
|
||||
hideTargets = new List<Drawable> { mainComponents, rulesetComponents, playfieldComponents, topRightElements };
|
||||
hideTargets = new List<Drawable> { mainComponents, playfieldComponents, topRightElements };
|
||||
|
||||
if (rulesetComponents != null)
|
||||
hideTargets.Add(rulesetComponents);
|
||||
|
||||
if (!alwaysShowLeaderboard)
|
||||
hideTargets.Add(LeaderboardFlow);
|
||||
@ -256,13 +261,37 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
// LINQ cast can be removed when IDrawable interface includes Anchor / RelativeSizeAxes.
|
||||
foreach (var element in mainComponents.Components.Cast<Drawable>())
|
||||
processDrawable(element);
|
||||
|
||||
if (rulesetComponents != null)
|
||||
{
|
||||
foreach (var element in rulesetComponents.Components.Cast<Drawable>())
|
||||
processDrawable(element);
|
||||
}
|
||||
|
||||
if (lowestTopScreenSpaceRight.HasValue)
|
||||
topRightElements.Y = MathHelper.Clamp(ToLocalSpace(new Vector2(0, lowestTopScreenSpaceRight.Value)).Y, 0, DrawHeight - topRightElements.DrawHeight);
|
||||
else
|
||||
topRightElements.Y = 0;
|
||||
|
||||
if (lowestTopScreenSpaceLeft.HasValue)
|
||||
LeaderboardFlow.Y = MathHelper.Clamp(ToLocalSpace(new Vector2(0, lowestTopScreenSpaceLeft.Value)).Y, 0, DrawHeight - LeaderboardFlow.DrawHeight);
|
||||
else
|
||||
LeaderboardFlow.Y = 0;
|
||||
|
||||
if (highestBottomScreenSpace.HasValue)
|
||||
bottomRightElements.Y = BottomScoringElementsHeight = -MathHelper.Clamp(DrawHeight - ToLocalSpace(highestBottomScreenSpace.Value).Y, 0, DrawHeight - bottomRightElements.DrawHeight);
|
||||
else
|
||||
bottomRightElements.Y = 0;
|
||||
|
||||
void processDrawable(Drawable element)
|
||||
{
|
||||
// for now align some top components with the bottom-edge of the lowest top-anchored hud element.
|
||||
if (element.Anchor.HasFlagFast(Anchor.y0))
|
||||
{
|
||||
// health bars are excluded for the sake of hacky legacy skins which extend the health bar to take up the full screen area.
|
||||
if (element is LegacyHealthDisplay)
|
||||
continue;
|
||||
return;
|
||||
|
||||
float bottom = element.ScreenSpaceDrawQuad.BottomRight.Y;
|
||||
|
||||
@ -288,21 +317,6 @@ namespace osu.Game.Screens.Play
|
||||
highestBottomScreenSpace = topLeft;
|
||||
}
|
||||
}
|
||||
|
||||
if (lowestTopScreenSpaceRight.HasValue)
|
||||
topRightElements.Y = MathHelper.Clamp(ToLocalSpace(new Vector2(0, lowestTopScreenSpaceRight.Value)).Y, 0, DrawHeight - topRightElements.DrawHeight);
|
||||
else
|
||||
topRightElements.Y = 0;
|
||||
|
||||
if (lowestTopScreenSpaceLeft.HasValue)
|
||||
LeaderboardFlow.Y = MathHelper.Clamp(ToLocalSpace(new Vector2(0, lowestTopScreenSpaceLeft.Value)).Y, 0, DrawHeight - LeaderboardFlow.DrawHeight);
|
||||
else
|
||||
LeaderboardFlow.Y = 0;
|
||||
|
||||
if (highestBottomScreenSpace.HasValue)
|
||||
bottomRightElements.Y = BottomScoringElementsHeight = -MathHelper.Clamp(DrawHeight - ToLocalSpace(highestBottomScreenSpace.Value).Y, 0, DrawHeight - bottomRightElements.DrawHeight);
|
||||
else
|
||||
bottomRightElements.Y = 0;
|
||||
}
|
||||
|
||||
private void updateVisibility()
|
||||
|
@ -86,7 +86,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
||||
new OffsetSliderBar
|
||||
{
|
||||
KeyboardStep = 5,
|
||||
LabelText = BeatmapOffsetControlStrings.BeatmapOffset,
|
||||
LabelText = BeatmapOffsetControlStrings.AudioOffsetThisBeatmap,
|
||||
Current = Current,
|
||||
},
|
||||
referenceScoreContainer = new FillFlowContainer
|
||||
@ -307,7 +307,7 @@ namespace osu.Game.Screens.Play.PlayerSettings
|
||||
}
|
||||
}
|
||||
|
||||
public partial class OffsetSliderBar : PlayerSliderBar<double>
|
||||
private partial class OffsetSliderBar : PlayerSliderBar<double>
|
||||
{
|
||||
protected override Drawable CreateControl() => new CustomSliderBar();
|
||||
|
||||
|
@ -107,11 +107,11 @@ namespace osu.Game.Screens.Play
|
||||
return true;
|
||||
|
||||
case GlobalAction.SeekReplayBackward:
|
||||
SeekInDirection(-1);
|
||||
SeekInDirection(-5);
|
||||
return true;
|
||||
|
||||
case GlobalAction.SeekReplayForward:
|
||||
SeekInDirection(1);
|
||||
SeekInDirection(5);
|
||||
return true;
|
||||
|
||||
case GlobalAction.TogglePauseReplay:
|
||||
|
@ -63,14 +63,10 @@ namespace osu.Game.Skinning
|
||||
// missed ticks / slider end don't get the normal animation.
|
||||
if (isMissedTick())
|
||||
{
|
||||
this.ScaleTo(1.6f);
|
||||
this.ScaleTo(1, 100, Easing.In);
|
||||
this.ScaleTo(1.2f);
|
||||
this.ScaleTo(1f, 100, Easing.In);
|
||||
|
||||
if (legacyVersion > 1.0m)
|
||||
{
|
||||
this.MoveTo(new Vector2(0, -2f));
|
||||
this.MoveToOffset(new Vector2(0, 10), fade_out_delay + fade_out_length, Easing.In);
|
||||
}
|
||||
this.FadeOutFromOne(400);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user