You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
35 lines
598 B
35 lines
598 B
package mightypork.rogue.bus.events;
|
|
|
|
|
|
import mightypork.utils.control.bus.events.Event;
|
|
import mightypork.utils.control.bus.events.types.SingleReceiverEvent;
|
|
|
|
|
|
/**
|
|
* Request to change screen
|
|
*
|
|
* @author MightyPork
|
|
*/
|
|
@SingleReceiverEvent
|
|
public class ScreenRequestEvent implements Event<ScreenRequestEvent.Listener> {
|
|
|
|
private final String scrName;
|
|
|
|
|
|
public ScreenRequestEvent(String screenKey) {
|
|
scrName = screenKey;
|
|
}
|
|
|
|
|
|
@Override
|
|
public void handleBy(Listener handler)
|
|
{
|
|
handler.showScreen(scrName);
|
|
}
|
|
|
|
public interface Listener {
|
|
|
|
void showScreen(String key);
|
|
}
|
|
|
|
}
|
|
|