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.
32 lines
517 B
32 lines
517 B
package mightypork.rogue.screens;
|
|
|
|
import mightypork.gamecore.eventbus.BusEvent;
|
|
|
|
|
|
public class LoaderRequest extends BusEvent<LoadingOverlay> {
|
|
|
|
private final boolean show;
|
|
private final String msg;
|
|
|
|
|
|
public LoaderRequest(boolean show, String msg) {
|
|
this.show = show;
|
|
this.msg = msg;
|
|
}
|
|
|
|
public LoaderRequest(boolean show) {
|
|
this.show = show;
|
|
this.msg = null;
|
|
}
|
|
|
|
@Override
|
|
protected void handleBy(LoadingOverlay handler)
|
|
{
|
|
if(show) {
|
|
handler.show(msg);
|
|
}else {
|
|
handler.hide();
|
|
}
|
|
}
|
|
|
|
}
|
|
|