replace all calls to old bar notif with new method

This commit is contained in:
yugecin
2017-01-21 23:52:19 +01:00
parent 02ef422003
commit 36aaccda29
11 changed files with 55 additions and 42 deletions

View File

@@ -37,8 +37,10 @@ import org.newdawn.slick.Image;
import org.newdawn.slick.Input;
import org.newdawn.slick.util.Log;
import yugecin.opsudance.core.DisplayContainer;
import yugecin.opsudance.core.events.EventBus;
import yugecin.opsudance.core.inject.InstanceContainer;
import yugecin.opsudance.core.state.BaseOpsuState;
import yugecin.opsudance.events.BarNotificationEvent;
/**
* "Game Ranking" (score card) state.
@@ -167,13 +169,13 @@ public class GameRanking extends BaseOpsuState {
gameState.setRestart((data.isGameplay()) ? Game.Restart.REPLAY : Game.Restart.NEW);
returnToGame = true;
} catch (FileNotFoundException e) {
UI.sendBarNotification("Replay file not found.");
EventBus.instance.post(new BarNotificationEvent("Replay file not found."));
} catch (IOException e) {
Log.error("Failed to load replay data.", e);
UI.sendBarNotification("Failed to load replay data. See log for details.");
EventBus.instance.post(new BarNotificationEvent("Failed to load replay data. See log for details."));
}
} else
UI.sendBarNotification("Replay file not found.");
EventBus.instance.post(new BarNotificationEvent("Replay file not found."));
}
// retry