hi there,
I need help with stopping the application from running when it loses focus or when it is minimized.
like Zuma back in the days.
on c# it would be something like :
public void checkState (object sender, EventArgs e)
{
if (WindowState == formWindowState.Minimized)
{
//here comes the boom
}
}
so I was thinking… maybe a window.addEventListener(FocusEvent.losefocus…) or window.addEventListener(Event.deactivate…) but that was me just wishfulthinking…
then I saw Lib.application.onDeactivate but I don’t know how to used it.
any idea would help.
Even if I don’t handle ACTIVATE/DEACTIVATE events, when my game loses the focus it pauses: how can avoid this?
Can I override the responsible functions handling these events?