forked from External/mage
GUI: improved feedback needed sound notifications (plays only for inactive game or app, see #6853);
This commit is contained in:
parent
c343767e8e
commit
610baac6ab
6 changed files with 828 additions and 804 deletions
28
Mage.Client/src/main/java/mage/client/util/AppUtil.java
Normal file
28
Mage.Client/src/main/java/mage/client/util/AppUtil.java
Normal 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);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue