mirror of
https://github.com/ppy/osu.git
synced 2024-11-13 20:47:26 +08:00
Slight reorder
This commit is contained in:
parent
fa6074925e
commit
175c20a104
@ -28,14 +28,17 @@ namespace osu.Game.Overlays
|
|||||||
private readonly ChangelogChart chart;
|
private readonly ChangelogChart chart;
|
||||||
private readonly ChangelogContent content;
|
private readonly ChangelogContent content;
|
||||||
|
|
||||||
private SampleChannel sampleBack;
|
|
||||||
|
|
||||||
private readonly Color4 purple = new Color4(191, 4, 255, 255);
|
private readonly Color4 purple = new Color4(191, 4, 255, 255);
|
||||||
|
|
||||||
|
private SampleChannel sampleBack;
|
||||||
|
|
||||||
private APIAccess api;
|
private APIAccess api;
|
||||||
|
|
||||||
private bool isAtListing;
|
private bool isAtListing;
|
||||||
|
|
||||||
|
// receive input outside our bounds so we can trigger a close event on ourselves.
|
||||||
|
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => true;
|
||||||
|
|
||||||
public ChangelogOverlay()
|
public ChangelogOverlay()
|
||||||
{
|
{
|
||||||
// these possibly need adjusting?
|
// these possibly need adjusting?
|
||||||
@ -89,8 +92,33 @@ namespace osu.Game.Overlays
|
|||||||
content.BuildSelected += onBuildSelected;
|
content.BuildSelected += onBuildSelected;
|
||||||
}
|
}
|
||||||
|
|
||||||
// receive input outside our bounds so we can trigger a close event on ourselves.
|
[BackgroundDependencyLoader]
|
||||||
public override bool ReceiveMouseInputAt(Vector2 screenSpacePos) => true;
|
private void load(APIAccess api, AudioManager audio)
|
||||||
|
{
|
||||||
|
this.api = api;
|
||||||
|
sampleBack = audio.Sample.Get(@"UI/generic-select-soft"); // @"UI/screen-back" feels non-fitting here
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void LoadComplete()
|
||||||
|
{
|
||||||
|
var req = new GetChangelogLatestBuildsRequest();
|
||||||
|
req.Success += badges.Populate;
|
||||||
|
api.Queue(req);
|
||||||
|
FetchAndShowListing();
|
||||||
|
base.LoadComplete();
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void PopIn()
|
||||||
|
{
|
||||||
|
base.PopIn();
|
||||||
|
FadeEdgeEffectTo(0.25f, WaveContainer.APPEAR_DURATION, Easing.In);
|
||||||
|
}
|
||||||
|
|
||||||
|
protected override void PopOut()
|
||||||
|
{
|
||||||
|
base.PopOut();
|
||||||
|
FadeEdgeEffectTo(0, WaveContainer.DISAPPEAR_DURATION, Easing.Out);
|
||||||
|
}
|
||||||
|
|
||||||
public override bool OnPressed(GlobalAction action)
|
public override bool OnPressed(GlobalAction action)
|
||||||
{
|
{
|
||||||
@ -110,38 +138,7 @@ namespace osu.Game.Overlays
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected override void PopIn()
|
private void onBuildSelected(APIChangelog build, EventArgs e) => FetchAndShowBuild(build);
|
||||||
{
|
|
||||||
base.PopIn();
|
|
||||||
FadeEdgeEffectTo(0.25f, WaveContainer.APPEAR_DURATION, Easing.In);
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void PopOut()
|
|
||||||
{
|
|
||||||
base.PopOut();
|
|
||||||
FadeEdgeEffectTo(0, WaveContainer.DISAPPEAR_DURATION, Easing.Out);
|
|
||||||
}
|
|
||||||
|
|
||||||
private void onBuildSelected(APIChangelog build, EventArgs e)
|
|
||||||
{
|
|
||||||
FetchAndShowBuild(build);
|
|
||||||
}
|
|
||||||
|
|
||||||
[BackgroundDependencyLoader]
|
|
||||||
private void load(APIAccess api, AudioManager audio)
|
|
||||||
{
|
|
||||||
this.api = api;
|
|
||||||
sampleBack = audio.Sample.Get(@"UI/generic-select-soft"); // @"UI/screen-back" feels non-fitting here
|
|
||||||
}
|
|
||||||
|
|
||||||
protected override void LoadComplete()
|
|
||||||
{
|
|
||||||
var req = new GetChangelogLatestBuildsRequest();
|
|
||||||
req.Success += badges.Populate;
|
|
||||||
api.Queue(req);
|
|
||||||
FetchAndShowListing();
|
|
||||||
base.LoadComplete();
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Fetches and shows changelog listing.
|
/// Fetches and shows changelog listing.
|
||||||
|
Loading…
Reference in New Issue
Block a user