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

@ -27,7 +27,6 @@ import itdelatrisu.opsu.skins.Skin;
import itdelatrisu.opsu.skins.SkinLoader; import itdelatrisu.opsu.skins.SkinLoader;
import itdelatrisu.opsu.states.Game; import itdelatrisu.opsu.states.Game;
import itdelatrisu.opsu.ui.Fonts; import itdelatrisu.opsu.ui.Fonts;
import itdelatrisu.opsu.ui.UI;
import java.io.BufferedReader; import java.io.BufferedReader;
import java.io.BufferedWriter; import java.io.BufferedWriter;
@ -62,6 +61,7 @@ import yugecin.opsudance.*;
import yugecin.opsudance.core.DisplayContainer; import yugecin.opsudance.core.DisplayContainer;
import yugecin.opsudance.core.errorhandling.ErrorHandler; import yugecin.opsudance.core.errorhandling.ErrorHandler;
import yugecin.opsudance.core.events.EventBus; import yugecin.opsudance.core.events.EventBus;
import yugecin.opsudance.events.BarNotificationEvent;
import yugecin.opsudance.events.BubbleNotificationEvent; import yugecin.opsudance.events.BubbleNotificationEvent;
import yugecin.opsudance.events.ResolutionOrSkinChangedEvent; import yugecin.opsudance.events.ResolutionOrSkinChangedEvent;
import yugecin.opsudance.movers.factories.ExgonMoverFactory; import yugecin.opsudance.movers.factories.ExgonMoverFactory;
@ -660,7 +660,7 @@ public class Options {
public void clickListItem(int index) { public void clickListItem(int index) {
if (Game.isInGame && Dancer.moverFactories[index] instanceof PolyMoverFactory) { if (Game.isInGame && Dancer.moverFactories[index] instanceof PolyMoverFactory) {
// TODO remove this when #79 is fixed // TODO remove this when #79 is fixed
UI.sendBarNotification("This mover is disabled in the storyboard right now"); EventBus.instance.post(new BarNotificationEvent("This mover is disabled in the storyboard right now"));
return; return;
} }
Dancer.instance.setMoverFactoryIndex(index); Dancer.instance.setMoverFactoryIndex(index);
@ -1282,7 +1282,7 @@ public class Options {
public static void setNextFPS(DisplayContainer displayContainer) { public static void setNextFPS(DisplayContainer displayContainer) {
GameOption.displayContainer = displayContainer; // TODO dirty shit GameOption.displayContainer = displayContainer; // TODO dirty shit
GameOption.TARGET_FPS.clickListItem((targetFPSindex + 1) % targetFPS.length); GameOption.TARGET_FPS.clickListItem((targetFPSindex + 1) % targetFPS.length);
UI.sendBarNotification(String.format("Frame limiter: %s", GameOption.TARGET_FPS.getValueString())); EventBus.instance.post(new BarNotificationEvent(String.format("Frame limiter: %s", GameOption.TARGET_FPS.getValueString())));
} }
/** /**
@ -1695,8 +1695,8 @@ public class Options {
*/ */
public static void toggleMouseDisabled() { public static void toggleMouseDisabled() {
GameOption.DISABLE_MOUSE_BUTTONS.click(); GameOption.DISABLE_MOUSE_BUTTONS.click();
UI.sendBarNotification((GameOption.DISABLE_MOUSE_BUTTONS.getBooleanValue()) ? EventBus.instance.post(new BarNotificationEvent((GameOption.DISABLE_MOUSE_BUTTONS.getBooleanValue()) ?
"Mouse buttons are disabled." : "Mouse buttons are enabled."); "Mouse buttons are disabled." : "Mouse buttons are enabled."));
} }
/** /**

View File

@ -23,7 +23,6 @@ import itdelatrisu.opsu.beatmap.Beatmap;
import itdelatrisu.opsu.beatmap.BeatmapParser; import itdelatrisu.opsu.beatmap.BeatmapParser;
import itdelatrisu.opsu.beatmap.TimingPoint; import itdelatrisu.opsu.beatmap.TimingPoint;
import itdelatrisu.opsu.states.Game; import itdelatrisu.opsu.states.Game;
import itdelatrisu.opsu.ui.UI;
import java.io.File; import java.io.File;
import java.io.IOException; import java.io.IOException;
@ -48,6 +47,7 @@ import org.newdawn.slick.util.ResourceLoader;
import org.tritonus.share.sampled.file.TAudioFileFormat; import org.tritonus.share.sampled.file.TAudioFileFormat;
import yugecin.opsudance.core.errorhandling.ErrorHandler; import yugecin.opsudance.core.errorhandling.ErrorHandler;
import yugecin.opsudance.core.events.EventBus; import yugecin.opsudance.core.events.EventBus;
import yugecin.opsudance.events.BarNotificationEvent;
import yugecin.opsudance.events.BubbleNotificationEvent; import yugecin.opsudance.events.BubbleNotificationEvent;
/** /**
@ -102,7 +102,7 @@ public class MusicController {
if (lastBeatmap == null || !beatmap.audioFilename.equals(lastBeatmap.audioFilename)) { if (lastBeatmap == null || !beatmap.audioFilename.equals(lastBeatmap.audioFilename)) {
final File audioFile = beatmap.audioFilename; final File audioFile = beatmap.audioFilename;
if (!audioFile.isFile() && !ResourceLoader.resourceExists(audioFile.getPath())) { if (!audioFile.isFile() && !ResourceLoader.resourceExists(audioFile.getPath())) {
UI.sendBarNotification(String.format("Could not find track '%s'.", audioFile.getName())); EventBus.instance.post(new BarNotificationEvent(String.format("Could not find track '%s'.", audioFile.getName())));
return; return;
} }

View File

@ -42,6 +42,7 @@ import org.newdawn.slick.SlickException;
import org.newdawn.slick.util.ResourceLoader; import org.newdawn.slick.util.ResourceLoader;
import yugecin.opsudance.core.errorhandling.ErrorHandler; import yugecin.opsudance.core.errorhandling.ErrorHandler;
import yugecin.opsudance.core.events.EventBus; import yugecin.opsudance.core.events.EventBus;
import yugecin.opsudance.events.BarNotificationEvent;
import yugecin.opsudance.events.BubbleNotificationEvent; import yugecin.opsudance.events.BubbleNotificationEvent;
/** /**
@ -391,7 +392,7 @@ public class SoundController {
@Override @Override
public void error() { public void error() {
UI.sendBarNotification("Failed to download track preview."); EventBus.instance.post(new BarNotificationEvent("Failed to download track preview."));
} }
}); });
try { try {

View File

@ -35,6 +35,7 @@ import org.newdawn.slick.Color;
import org.newdawn.slick.Graphics; import org.newdawn.slick.Graphics;
import org.newdawn.slick.Image; import org.newdawn.slick.Image;
import yugecin.opsudance.core.events.EventBus; import yugecin.opsudance.core.events.EventBus;
import yugecin.opsudance.events.BarNotificationEvent;
import yugecin.opsudance.events.BubbleNotificationEvent; import yugecin.opsudance.events.BubbleNotificationEvent;
/** /**
@ -277,12 +278,12 @@ public class DownloadNode {
download.setListener(new DownloadListener() { download.setListener(new DownloadListener() {
@Override @Override
public void completed() { public void completed() {
UI.sendBarNotification(String.format("Download complete: %s", getTitle())); EventBus.instance.post(new BarNotificationEvent(String.format("Download complete: %s", getTitle())));
} }
@Override @Override
public void error() { public void error() {
UI.sendBarNotification("Download failed due to a connection error."); EventBus.instance.post(new BarNotificationEvent("Download failed due to a connection error."));
} }
}); });
this.download = download; this.download = download;

View File

@ -38,6 +38,8 @@ import org.apache.maven.artifact.versioning.DefaultArtifactVersion;
import org.newdawn.slick.util.Log; import org.newdawn.slick.util.Log;
import org.newdawn.slick.util.ResourceLoader; import org.newdawn.slick.util.ResourceLoader;
import yugecin.opsudance.core.errorhandling.ErrorHandler; import yugecin.opsudance.core.errorhandling.ErrorHandler;
import yugecin.opsudance.core.events.EventBus;
import yugecin.opsudance.events.BarNotificationEvent;
/** /**
* Handles automatic program updates. * Handles automatic program updates.
@ -249,13 +251,13 @@ public class Updater {
@Override @Override
public void completed() { public void completed() {
status = Status.UPDATE_DOWNLOADED; status = Status.UPDATE_DOWNLOADED;
UI.sendBarNotification("Update has finished downloading."); EventBus.instance.post(new BarNotificationEvent("Update has finished downloading"));
} }
@Override @Override
public void error() { public void error() {
status = Status.CONNECTION_ERROR; status = Status.CONNECTION_ERROR;
UI.sendBarNotification("Update failed due to a connection error."); EventBus.instance.post(new BarNotificationEvent("Update failed due to a connection error."));
} }
}); });
} }

View File

@ -20,7 +20,6 @@ package itdelatrisu.opsu.states;
import itdelatrisu.opsu.GameImage; import itdelatrisu.opsu.GameImage;
import itdelatrisu.opsu.Options; import itdelatrisu.opsu.Options;
import itdelatrisu.opsu.Utils;
import itdelatrisu.opsu.audio.MusicController; import itdelatrisu.opsu.audio.MusicController;
import itdelatrisu.opsu.audio.SoundController; import itdelatrisu.opsu.audio.SoundController;
import itdelatrisu.opsu.audio.SoundEffect; import itdelatrisu.opsu.audio.SoundEffect;
@ -57,8 +56,10 @@ import org.newdawn.slick.SlickException;
import org.newdawn.slick.gui.TextField; import org.newdawn.slick.gui.TextField;
import org.newdawn.slick.util.Log; import org.newdawn.slick.util.Log;
import yugecin.opsudance.core.DisplayContainer; import yugecin.opsudance.core.DisplayContainer;
import yugecin.opsudance.core.events.EventBus;
import yugecin.opsudance.core.inject.InstanceContainer; import yugecin.opsudance.core.inject.InstanceContainer;
import yugecin.opsudance.core.state.ComplexOpsuState; import yugecin.opsudance.core.state.ComplexOpsuState;
import yugecin.opsudance.events.BarNotificationEvent;
/** /**
* Downloads menu. * Downloads menu.
@ -279,8 +280,8 @@ public class DownloadsMenu extends ComplexOpsuState {
this.importedNode = BeatmapParser.parseDirectories(dirs); this.importedNode = BeatmapParser.parseDirectories(dirs);
if (importedNode != null) { if (importedNode != null) {
// send notification // send notification
UI.sendBarNotification((dirs.length == 1) ? "Imported 1 new song." : EventBus.instance.post(new BarNotificationEvent((dirs.length == 1) ? "Imported 1 new song." :
String.format("Imported %d new songs.", dirs.length)); String.format("Imported %d new songs.", dirs.length)));
} }
} }
@ -686,7 +687,7 @@ public class DownloadsMenu extends ComplexOpsuState {
if (playing) if (playing)
previewID = node.getID(); previewID = node.getID();
} catch (SlickException e) { } catch (SlickException e) {
UI.sendBarNotification("Failed to load track preview. See log for details."); EventBus.instance.post(new BarNotificationEvent("Failed to load track preview. See log for details."));
Log.error(e); Log.error(e);
} }
} }
@ -708,9 +709,9 @@ public class DownloadsMenu extends ComplexOpsuState {
// start download // start download
if (!DownloadList.get().contains(node.getID())) { if (!DownloadList.get().contains(node.getID())) {
node.createDownload(serverMenu.getSelectedItem()); node.createDownload(serverMenu.getSelectedItem());
if (node.getDownload() == null) if (node.getDownload() == null) {
UI.sendBarNotification("The download could not be started."); EventBus.instance.post(new BarNotificationEvent("The download could not be started"));
else { } else {
DownloadList.get().addNode(node); DownloadList.get().addNode(node);
node.getDownload().start(); node.getDownload().start();
} }
@ -953,7 +954,7 @@ public class DownloadsMenu extends ComplexOpsuState {
pageDir = Page.RESET; pageDir = Page.RESET;
previewID = -1; previewID = -1;
if (barNotificationOnLoad != null) { if (barNotificationOnLoad != null) {
UI.sendBarNotification(barNotificationOnLoad); EventBus.instance.post(new BarNotificationEvent(barNotificationOnLoad));
barNotificationOnLoad = null; barNotificationOnLoad = null;
} }
} }

View File

@ -64,10 +64,12 @@ import org.newdawn.slick.SlickException;
import org.newdawn.slick.util.Log; import org.newdawn.slick.util.Log;
import yugecin.opsudance.*; import yugecin.opsudance.*;
import yugecin.opsudance.core.DisplayContainer; import yugecin.opsudance.core.DisplayContainer;
import yugecin.opsudance.core.events.EventBus;
import yugecin.opsudance.core.inject.InstanceContainer; import yugecin.opsudance.core.inject.InstanceContainer;
import yugecin.opsudance.core.state.ComplexOpsuState; import yugecin.opsudance.core.state.ComplexOpsuState;
import yugecin.opsudance.core.state.transitions.FadeInTransitionState; import yugecin.opsudance.core.state.transitions.FadeInTransitionState;
import yugecin.opsudance.core.state.transitions.FadeOutTransitionState; import yugecin.opsudance.core.state.transitions.FadeOutTransitionState;
import yugecin.opsudance.events.BarNotificationEvent;
import yugecin.opsudance.events.BubbleNotificationEvent; import yugecin.opsudance.events.BubbleNotificationEvent;
import yugecin.opsudance.objects.curves.FakeCombinedCurve; import yugecin.opsudance.objects.curves.FakeCombinedCurve;
import yugecin.opsudance.sbv2.MoveStoryboard; import yugecin.opsudance.sbv2.MoveStoryboard;
@ -1186,7 +1188,7 @@ public class Game extends ComplexOpsuState {
int position = (pauseTime > -1) ? pauseTime : trackPosition; int position = (pauseTime > -1) ? pauseTime : trackPosition;
if (Options.setCheckpoint(position / 1000)) { if (Options.setCheckpoint(position / 1000)) {
SoundController.playSound(SoundEffect.MENUCLICK); SoundController.playSound(SoundEffect.MENUCLICK);
UI.sendBarNotification("Checkpoint saved."); EventBus.instance.post(new BarNotificationEvent("Checkpoint saved."));
} }
} }
break; break;
@ -1198,7 +1200,7 @@ public class Game extends ComplexOpsuState {
break; // invalid checkpoint break; // invalid checkpoint
loadCheckpoint(checkpoint); loadCheckpoint(checkpoint);
SoundController.playSound(SoundEffect.MENUHIT); SoundController.playSound(SoundEffect.MENUHIT);
UI.sendBarNotification("Checkpoint loaded."); EventBus.instance.post(new BarNotificationEvent("Checkpoint loaded."));
} }
break; break;
case Input.KEY_F: case Input.KEY_F:
@ -1243,12 +1245,12 @@ public class Game extends ComplexOpsuState {
break; break;
case Input.KEY_MINUS: case Input.KEY_MINUS:
currentMapMusicOffset += 5; currentMapMusicOffset += 5;
UI.sendBarNotification("Current map offset: " + currentMapMusicOffset); EventBus.instance.post(new BarNotificationEvent("Current map offset: " + currentMapMusicOffset));
break; break;
} }
if (key == Input.KEY_ADD || c == '+') { if (key == Input.KEY_ADD || c == '+') {
currentMapMusicOffset -= 5; currentMapMusicOffset -= 5;
UI.sendBarNotification("Current map offset: " + currentMapMusicOffset); EventBus.instance.post(new BarNotificationEvent("Current map offset: " + currentMapMusicOffset));
} }
return true; return true;

View File

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

View File

@ -51,6 +51,7 @@ import yugecin.opsudance.core.events.EventBus;
import yugecin.opsudance.core.inject.InstanceContainer; import yugecin.opsudance.core.inject.InstanceContainer;
import yugecin.opsudance.core.state.BaseOpsuState; import yugecin.opsudance.core.state.BaseOpsuState;
import yugecin.opsudance.core.state.OpsuState; import yugecin.opsudance.core.state.OpsuState;
import yugecin.opsudance.events.BarNotificationEvent;
import yugecin.opsudance.events.BubbleNotificationEvent; import yugecin.opsudance.events.BubbleNotificationEvent;
/** /**
@ -470,10 +471,10 @@ public class MainMenu extends BaseOpsuState {
UI.enter(); UI.enter();
if (!enterNotification) { if (!enterNotification) {
if (Updater.get().getStatus() == Updater.Status.UPDATE_AVAILABLE) { if (Updater.get().getStatus() == Updater.Status.UPDATE_AVAILABLE) {
UI.sendBarNotification("An opsu! update is available."); EventBus.instance.post(new BarNotificationEvent("An opsu! update is available."));
enterNotification = true; enterNotification = true;
} else if (Updater.get().justUpdated()) { } else if (Updater.get().justUpdated()) {
UI.sendBarNotification("opsu! is now up to date!"); EventBus.instance.post(new BarNotificationEvent("opsu! is now up to date!"));
enterNotification = true; enterNotification = true;
} }
} }
@ -536,15 +537,15 @@ public class MainMenu extends BaseOpsuState {
if (musicPlay.contains(x, y)) { if (musicPlay.contains(x, y)) {
if (MusicController.isPlaying()) { if (MusicController.isPlaying()) {
MusicController.pause(); MusicController.pause();
UI.sendBarNotification("Pause"); EventBus.instance.post(new BarNotificationEvent("Pause"));
} else if (!MusicController.isTrackLoading()) { } else if (!MusicController.isTrackLoading()) {
MusicController.resume(); MusicController.resume();
UI.sendBarNotification("Play"); EventBus.instance.post(new BarNotificationEvent("Play"));
} }
return true; return true;
} else if (musicNext.contains(x, y)) { } else if (musicNext.contains(x, y)) {
nextTrack(true); nextTrack(true);
UI.sendBarNotification(">> Next"); EventBus.instance.post(new BarNotificationEvent(">> Next"));
return true; return true;
} else if (musicPrevious.contains(x, y)) { } else if (musicPrevious.contains(x, y)) {
lastMeasureProgress = 0f; lastMeasureProgress = 0f;
@ -554,7 +555,7 @@ public class MainMenu extends BaseOpsuState {
bgAlpha.setTime(0); bgAlpha.setTime(0);
} else } else
MusicController.setPosition(0); MusicController.setPosition(0);
UI.sendBarNotification("<< Previous"); EventBus.instance.post(new BarNotificationEvent("<< Previous"));
return true; return true;
} }
@ -570,7 +571,7 @@ public class MainMenu extends BaseOpsuState {
try { try {
Desktop.getDesktop().browse(Options.REPOSITORY_URI); Desktop.getDesktop().browse(Options.REPOSITORY_URI);
} catch (UnsupportedOperationException e) { } catch (UnsupportedOperationException e) {
UI.sendBarNotification("The repository web page could not be opened."); EventBus.instance.post(new BarNotificationEvent("The repository web page could not be opened."));
} catch (IOException e) { } catch (IOException e) {
Log.error("could not browse to repo", e); Log.error("could not browse to repo", e);
displayContainer.eventBus.post(new BubbleNotificationEvent("Could not browse to repo", BubbleNotificationEvent.COLOR_ORANGE)); displayContainer.eventBus.post(new BubbleNotificationEvent("Could not browse to repo", BubbleNotificationEvent.COLOR_ORANGE));
@ -582,7 +583,7 @@ public class MainMenu extends BaseOpsuState {
try { try {
Desktop.getDesktop().browse(Options.DANCE_REPOSITORY_URI); Desktop.getDesktop().browse(Options.DANCE_REPOSITORY_URI);
} catch (UnsupportedOperationException e) { } catch (UnsupportedOperationException e) {
UI.sendBarNotification("The repository web page could not be opened."); EventBus.instance.post(new BarNotificationEvent("The repository web page could not be opened."));
} catch (IOException e) { } catch (IOException e) {
Log.error("could not browse to repo", e); Log.error("could not browse to repo", e);
displayContainer.eventBus.post(new BubbleNotificationEvent("Could not browse to repo", BubbleNotificationEvent.COLOR_ORANGE)); displayContainer.eventBus.post(new BubbleNotificationEvent("Could not browse to repo", BubbleNotificationEvent.COLOR_ORANGE));

View File

@ -69,8 +69,10 @@ import org.newdawn.slick.Input;
import org.newdawn.slick.SpriteSheet; import org.newdawn.slick.SpriteSheet;
import org.newdawn.slick.gui.TextField; import org.newdawn.slick.gui.TextField;
import yugecin.opsudance.core.DisplayContainer; import yugecin.opsudance.core.DisplayContainer;
import yugecin.opsudance.core.events.EventBus;
import yugecin.opsudance.core.inject.InstanceContainer; import yugecin.opsudance.core.inject.InstanceContainer;
import yugecin.opsudance.core.state.ComplexOpsuState; import yugecin.opsudance.core.state.ComplexOpsuState;
import yugecin.opsudance.events.BarNotificationEvent;
import yugecin.opsudance.ui.OptionsOverlay; import yugecin.opsudance.ui.OptionsOverlay;
/** /**
@ -453,7 +455,7 @@ public class SongMenu extends ComplexOpsuState {
if (!songFolderChanged && kind != StandardWatchEventKinds.ENTRY_MODIFY) { if (!songFolderChanged && kind != StandardWatchEventKinds.ENTRY_MODIFY) {
songFolderChanged = true; songFolderChanged = true;
if (displayContainer.isInState(SongMenu.class)) { 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(); BeatmapSetList.get().init();
setFocus(BeatmapSetList.get().getRandomNode(), -1, true, true); setFocus(BeatmapSetList.get().getRandomNode(), -1, true, true);
if (BeatmapSetList.get().size() < 1 && group.getEmptyMessage() != null) if (BeatmapSetList.get().size() < 1 && group.getEmptyMessage() != null) {
UI.sendBarNotification(group.getEmptyMessage()); EventBus.instance.post(new BarNotificationEvent(group.getEmptyMessage()));
}
} }
return true; return true;
} }
@ -1775,7 +1778,7 @@ public class SongMenu extends ComplexOpsuState {
Beatmap beatmap = MusicController.getBeatmap(); Beatmap beatmap = MusicController.getBeatmap();
if (focusNode == null || beatmap != focusNode.getSelectedBeatmap()) { 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; return;
} }

View File

@ -20,13 +20,13 @@ package yugecin.opsudance.sbv2;
import itdelatrisu.opsu.objects.GameObject; import itdelatrisu.opsu.objects.GameObject;
import itdelatrisu.opsu.ui.Colors; import itdelatrisu.opsu.ui.Colors;
import itdelatrisu.opsu.ui.Fonts; import itdelatrisu.opsu.ui.Fonts;
import itdelatrisu.opsu.ui.UI;
import itdelatrisu.opsu.ui.animations.AnimationEquation; import itdelatrisu.opsu.ui.animations.AnimationEquation;
import org.newdawn.slick.Color; import org.newdawn.slick.Color;
import org.newdawn.slick.GameContainer;
import org.newdawn.slick.Graphics; import org.newdawn.slick.Graphics;
import yugecin.opsudance.core.DisplayContainer; import yugecin.opsudance.core.DisplayContainer;
import yugecin.opsudance.core.events.EventBus;
import yugecin.opsudance.core.state.OverlayOpsuState; import yugecin.opsudance.core.state.OverlayOpsuState;
import yugecin.opsudance.events.BarNotificationEvent;
import yugecin.opsudance.sbv2.movers.CubicStoryboardMover; import yugecin.opsudance.sbv2.movers.CubicStoryboardMover;
import yugecin.opsudance.sbv2.movers.LinearStoryboardMover; import yugecin.opsudance.sbv2.movers.LinearStoryboardMover;
import yugecin.opsudance.sbv2.movers.QuadraticStoryboardMover; import yugecin.opsudance.sbv2.movers.QuadraticStoryboardMover;
@ -186,7 +186,7 @@ public class MoveStoryboard extends OverlayOpsuState{
private StoryboardMove getCurrentMoveOrCreateNew() { private StoryboardMove getCurrentMoveOrCreateNew() {
if (gameObjects[objectIndex].isSlider() && trackPosition > gameObjects[objectIndex].getTime() && trackPosition < gameObjects[objectIndex].getEndTime()) { if (gameObjects[objectIndex].isSlider() && trackPosition > gameObjects[objectIndex].getTime() && trackPosition < gameObjects[objectIndex].getEndTime()) {
UI.sendBarNotification("wait until the slider ended"); EventBus.instance.post(new BarNotificationEvent("Wait until the slider ended"));
return dummyMove; return dummyMove;
} }
if (moves[objectIndex] == null) { if (moves[objectIndex] == null) {