overhaul event system

This commit is contained in:
yugecin
2017-05-26 21:32:55 +02:00
parent b8dd507dc5
commit 1df25520e4
36 changed files with 354 additions and 324 deletions

View File

@@ -21,8 +21,7 @@ package itdelatrisu.opsu.beatmap;
import itdelatrisu.opsu.Utils;
import itdelatrisu.opsu.audio.MusicController;
import itdelatrisu.opsu.db.BeatmapDB;
import yugecin.opsudance.core.events.EventBus;
import yugecin.opsudance.events.BubbleNotificationEvent;
import yugecin.opsudance.events.BubNotifListener;
import java.io.File;
import java.io.IOException;
@@ -215,7 +214,8 @@ public class BeatmapSetList {
try {
Utils.deleteToTrash(dir);
} catch (IOException e) {
EventBus.post(new BubbleNotificationEvent("Could not delete song group", BubbleNotificationEvent.COLOR_ORANGE));
BubNotifListener.EVENT.make().onBubNotif("Could not delete song group",
BubNotifListener.COLOR_ORANGE);
}
if (ws != null)
ws.resume();
@@ -271,7 +271,7 @@ public class BeatmapSetList {
try {
Utils.deleteToTrash(file);
} catch (IOException e) {
EventBus.post(new BubbleNotificationEvent("Could not delete song", BubbleNotificationEvent.COLOR_ORANGE));
BubNotifListener.EVENT.make().onBubNotif("Could not delete song", BubNotifListener.COLOR_ORANGE);
}
if (ws != null)
ws.resume();