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
660 B
32 lines
660 B
package mightypork.gamecore.core.events;
|
|
|
|
|
|
import mightypork.utils.eventbus.BusEvent;
|
|
import mightypork.utils.eventbus.EventBus;
|
|
|
|
|
|
/**
|
|
* User quit request. This event is triggered when user clicks the "close"
|
|
* titlebar button, and if no client consumes it, the application will be shut
|
|
* down.
|
|
*
|
|
* @author Ondřej Hruška (MightyPork)
|
|
*/
|
|
public class UserQuitRequest extends BusEvent<UserQuitRequestListener> {
|
|
|
|
@Override
|
|
protected void handleBy(UserQuitRequestListener handler)
|
|
{
|
|
handler.onQuitRequest(this);
|
|
}
|
|
|
|
|
|
@Override
|
|
public void onDispatchComplete(EventBus bus)
|
|
{
|
|
if (!isConsumed()) {
|
|
bus.send(new ShudownRequest());
|
|
}
|
|
}
|
|
|
|
}
|
|
|