mirror of
https://github.com/osukey/osukey.git
synced 2025-08-03 14:46:38 +09:00
Create a LargeTextureStore for cached (but not atlased) global textures
Also - Fixes first transition depth being incorrect. - Improves smoothness of transitions (and adds a slight delay to offset from screen switches).
This commit is contained in:
@ -3,6 +3,7 @@
|
||||
|
||||
using osu.Framework.Allocation;
|
||||
using osu.Framework.Graphics;
|
||||
using osu.Framework.Threading;
|
||||
using osu.Game.Graphics.Backgrounds;
|
||||
|
||||
namespace osu.Game.Screens.Backgrounds
|
||||
@ -24,16 +25,22 @@ namespace osu.Game.Screens.Backgrounds
|
||||
|
||||
private void display(Background newBackground)
|
||||
{
|
||||
current?.FadeOut(800, Easing.OutQuint);
|
||||
current?.FadeOut(800, Easing.InOutSine);
|
||||
current?.Expire();
|
||||
|
||||
Add(current = newBackground);
|
||||
currentDisplay++;
|
||||
}
|
||||
|
||||
private ScheduledDelegate nextTask;
|
||||
|
||||
public void Next()
|
||||
{
|
||||
currentDisplay++;
|
||||
LoadComponentAsync(new Background(backgroundName) { Depth = currentDisplay }, display);
|
||||
nextTask?.Cancel();
|
||||
nextTask = Scheduler.AddDelayed(() =>
|
||||
{
|
||||
LoadComponentAsync(new Background(backgroundName) { Depth = currentDisplay }, display);
|
||||
}, 100);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user