mirror of
https://github.com/ppy/osu
synced 2025-01-31 02:12:03 +00:00
Merge branch 'master' into pause-via-inactive
This commit is contained in:
commit
c878d814f6
@ -134,9 +134,9 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
|
||||
DetailsVisible.BindValueChanged(visible =>
|
||||
{
|
||||
hiddenDetailContainer.Alpha = visible.NewValue ? 0 : 1;
|
||||
expandedDetailContainer.Alpha = visible.NewValue ? 1 : 0;
|
||||
}, true);
|
||||
hiddenDetailContainer.FadeTo(visible.NewValue ? 0 : 1, 200, Easing.OutQuint);
|
||||
expandedDetailContainer.FadeTo(visible.NewValue ? 1 : 0, 200, Easing.OutQuint);
|
||||
});
|
||||
|
||||
User.BindValueChanged(user => updateDisplay(user.NewValue));
|
||||
}
|
||||
|
@ -26,14 +26,40 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
private OverlinedInfoContainer ppInfo;
|
||||
private OverlinedInfoContainer detailGlobalRank;
|
||||
private OverlinedInfoContainer detailCountryRank;
|
||||
private FillFlowContainer fillFlow;
|
||||
private RankGraph rankGraph;
|
||||
|
||||
public readonly Bindable<User> User = new Bindable<User>();
|
||||
|
||||
private bool expanded = true;
|
||||
|
||||
public bool Expanded
|
||||
{
|
||||
set
|
||||
{
|
||||
if (expanded == value) return;
|
||||
|
||||
expanded = value;
|
||||
|
||||
if (fillFlow == null) return;
|
||||
|
||||
fillFlow.ClearTransforms();
|
||||
|
||||
if (expanded)
|
||||
fillFlow.AutoSizeAxes = Axes.Y;
|
||||
else
|
||||
{
|
||||
fillFlow.AutoSizeAxes = Axes.None;
|
||||
fillFlow.ResizeHeightTo(0, 200, Easing.OutQuint);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(OsuColour colours)
|
||||
{
|
||||
AutoSizeAxes = Axes.Y;
|
||||
|
||||
User.ValueChanged += e => updateDisplay(e.NewValue);
|
||||
|
||||
InternalChildren = new Drawable[]
|
||||
@ -43,10 +69,13 @@ namespace osu.Game.Overlays.Profile.Header
|
||||
RelativeSizeAxes = Axes.Both,
|
||||
Colour = colours.CommunityUserGrayGreenDarkest,
|
||||
},
|
||||
new FillFlowContainer
|
||||
fillFlow = new FillFlowContainer
|
||||
{
|
||||
RelativeSizeAxes = Axes.X,
|
||||
AutoSizeAxes = Axes.Y,
|
||||
AutoSizeAxes = expanded ? Axes.Y : Axes.None,
|
||||
AutoSizeDuration = 200,
|
||||
AutoSizeEasing = Easing.OutQuint,
|
||||
Masking = true,
|
||||
Padding = new MarginPadding { Horizontal = UserProfileOverlay.CONTENT_X_MARGIN, Vertical = 10 },
|
||||
Direction = FillDirection.Vertical,
|
||||
Spacing = new Vector2(0, 20),
|
||||
|
@ -117,7 +117,7 @@ namespace osu.Game.Overlays.Profile
|
||||
infoTabControl.AddItem("Info");
|
||||
infoTabControl.AddItem("Modding");
|
||||
|
||||
centreHeaderContainer.DetailsVisible.BindValueChanged(visible => detailHeaderContainer.Alpha = visible.NewValue ? 1 : 0, true);
|
||||
centreHeaderContainer.DetailsVisible.BindValueChanged(visible => detailHeaderContainer.Expanded = visible.NewValue, true);
|
||||
User.ValueChanged += e => updateDisplay(e.NewValue);
|
||||
}
|
||||
|
||||
|
@ -206,7 +206,7 @@ namespace osu.Game.Screens.Multi.Match
|
||||
if (Beatmap.Value != beatmapManager.DefaultBeatmap)
|
||||
return;
|
||||
|
||||
if (Beatmap.Value == null)
|
||||
if (CurrentItem.Value == null)
|
||||
return;
|
||||
|
||||
// Try to retrieve the corresponding local beatmap
|
||||
|
@ -59,6 +59,8 @@ namespace osu.Game.Screens
|
||||
|
||||
private SampleChannel sampleExit;
|
||||
|
||||
protected virtual bool PlayResumeSound => true;
|
||||
|
||||
public virtual float BackgroundParallaxAmount => 1;
|
||||
|
||||
public Bindable<WorkingBeatmap> Beatmap { get; private set; }
|
||||
@ -117,7 +119,8 @@ namespace osu.Game.Screens
|
||||
|
||||
public override void OnResuming(IScreen last)
|
||||
{
|
||||
sampleExit?.Play();
|
||||
if (PlayResumeSound)
|
||||
sampleExit?.Play();
|
||||
applyArrivingDefaults(true);
|
||||
|
||||
base.OnResuming(last);
|
||||
|
@ -44,6 +44,8 @@ namespace osu.Game.Screens.Play
|
||||
|
||||
public override bool DisallowExternalBeatmapRulesetChanges => true;
|
||||
|
||||
protected override bool PlayResumeSound => false;
|
||||
|
||||
private Task loadTask;
|
||||
|
||||
private InputManager inputManager;
|
||||
|
@ -38,6 +38,10 @@ namespace osu.Game.Screens.Play
|
||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;
|
||||
protected override bool BlockPositionalInput => false;
|
||||
|
||||
/// <summary>
|
||||
/// Displays a skip overlay, giving the user the ability to skip forward.
|
||||
/// </summary>
|
||||
/// <param name="startTime">The time at which gameplay begins to appear.</param>
|
||||
public SkipOverlay(double startTime)
|
||||
{
|
||||
this.startTime = startTime;
|
||||
@ -87,16 +91,21 @@ namespace osu.Game.Screens.Play
|
||||
};
|
||||
}
|
||||
|
||||
private const double skip_required_cutoff = 3000;
|
||||
/// <summary>
|
||||
/// Duration before gameplay start time required before skip button displays.
|
||||
/// </summary>
|
||||
private const double skip_buffer = 1000;
|
||||
|
||||
private const double fade_time = 300;
|
||||
|
||||
private double beginFadeTime => startTime - skip_required_cutoff - fade_time;
|
||||
private double beginFadeTime => startTime - fade_time;
|
||||
|
||||
protected override void LoadComplete()
|
||||
{
|
||||
base.LoadComplete();
|
||||
|
||||
if (startTime < skip_required_cutoff)
|
||||
// skip is not required if there is no extra "empty" time to skip.
|
||||
if (Clock.CurrentTime > beginFadeTime - skip_buffer)
|
||||
{
|
||||
Alpha = 0;
|
||||
Expire();
|
||||
@ -107,7 +116,7 @@ namespace osu.Game.Screens.Play
|
||||
using (BeginAbsoluteSequence(beginFadeTime))
|
||||
this.FadeOut(fade_time);
|
||||
|
||||
button.Action = () => RequestSeek?.Invoke(startTime - skip_required_cutoff - fade_time);
|
||||
button.Action = () => RequestSeek?.Invoke(beginFadeTime);
|
||||
|
||||
displayTime = Time.Current;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user