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.
33 lines
746 B
33 lines
746 B
package mightypork.gamecore.core.events;
|
|
|
|
|
|
import mightypork.gamecore.core.App;
|
|
import mightypork.gamecore.core.MainLoop;
|
|
import mightypork.utils.eventbus.BusEvent;
|
|
import mightypork.utils.eventbus.events.flags.NonConsumableEvent;
|
|
import mightypork.utils.eventbus.events.flags.SingleReceiverEvent;
|
|
|
|
|
|
/**
|
|
* Shutdown request, non-interactive. Shutdown needs to execute on GL thread for
|
|
* display to deinit properly.
|
|
*
|
|
* @author Ondřej Hruška (MightyPork)
|
|
*/
|
|
@SingleReceiverEvent
|
|
@NonConsumableEvent
|
|
public class ShudownRequest extends BusEvent<MainLoop> {
|
|
|
|
@Override
|
|
public void handleBy(final MainLoop handler)
|
|
{
|
|
handler.queueTask(new Runnable() {
|
|
|
|
@Override
|
|
public void run()
|
|
{
|
|
App.shutdown();
|
|
}
|
|
}, true);
|
|
}
|
|
}
|
|
|