GUI: improved feedback needed sound notifications (plays only for inactive game or app, see #6853);

This commit is contained in:
Oleg Agafonov 2020-07-31 20:00:36 +04:00
parent c343767e8e
commit 610baac6ab
6 changed files with 828 additions and 804 deletions

View file

@ -0,0 +1,28 @@
package mage.client.util;
import mage.client.MageFrame;
import java.util.UUID;
/**
* @author JayDi85
*/
public class AppUtil {
/**
* Application is active in operation system (got user focus)
*/
public static boolean isAppActive() {
return MageFrame.getInstance().isActive();
}
/**
* Current active panel is game panel (e.g. the user sees the checking game)
*
* @param gameId game to check
* @return
*/
public static boolean isGameActive(UUID gameId) {
return MageFrame.getInstance().isGameFrameActive(gameId);
}
}