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
562 B
35 lines
562 B
10 years ago
|
package mightypork.gamecore.control.bus.events;
|
||
10 years ago
|
|
||
|
|
||
10 years ago
|
import mightypork.gamecore.control.bus.events.types.SingleReceiverEvent;
|
||
10 years ago
|
|
||
|
|
||
10 years ago
|
/**
|
||
|
* Request to change screen
|
||
|
*
|
||
|
* @author MightyPork
|
||
|
*/
|
||
10 years ago
|
@SingleReceiverEvent
|
||
10 years ago
|
public class ScreenRequestEvent implements Event<ScreenRequestEvent.Listener> {
|
||
10 years ago
|
|
||
10 years ago
|
private final String scrName;
|
||
10 years ago
|
|
||
|
|
||
|
public ScreenRequestEvent(String screenKey) {
|
||
|
scrName = screenKey;
|
||
|
}
|
||
|
|
||
|
|
||
|
@Override
|
||
|
public void handleBy(Listener handler)
|
||
|
{
|
||
|
handler.showScreen(scrName);
|
||
|
}
|
||
|
|
||
|
public interface Listener {
|
||
|
|
||
10 years ago
|
void showScreen(String key);
|
||
10 years ago
|
}
|
||
|
|
||
|
}
|