From ea822630582990fa19c0b8c280d1fbe5fe6f1c1a Mon Sep 17 00:00:00 2001 From: Vishal Date: Mon, 29 Aug 2022 19:39:48 +0530 Subject: [PATCH] pause/resume current activity --- assets/src/ba_data/python/bastd/ui/continues.py | 7 +++++++ assets/src/ba_data/python/bastd/ui/creditslist.py | 2 +- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/assets/src/ba_data/python/bastd/ui/continues.py b/assets/src/ba_data/python/bastd/ui/continues.py index 861c860e..e8a04d85 100644 --- a/assets/src/ba_data/python/bastd/ui/continues.py +++ b/assets/src/ba_data/python/bastd/ui/continues.py @@ -133,8 +133,15 @@ class ContinuesWindow(ba.Window): ba.WeakCall(self._tick), repeat=True, timetype=ba.TimeType.REAL) + + # If there is foreground activity, suspend it. + ba.app.pause() self._tick() + def __del__(self) -> None: + # If there is suspended foreground activity, resume it. + ba.app.resume() + def _tick(self) -> None: # if our target activity is gone or has ended, go away activity = self._activity() diff --git a/assets/src/ba_data/python/bastd/ui/creditslist.py b/assets/src/ba_data/python/bastd/ui/creditslist.py index c266fc56..9176066c 100644 --- a/assets/src/ba_data/python/bastd/ui/creditslist.py +++ b/assets/src/ba_data/python/bastd/ui/creditslist.py @@ -236,7 +236,7 @@ class CreditsListWindow(ba.Window): '${NAME}', 'the Khronos Group') + '\n' '\n' ' ' - ' www.froemling.net\n') + ' www.ballistica.net\n') txt = credits_text lines = txt.splitlines()