overhaul event system
This commit is contained in:
@@ -17,12 +17,12 @@
|
||||
*/
|
||||
package yugecin.opsudance.events;
|
||||
|
||||
public class BarNotificationEvent {
|
||||
import yugecin.opsudance.core.events.Event;
|
||||
|
||||
public final String message;
|
||||
public interface BarNotifListener {
|
||||
|
||||
public BarNotificationEvent(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
Event<BarNotifListener> EVENT = new Event<>(BarNotifListener.class);
|
||||
|
||||
void onBarNotif(String message);
|
||||
|
||||
}
|
||||
@@ -18,8 +18,12 @@
|
||||
package yugecin.opsudance.events;
|
||||
|
||||
import org.newdawn.slick.Color;
|
||||
import yugecin.opsudance.core.events.Event;
|
||||
|
||||
public class BubbleNotificationEvent {
|
||||
@SuppressWarnings({"UnnecessaryInterfaceModifier", "unused"})
|
||||
public interface BubNotifListener {
|
||||
|
||||
Event<BubNotifListener> EVENT = new Event<>(BubNotifListener.class);
|
||||
|
||||
public static final Color COMMONCOLOR_GREEN = new Color(98, 131, 59);
|
||||
public static final Color COMMONCOLOR_WHITE = new Color(220, 220, 220);
|
||||
@@ -27,12 +31,6 @@ public class BubbleNotificationEvent {
|
||||
public static final Color COMMONCOLOR_RED = new Color(141, 49, 16);
|
||||
public static final Color COLOR_ORANGE = new Color(138, 72, 51);
|
||||
|
||||
public final String message;
|
||||
public final Color borderColor;
|
||||
|
||||
public BubbleNotificationEvent(String message, Color borderColor) {
|
||||
this.message = message;
|
||||
this.borderColor = borderColor;
|
||||
}
|
||||
void onBubNotif(String message, Color borderColor);
|
||||
|
||||
}
|
||||
@@ -17,16 +17,12 @@
|
||||
*/
|
||||
package yugecin.opsudance.events;
|
||||
|
||||
public class ResolutionOrSkinChangedEvent {
|
||||
import yugecin.opsudance.core.events.Event;
|
||||
|
||||
public final String skin;
|
||||
public final int width;
|
||||
public final int height;
|
||||
public interface ResolutionChangedListener {
|
||||
|
||||
public ResolutionOrSkinChangedEvent(String skin, int width, int height) {
|
||||
this.skin = skin;
|
||||
this.width = width;
|
||||
this.height = height;
|
||||
}
|
||||
Event<ResolutionChangedListener> EVENT = new Event<>(ResolutionChangedListener.class);
|
||||
|
||||
void onResolutionChanged(int w, int h);
|
||||
|
||||
}
|
||||
28
src/yugecin/opsudance/events/SkinChangedListener.java
Normal file
28
src/yugecin/opsudance/events/SkinChangedListener.java
Normal file
@@ -0,0 +1,28 @@
|
||||
/*
|
||||
* opsu!dance - fork of opsu! with cursordance auto
|
||||
* Copyright (C) 2017 yugecin
|
||||
*
|
||||
* opsu!dance is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* opsu!dance is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with opsu!dance. If not, see <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
package yugecin.opsudance.events;
|
||||
|
||||
import yugecin.opsudance.core.events.Event;
|
||||
|
||||
public interface SkinChangedListener {
|
||||
|
||||
Event<SkinChangedListener> EVENT = new Event<>(SkinChangedListener.class);
|
||||
|
||||
void onSkinChanged(String stringName);
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user