mirror of
https://github.com/ppy/osu
synced 2024-12-14 02:46:27 +00:00
Use HandleLink
to allow potentially opening wiki or otherwise
This commit is contained in:
parent
289e0f00f9
commit
481a251786
@ -11,7 +11,6 @@ using osu.Framework.Graphics.Containers;
|
||||
using osu.Framework.Graphics.Sprites;
|
||||
using osu.Framework.Graphics.Textures;
|
||||
using osu.Framework.Input.Events;
|
||||
using osu.Framework.Platform;
|
||||
using osu.Framework.Threading;
|
||||
using osu.Game.Graphics.Containers;
|
||||
using osu.Game.Online.API.Requests;
|
||||
@ -30,7 +29,7 @@ namespace osu.Game.Screens.Menu
|
||||
private ScheduledDelegate? openUrlAction;
|
||||
|
||||
[BackgroundDependencyLoader]
|
||||
private void load(GameHost? gameHost)
|
||||
private void load(OsuGame? game)
|
||||
{
|
||||
Anchor = Anchor.BottomCentre;
|
||||
Origin = Anchor.BottomCentre;
|
||||
@ -48,7 +47,7 @@ namespace osu.Game.Screens.Menu
|
||||
openUrlAction = Scheduler.AddDelayed(() =>
|
||||
{
|
||||
if (!string.IsNullOrEmpty(Current.Value?.Url))
|
||||
gameHost?.OpenUrlExternally(Current.Value.Url);
|
||||
game?.HandleLink(Current.Value.Url);
|
||||
}, 250);
|
||||
}
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user