mirror of
https://github.com/ppy/osu.git
synced 2025-01-06 09:03:01 +08:00
Randomise which menu content is shown on arriving at the menu
This commit is contained in:
parent
0ac0d6a11a
commit
0ddd3cbdc5
@ -13,6 +13,7 @@ using osu.Framework.Graphics.Sprites;
|
|||||||
using osu.Framework.Graphics.Textures;
|
using osu.Framework.Graphics.Textures;
|
||||||
using osu.Framework.Input.Events;
|
using osu.Framework.Input.Events;
|
||||||
using osu.Framework.Threading;
|
using osu.Framework.Threading;
|
||||||
|
using osu.Framework.Utils;
|
||||||
using osu.Game.Graphics.Containers;
|
using osu.Game.Graphics.Containers;
|
||||||
using osu.Game.Online.API.Requests;
|
using osu.Game.Online.API.Requests;
|
||||||
using osu.Game.Online.API.Requests.Responses;
|
using osu.Game.Online.API.Requests.Responses;
|
||||||
@ -111,7 +112,9 @@ namespace osu.Game.Screens.Menu
|
|||||||
|
|
||||||
content.AddRange(loaded);
|
content.AddRange(loaded);
|
||||||
|
|
||||||
displayIndex = -1;
|
// Many users don't spend much time at the main menu, so let's randomise where in the
|
||||||
|
// carousel of available images we start at to give each a fair chance.
|
||||||
|
displayIndex = RNG.Next(0, images.NewValue.Images.Length) - 1;
|
||||||
showNext();
|
showNext();
|
||||||
}, (cancellationTokenSource ??= new CancellationTokenSource()).Token);
|
}, (cancellationTokenSource ??= new CancellationTokenSource()).Token);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user