mirror of
https://github.com/osukey/osukey.git
synced 2025-08-05 15:44:04 +09:00
Merge branch 'master' into low-hp-red-layer
This commit is contained in:
@ -41,7 +41,7 @@ namespace osu.Game.Screens.Play.HUD
|
||||
}
|
||||
}
|
||||
|
||||
protected readonly FillFlowContainer<ModIcon> IconsContainer;
|
||||
private readonly FillFlowContainer<ModIcon> iconsContainer;
|
||||
private readonly OsuSpriteText unrankedText;
|
||||
|
||||
public ModDisplay()
|
||||
@ -50,13 +50,12 @@ namespace osu.Game.Screens.Play.HUD
|
||||
|
||||
Children = new Drawable[]
|
||||
{
|
||||
IconsContainer = new ReverseChildIDFillFlowContainer<ModIcon>
|
||||
iconsContainer = new ReverseChildIDFillFlowContainer<ModIcon>
|
||||
{
|
||||
Anchor = Anchor.TopCentre,
|
||||
Origin = Anchor.TopCentre,
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Direction = FillDirection.Horizontal,
|
||||
Margin = new MarginPadding { Left = 10, Right = 10 },
|
||||
},
|
||||
unrankedText = new OsuSpriteText
|
||||
{
|
||||
@ -69,11 +68,11 @@ namespace osu.Game.Screens.Play.HUD
|
||||
|
||||
Current.ValueChanged += mods =>
|
||||
{
|
||||
IconsContainer.Clear();
|
||||
iconsContainer.Clear();
|
||||
|
||||
foreach (Mod mod in mods.NewValue)
|
||||
{
|
||||
IconsContainer.Add(new ModIcon(mod) { Scale = new Vector2(0.6f) });
|
||||
iconsContainer.Add(new ModIcon(mod) { Scale = new Vector2(0.6f) });
|
||||
}
|
||||
|
||||
if (IsLoaded)
|
||||
@ -92,7 +91,7 @@ namespace osu.Game.Screens.Play.HUD
|
||||
base.LoadComplete();
|
||||
|
||||
appearTransform();
|
||||
IconsContainer.FadeInFromZero(fade_duration, Easing.OutQuint);
|
||||
iconsContainer.FadeInFromZero(fade_duration, Easing.OutQuint);
|
||||
}
|
||||
|
||||
private void appearTransform()
|
||||
@ -104,20 +103,20 @@ namespace osu.Game.Screens.Play.HUD
|
||||
|
||||
expand();
|
||||
|
||||
using (IconsContainer.BeginDelayedSequence(1200))
|
||||
using (iconsContainer.BeginDelayedSequence(1200))
|
||||
contract();
|
||||
}
|
||||
|
||||
private void expand()
|
||||
{
|
||||
if (ExpansionMode != ExpansionMode.AlwaysContracted)
|
||||
IconsContainer.TransformSpacingTo(new Vector2(5, 0), 500, Easing.OutQuint);
|
||||
iconsContainer.TransformSpacingTo(new Vector2(5, 0), 500, Easing.OutQuint);
|
||||
}
|
||||
|
||||
private void contract()
|
||||
{
|
||||
if (ExpansionMode != ExpansionMode.AlwaysExpanded)
|
||||
IconsContainer.TransformSpacingTo(new Vector2(-25, 0), 500, Easing.OutQuint);
|
||||
iconsContainer.TransformSpacingTo(new Vector2(-25, 0), 500, Easing.OutQuint);
|
||||
}
|
||||
|
||||
protected override bool OnHover(HoverEvent e)
|
||||
|
@ -285,7 +285,7 @@ namespace osu.Game.Screens.Play
|
||||
Anchor = Anchor.TopRight,
|
||||
Origin = Anchor.TopRight,
|
||||
AutoSizeAxes = Axes.Both,
|
||||
Margin = new MarginPadding { Top = 20, Right = 10 },
|
||||
Margin = new MarginPadding { Top = 20, Right = 20 },
|
||||
};
|
||||
|
||||
protected virtual HitErrorDisplay CreateHitErrorDisplayOverlay() => new HitErrorDisplay(scoreProcessor, drawableRuleset?.FirstAvailableHitWindows);
|
||||
|
@ -177,7 +177,7 @@ namespace osu.Game.Screens.Play
|
||||
dependencies.CacheAs(gameplayBeatmap);
|
||||
|
||||
addUnderlayComponents(GameplayClockContainer);
|
||||
addGameplayComponents(GameplayClockContainer, Beatmap.Value);
|
||||
addGameplayComponents(GameplayClockContainer, Beatmap.Value, playableBeatmap);
|
||||
addOverlayComponents(GameplayClockContainer, Beatmap.Value);
|
||||
|
||||
DrawableRuleset.HasReplayLoaded.BindValueChanged(_ => updatePauseOnFocusLostState(), true);
|
||||
@ -218,13 +218,13 @@ namespace osu.Game.Screens.Play
|
||||
target.Add(DimmableStoryboard = new DimmableStoryboard(Beatmap.Value.Storyboard) { RelativeSizeAxes = Axes.Both });
|
||||
}
|
||||
|
||||
private void addGameplayComponents(Container target, WorkingBeatmap working)
|
||||
private void addGameplayComponents(Container target, WorkingBeatmap working, IBeatmap playableBeatmap)
|
||||
{
|
||||
var beatmapSkinProvider = new BeatmapSkinProvidingContainer(working.Skin);
|
||||
|
||||
// the beatmapSkinProvider is used as the fallback source here to allow the ruleset-specific skin implementation
|
||||
// full access to all skin sources.
|
||||
var rulesetSkinProvider = new SkinProvidingContainer(ruleset.CreateLegacySkinProvider(beatmapSkinProvider));
|
||||
var rulesetSkinProvider = new SkinProvidingContainer(ruleset.CreateLegacySkinProvider(beatmapSkinProvider, playableBeatmap));
|
||||
|
||||
// load the skinning hierarchy first.
|
||||
// this is intentionally done in two stages to ensure things are in a loaded state before exposing the ruleset to skin sources.
|
||||
|
@ -3,6 +3,7 @@
|
||||
|
||||
using osu.Framework.Screens;
|
||||
using osu.Game.Scoring;
|
||||
using osu.Game.Screens.Ranking;
|
||||
|
||||
namespace osu.Game.Screens.Play
|
||||
{
|
||||
@ -29,6 +30,8 @@ namespace osu.Game.Screens.Play
|
||||
this.Push(CreateResults(DrawableRuleset.ReplayScore.ScoreInfo));
|
||||
}
|
||||
|
||||
protected override ResultsScreen CreateResults(ScoreInfo score) => new ResultsScreen(score, false);
|
||||
|
||||
protected override ScoreInfo CreateScore() => score.ScoreInfo;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user