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

@@ -69,8 +69,10 @@ import org.newdawn.slick.Input;
import org.newdawn.slick.SpriteSheet;
import org.newdawn.slick.gui.TextField;
import yugecin.opsudance.core.DisplayContainer;
import yugecin.opsudance.core.events.EventBus;
import yugecin.opsudance.core.inject.InstanceContainer;
import yugecin.opsudance.core.state.ComplexOpsuState;
import yugecin.opsudance.events.BarNotificationEvent;
import yugecin.opsudance.ui.OptionsOverlay;
/**
@@ -453,7 +455,7 @@ public class SongMenu extends ComplexOpsuState {
if (!songFolderChanged && kind != StandardWatchEventKinds.ENTRY_MODIFY) {
songFolderChanged = true;
if (displayContainer.isInState(SongMenu.class)) {
UI.sendBarNotification("Changes in Songs folder detected. Hit F5 to refresh.");
EventBus.instance.post(new BarNotificationEvent("Changed is Songs folder detected. Hit F5 to refresh."));
}
}
}
@@ -958,8 +960,9 @@ public class SongMenu extends ComplexOpsuState {
BeatmapSetList.get().init();
setFocus(BeatmapSetList.get().getRandomNode(), -1, true, true);
if (BeatmapSetList.get().size() < 1 && group.getEmptyMessage() != null)
UI.sendBarNotification(group.getEmptyMessage());
if (BeatmapSetList.get().size() < 1 && group.getEmptyMessage() != null) {
EventBus.instance.post(new BarNotificationEvent(group.getEmptyMessage()));
}
}
return true;
}
@@ -1775,7 +1778,7 @@ public class SongMenu extends ComplexOpsuState {
Beatmap beatmap = MusicController.getBeatmap();
if (focusNode == null || beatmap != focusNode.getSelectedBeatmap()) {
UI.sendBarNotification("Unable to load the beatmap audio.");
EventBus.instance.post(new BarNotificationEvent("Unable to load the beatmap audio."));
return;
}