move bubble notification colors to Colors file
This commit is contained in:
@@ -24,6 +24,7 @@ import itdelatrisu.opsu.audio.SoundController;
|
||||
import itdelatrisu.opsu.audio.SoundEffect;
|
||||
import itdelatrisu.opsu.beatmap.Beatmap;
|
||||
import itdelatrisu.opsu.beatmap.TimingPoint;
|
||||
import itdelatrisu.opsu.ui.Colors;
|
||||
import org.lwjgl.BufferUtils;
|
||||
import org.lwjgl.opengl.Display;
|
||||
import org.lwjgl.opengl.GL11;
|
||||
@@ -153,7 +154,7 @@ public class Configuration {
|
||||
}
|
||||
if (!defaultDir.isDirectory() && !defaultDir.mkdir()) {
|
||||
String msg = String.format("Failed to create %s directory at '%s'.", kind, defaultDir.getAbsolutePath());
|
||||
BubNotifListener.EVENT.make().onBubNotif(msg, BubNotifListener.COMMONCOLOR_RED);
|
||||
BubNotifListener.EVENT.make().onBubNotif(msg, Colors.BUB_RED);
|
||||
}
|
||||
return defaultDir;
|
||||
}
|
||||
@@ -214,8 +215,7 @@ public class Configuration {
|
||||
if (!screenshotDir.isDirectory() && !screenshotDir.mkdir()) {
|
||||
BubNotifListener.EVENT.make().onBubNotif(
|
||||
String.format( "Failed to create screenshot directory at '%s'.",
|
||||
screenshotDir.getAbsolutePath()),
|
||||
BubNotifListener.COMMONCOLOR_RED);
|
||||
screenshotDir.getAbsolutePath()), Colors.BUB_RED);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -250,7 +250,7 @@ public class Configuration {
|
||||
}
|
||||
ImageIO.write(image, OPTION_SCREENSHOT_FORMAT.getValueString().toLowerCase(), file);
|
||||
BubNotifListener.EVENT.make().onBubNotif("Created " + fileName,
|
||||
BubNotifListener.COMMONCOLOR_PURPLE);
|
||||
Colors.BUB_PURPLE);
|
||||
} catch (Exception e) {
|
||||
ErrorHandler.error("Failed to take a screenshot.", e).show();
|
||||
}
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
package yugecin.opsudance.options;
|
||||
|
||||
import itdelatrisu.opsu.Utils;
|
||||
import itdelatrisu.opsu.ui.Colors;
|
||||
import yugecin.opsudance.events.BubNotifListener;
|
||||
|
||||
public class NumericOption extends Option {
|
||||
@@ -53,7 +54,7 @@ public class NumericOption extends Option {
|
||||
val = Utils.clamp(Integer.parseInt(s), min, max);
|
||||
} catch (Exception ignored) {
|
||||
BubNotifListener.EVENT.make().onBubNotif("Failed to parse " + configurationName + " option",
|
||||
BubNotifListener.COMMONCOLOR_RED);
|
||||
Colors.BUB_RED);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
*/
|
||||
package yugecin.opsudance.options;
|
||||
|
||||
import itdelatrisu.opsu.ui.Colors;
|
||||
import org.newdawn.slick.util.Log;
|
||||
import yugecin.opsudance.events.BubNotifListener;
|
||||
|
||||
@@ -79,7 +80,7 @@ public class OptionsService {
|
||||
} catch (IOException e) {
|
||||
String err = String.format("Failed to read option file '%s'.", config.OPTIONS_FILE.getAbsolutePath());
|
||||
Log.error(err, e);
|
||||
BubNotifListener.EVENT.make().onBubNotif(err, BubNotifListener.COMMONCOLOR_RED);
|
||||
BubNotifListener.EVENT.make().onBubNotif(err, Colors.BUB_RED);
|
||||
}
|
||||
config.loadDirectories();
|
||||
}
|
||||
@@ -108,7 +109,7 @@ public class OptionsService {
|
||||
} catch (IOException e) {
|
||||
String err = String.format("Failed to write to file '%s'.", config.OPTIONS_FILE.getAbsolutePath());
|
||||
Log.error(err, e);
|
||||
BubNotifListener.EVENT.make().onBubNotif(err, BubNotifListener.COMMONCOLOR_RED);
|
||||
BubNotifListener.EVENT.make().onBubNotif(err, Colors.BUB_RED);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user