mirror of
https://github.com/osukey/osukey.git
synced 2025-06-10 05:48:05 +09:00
Remove placeholder methods in OsuGame
Let's add these when they can actually be implemented.
This commit is contained in:
parent
3892965894
commit
38c5434b82
@ -8,6 +8,8 @@ using System.Linq;
|
|||||||
using osu.Framework.Allocation;
|
using osu.Framework.Allocation;
|
||||||
using osu.Framework.Graphics.Sprites;
|
using osu.Framework.Graphics.Sprites;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
using osu.Game.Overlays;
|
||||||
|
using osu.Game.Overlays.Notifications;
|
||||||
|
|
||||||
namespace osu.Game.Graphics.Containers
|
namespace osu.Game.Graphics.Containers
|
||||||
{
|
{
|
||||||
@ -22,11 +24,19 @@ namespace osu.Game.Graphics.Containers
|
|||||||
|
|
||||||
private OsuGame game;
|
private OsuGame game;
|
||||||
|
|
||||||
|
private Action showNotImplementedError;
|
||||||
|
|
||||||
[BackgroundDependencyLoader(true)]
|
[BackgroundDependencyLoader(true)]
|
||||||
private void load(OsuGame game)
|
private void load(OsuGame game, NotificationOverlay notifications)
|
||||||
{
|
{
|
||||||
// will be null in tests
|
// will be null in tests
|
||||||
this.game = game;
|
this.game = game;
|
||||||
|
|
||||||
|
showNotImplementedError = () => notifications?.Post(new SimpleNotification
|
||||||
|
{
|
||||||
|
Text = @"This link type is not yet supported!",
|
||||||
|
Icon = FontAwesome.fa_life_saver,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
public void AddLinks(string text, List<Link> links)
|
public void AddLinks(string text, List<Link> links)
|
||||||
@ -72,14 +82,9 @@ namespace osu.Game.Graphics.Containers
|
|||||||
game?.OpenChannel(linkArgument);
|
game?.OpenChannel(linkArgument);
|
||||||
break;
|
break;
|
||||||
case LinkAction.OpenEditorTimestamp:
|
case LinkAction.OpenEditorTimestamp:
|
||||||
game?.LoadEditorTimestamp();
|
|
||||||
break;
|
|
||||||
case LinkAction.JoinMultiplayerMatch:
|
case LinkAction.JoinMultiplayerMatch:
|
||||||
if (int.TryParse(linkArgument, out int matchId))
|
|
||||||
game?.JoinMultiplayerMatch(matchId);
|
|
||||||
break;
|
|
||||||
case LinkAction.Spectate:
|
case LinkAction.Spectate:
|
||||||
// todo: implement this when spectating exists
|
showNotImplementedError?.Invoke();
|
||||||
break;
|
break;
|
||||||
case LinkAction.External:
|
case LinkAction.External:
|
||||||
Process.Start(url);
|
Process.Start(url);
|
||||||
@ -87,7 +92,7 @@ namespace osu.Game.Graphics.Containers
|
|||||||
default:
|
default:
|
||||||
throw new NotImplementedException($"This {nameof(LinkAction)} ({linkType.ToString()}) is missing an associated action.");
|
throw new NotImplementedException($"This {nameof(LinkAction)} ({linkType.ToString()}) is missing an associated action.");
|
||||||
}
|
}
|
||||||
}
|
},
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -123,33 +123,6 @@ namespace osu.Game
|
|||||||
|
|
||||||
public void ShowBeatmapSet(int setId) => beatmapSetOverlay.ShowBeatmapSet(setId);
|
public void ShowBeatmapSet(int setId) => beatmapSetOverlay.ShowBeatmapSet(setId);
|
||||||
|
|
||||||
public void LoadEditorTimestamp()
|
|
||||||
{
|
|
||||||
notifications.Post(new SimpleNotification
|
|
||||||
{
|
|
||||||
Text = @"Sorry, but this is not fully implemented yet!",
|
|
||||||
Icon = FontAwesome.fa_life_saver,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void LoadSpectatorScreen()
|
|
||||||
{
|
|
||||||
notifications.Post(new SimpleNotification
|
|
||||||
{
|
|
||||||
Text = @"Sorry, but spectating is not implemented yet!",
|
|
||||||
Icon = FontAwesome.fa_life_saver,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
public void JoinMultiplayerMatch(int matchId)
|
|
||||||
{
|
|
||||||
notifications.Post(new SimpleNotification
|
|
||||||
{
|
|
||||||
Text = @"Sorry, but the multiplayer lobby is not implemented yet!",
|
|
||||||
Icon = FontAwesome.fa_life_saver,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
protected void LoadScore(Score s)
|
protected void LoadScore(Score s)
|
||||||
{
|
{
|
||||||
scoreLoad?.Cancel();
|
scoreLoad?.Cancel();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user