Remove placeholder methods in OsuGame

Let's add these when they can actually be implemented.
This commit is contained in:
Dean Herbert 2018-01-17 19:52:04 +09:00
parent 3892965894
commit 38c5434b82
2 changed files with 13 additions and 35 deletions

View File

@ -8,6 +8,8 @@ using System.Linq;
using osu.Framework.Allocation;
using osu.Framework.Graphics.Sprites;
using System.Collections.Generic;
using osu.Game.Overlays;
using osu.Game.Overlays.Notifications;
namespace osu.Game.Graphics.Containers
{
@ -22,11 +24,19 @@ namespace osu.Game.Graphics.Containers
private OsuGame game;
private Action showNotImplementedError;
[BackgroundDependencyLoader(true)]
private void load(OsuGame game)
private void load(OsuGame game, NotificationOverlay notifications)
{
// will be null in tests
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)
@ -72,14 +82,9 @@ namespace osu.Game.Graphics.Containers
game?.OpenChannel(linkArgument);
break;
case LinkAction.OpenEditorTimestamp:
game?.LoadEditorTimestamp();
break;
case LinkAction.JoinMultiplayerMatch:
if (int.TryParse(linkArgument, out int matchId))
game?.JoinMultiplayerMatch(matchId);
break;
case LinkAction.Spectate:
// todo: implement this when spectating exists
showNotImplementedError?.Invoke();
break;
case LinkAction.External:
Process.Start(url);
@ -87,7 +92,7 @@ namespace osu.Game.Graphics.Containers
default:
throw new NotImplementedException($"This {nameof(LinkAction)} ({linkType.ToString()}) is missing an associated action.");
}
}
},
});
}
}

View File

@ -123,33 +123,6 @@ namespace osu.Game
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)
{
scoreLoad?.Cancel();