Merge pull request #497 from vishal332008/master

Pause/Resume Current Activity
This commit is contained in:
Eric Froemling 2022-09-02 09:57:19 -07:00 committed by GitHub
commit 57eb3187fb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 10 additions and 3 deletions

View File

@ -231,8 +231,8 @@ class AccountSettingsWindow(ba.Window):
linked_accounts_text_space = 60.0 linked_accounts_text_space = 60.0
show_achievements_button = ( show_achievements_button = (
self._signed_in self._signed_in and account_type
and account_type in ('Google Play', 'Alibaba', 'Local', 'OUYA')) in ('Google Play', 'Alibaba', 'Local', 'OUYA', 'V2'))
achievements_button_space = 60.0 achievements_button_space = 60.0
show_achievements_text = (self._signed_in show_achievements_text = (self._signed_in

View File

@ -133,8 +133,15 @@ class ContinuesWindow(ba.Window):
ba.WeakCall(self._tick), ba.WeakCall(self._tick),
repeat=True, repeat=True,
timetype=ba.TimeType.REAL) timetype=ba.TimeType.REAL)
# If there is foreground activity, suspend it.
ba.app.pause()
self._tick() self._tick()
def __del__(self) -> None:
# If there is suspended foreground activity, resume it.
ba.app.resume()
def _tick(self) -> None: def _tick(self) -> None:
# if our target activity is gone or has ended, go away # if our target activity is gone or has ended, go away
activity = self._activity() activity = self._activity()

View File

@ -236,7 +236,7 @@ class CreditsListWindow(ba.Window):
'${NAME}', 'the Khronos Group') + '\n' '${NAME}', 'the Khronos Group') + '\n'
'\n' '\n'
' ' ' '
' www.froemling.net\n') ' www.ballistica.net\n')
txt = credits_text txt = credits_text
lines = txt.splitlines() lines = txt.splitlines()