mirror of
https://github.com/osukey/osukey.git
synced 2025-06-29 23:28:00 +09: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 =>
|
DetailsVisible.BindValueChanged(visible =>
|
||||||
{
|
{
|
||||||
hiddenDetailContainer.Alpha = visible.NewValue ? 0 : 1;
|
hiddenDetailContainer.FadeTo(visible.NewValue ? 0 : 1, 200, Easing.OutQuint);
|
||||||
expandedDetailContainer.Alpha = visible.NewValue ? 1 : 0;
|
expandedDetailContainer.FadeTo(visible.NewValue ? 1 : 0, 200, Easing.OutQuint);
|
||||||
}, true);
|
});
|
||||||
|
|
||||||
User.BindValueChanged(user => updateDisplay(user.NewValue));
|
User.BindValueChanged(user => updateDisplay(user.NewValue));
|
||||||
}
|
}
|
||||||
|
@ -26,14 +26,40 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
private OverlinedInfoContainer ppInfo;
|
private OverlinedInfoContainer ppInfo;
|
||||||
private OverlinedInfoContainer detailGlobalRank;
|
private OverlinedInfoContainer detailGlobalRank;
|
||||||
private OverlinedInfoContainer detailCountryRank;
|
private OverlinedInfoContainer detailCountryRank;
|
||||||
|
private FillFlowContainer fillFlow;
|
||||||
private RankGraph rankGraph;
|
private RankGraph rankGraph;
|
||||||
|
|
||||||
public readonly Bindable<User> User = new Bindable<User>();
|
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]
|
[BackgroundDependencyLoader]
|
||||||
private void load(OsuColour colours)
|
private void load(OsuColour colours)
|
||||||
{
|
{
|
||||||
AutoSizeAxes = Axes.Y;
|
AutoSizeAxes = Axes.Y;
|
||||||
|
|
||||||
User.ValueChanged += e => updateDisplay(e.NewValue);
|
User.ValueChanged += e => updateDisplay(e.NewValue);
|
||||||
|
|
||||||
InternalChildren = new Drawable[]
|
InternalChildren = new Drawable[]
|
||||||
@ -43,10 +69,13 @@ namespace osu.Game.Overlays.Profile.Header
|
|||||||
RelativeSizeAxes = Axes.Both,
|
RelativeSizeAxes = Axes.Both,
|
||||||
Colour = colours.CommunityUserGrayGreenDarkest,
|
Colour = colours.CommunityUserGrayGreenDarkest,
|
||||||
},
|
},
|
||||||
new FillFlowContainer
|
fillFlow = new FillFlowContainer
|
||||||
{
|
{
|
||||||
RelativeSizeAxes = Axes.X,
|
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 },
|
Padding = new MarginPadding { Horizontal = UserProfileOverlay.CONTENT_X_MARGIN, Vertical = 10 },
|
||||||
Direction = FillDirection.Vertical,
|
Direction = FillDirection.Vertical,
|
||||||
Spacing = new Vector2(0, 20),
|
Spacing = new Vector2(0, 20),
|
||||||
|
@ -117,7 +117,7 @@ namespace osu.Game.Overlays.Profile
|
|||||||
infoTabControl.AddItem("Info");
|
infoTabControl.AddItem("Info");
|
||||||
infoTabControl.AddItem("Modding");
|
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);
|
User.ValueChanged += e => updateDisplay(e.NewValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,7 +206,7 @@ namespace osu.Game.Screens.Multi.Match
|
|||||||
if (Beatmap.Value != beatmapManager.DefaultBeatmap)
|
if (Beatmap.Value != beatmapManager.DefaultBeatmap)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if (Beatmap.Value == null)
|
if (CurrentItem.Value == null)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Try to retrieve the corresponding local beatmap
|
// Try to retrieve the corresponding local beatmap
|
||||||
|
@ -59,6 +59,8 @@ namespace osu.Game.Screens
|
|||||||
|
|
||||||
private SampleChannel sampleExit;
|
private SampleChannel sampleExit;
|
||||||
|
|
||||||
|
protected virtual bool PlayResumeSound => true;
|
||||||
|
|
||||||
public virtual float BackgroundParallaxAmount => 1;
|
public virtual float BackgroundParallaxAmount => 1;
|
||||||
|
|
||||||
public Bindable<WorkingBeatmap> Beatmap { get; private set; }
|
public Bindable<WorkingBeatmap> Beatmap { get; private set; }
|
||||||
@ -117,7 +119,8 @@ namespace osu.Game.Screens
|
|||||||
|
|
||||||
public override void OnResuming(IScreen last)
|
public override void OnResuming(IScreen last)
|
||||||
{
|
{
|
||||||
sampleExit?.Play();
|
if (PlayResumeSound)
|
||||||
|
sampleExit?.Play();
|
||||||
applyArrivingDefaults(true);
|
applyArrivingDefaults(true);
|
||||||
|
|
||||||
base.OnResuming(last);
|
base.OnResuming(last);
|
||||||
|
@ -44,6 +44,8 @@ namespace osu.Game.Screens.Play
|
|||||||
|
|
||||||
public override bool DisallowExternalBeatmapRulesetChanges => true;
|
public override bool DisallowExternalBeatmapRulesetChanges => true;
|
||||||
|
|
||||||
|
protected override bool PlayResumeSound => false;
|
||||||
|
|
||||||
private Task loadTask;
|
private Task loadTask;
|
||||||
|
|
||||||
private InputManager inputManager;
|
private InputManager inputManager;
|
||||||
|
@ -38,6 +38,10 @@ namespace osu.Game.Screens.Play
|
|||||||
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;
|
public override bool ReceivePositionalInputAt(Vector2 screenSpacePos) => true;
|
||||||
protected override bool BlockPositionalInput => false;
|
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)
|
public SkipOverlay(double startTime)
|
||||||
{
|
{
|
||||||
this.startTime = 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 const double fade_time = 300;
|
||||||
|
|
||||||
private double beginFadeTime => startTime - skip_required_cutoff - fade_time;
|
private double beginFadeTime => startTime - fade_time;
|
||||||
|
|
||||||
protected override void LoadComplete()
|
protected override void LoadComplete()
|
||||||
{
|
{
|
||||||
base.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;
|
Alpha = 0;
|
||||||
Expire();
|
Expire();
|
||||||
@ -107,7 +116,7 @@ namespace osu.Game.Screens.Play
|
|||||||
using (BeginAbsoluteSequence(beginFadeTime))
|
using (BeginAbsoluteSequence(beginFadeTime))
|
||||||
this.FadeOut(fade_time);
|
this.FadeOut(fade_time);
|
||||||
|
|
||||||
button.Action = () => RequestSeek?.Invoke(startTime - skip_required_cutoff - fade_time);
|
button.Action = () => RequestSeek?.Invoke(beginFadeTime);
|
||||||
|
|
||||||
displayTime = Time.Current;
|
displayTime = Time.Current;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user