mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-26 00:47:10 +08:00
Build pipeline fixes
This commit is contained in:
parent
3f42042caf
commit
dd2786e8de
@ -34,7 +34,7 @@ NOTE: This file was autogenerated by gendummymodule; do not edit by hand.
|
||||
"""
|
||||
|
||||
# (hash we can use to see if this file is out of date)
|
||||
# SOURCES_HASH=246156902495207849674484484080481539734
|
||||
# SOURCES_HASH=140243910598492207243870278972956193008
|
||||
|
||||
# I'm sorry Pylint. I know this file saddens you. Be strong.
|
||||
# pylint: disable=useless-suppression
|
||||
|
||||
@ -410,7 +410,7 @@ class App:
|
||||
self.main_menu_window_refresh_check_count = 0
|
||||
self.first_main_menu = True # FIXME: Move to mainmenu class.
|
||||
self.did_menu_intro = False # FIXME: Move to mainmenu class.
|
||||
self.main_menu_resume_callbacks: list = [] # can probably go away
|
||||
self.main_menu_resume_callbacks: list = [] # Can probably go away.
|
||||
self.special_offer: Optional[Dict] = None
|
||||
self.league_rank_cache: Dict = {}
|
||||
self.tournament_info: Dict = {}
|
||||
@ -427,6 +427,7 @@ class App:
|
||||
self.infotextcolor = (0.7, 0.9, 0.7)
|
||||
self.uicleanupchecks: List[UICleanupCheck] = []
|
||||
self.uiupkeeptimer: Optional[ba.Timer] = None
|
||||
|
||||
self.delegate: Optional[ba.AppDelegate] = None
|
||||
|
||||
# A few shortcuts.
|
||||
@ -643,14 +644,14 @@ class App:
|
||||
If there's a foreground host-activity that's currently paused, tell it
|
||||
to resume.
|
||||
"""
|
||||
from ba import _gameutils
|
||||
from ba._gameutils import sharedobj
|
||||
|
||||
# FIXME: Shouldn't be touching scene stuff here;
|
||||
# should just pass the request on to the host-session.
|
||||
activity = _ba.get_foreground_host_activity()
|
||||
if activity is not None:
|
||||
with _ba.Context(activity):
|
||||
globs = _gameutils.sharedobj('globals')
|
||||
globs = sharedobj('globals')
|
||||
if globs.paused:
|
||||
_ba.playsound(_ba.getsound('refWhistle'))
|
||||
globs.paused = False
|
||||
@ -663,10 +664,9 @@ class App:
|
||||
# pylint: disable=cyclic-import
|
||||
from ba import _benchmark
|
||||
from ba._general import Call
|
||||
from bastd import mainmenu
|
||||
from bastd.mainmenu import MainMenuSession
|
||||
_ba.app.main_window = None
|
||||
if isinstance(_ba.get_foreground_host_session(),
|
||||
mainmenu.MainMenuSession):
|
||||
if isinstance(_ba.get_foreground_host_session(), MainMenuSession):
|
||||
# It may be possible we're on the main menu but the screen is faded
|
||||
# so fade back in.
|
||||
_ba.fade_screen(True)
|
||||
@ -691,7 +691,7 @@ class App:
|
||||
|
||||
# Otherwise just force the issue.
|
||||
else:
|
||||
_ba.pushcall(Call(_ba.new_host_session, mainmenu.MainMenuSession))
|
||||
_ba.pushcall(Call(_ba.new_host_session, MainMenuSession))
|
||||
|
||||
def add_main_menu_close_callback(self, call: Callable[[], Any]) -> None:
|
||||
"""(internal)"""
|
||||
@ -703,13 +703,13 @@ class App:
|
||||
else:
|
||||
self.main_menu_resume_callbacks.append(call)
|
||||
|
||||
def handle_app_pause(self) -> None:
|
||||
def on_app_pause(self) -> None:
|
||||
"""Called when the app goes to a suspended state."""
|
||||
|
||||
def handle_app_resume(self) -> None:
|
||||
def on_app_resume(self) -> None:
|
||||
"""Run when the app resumes from a suspended state."""
|
||||
|
||||
self.music.handle_app_resume()
|
||||
self.music.on_app_resume()
|
||||
|
||||
self.fg_state += 1
|
||||
|
||||
|
||||
@ -137,8 +137,12 @@ def orientation_reset_message() -> None:
|
||||
color=(0, 1, 0))
|
||||
|
||||
|
||||
def handle_app_resume() -> None:
|
||||
_ba.app.handle_app_resume()
|
||||
def on_app_pause() -> None:
|
||||
_ba.app.on_app_pause()
|
||||
|
||||
|
||||
def on_app_resume() -> None:
|
||||
_ba.app.on_app_resume()
|
||||
|
||||
|
||||
def launch_main_menu_session() -> None:
|
||||
@ -287,10 +291,6 @@ def telnet_access_request() -> None:
|
||||
TelnetAccessRequestWindow()
|
||||
|
||||
|
||||
def app_pause() -> None:
|
||||
_ba.app.handle_app_pause()
|
||||
|
||||
|
||||
def do_quit() -> None:
|
||||
_ba.quit()
|
||||
|
||||
|
||||
@ -274,7 +274,7 @@ class MusicController:
|
||||
_error.print_exception()
|
||||
return 'default'
|
||||
|
||||
def handle_app_resume(self) -> None:
|
||||
def on_app_resume(self) -> None:
|
||||
"""Should be run when the app resumes from a suspended state."""
|
||||
if _ba.is_os_playing_music():
|
||||
self.do_play_music(None)
|
||||
|
||||
@ -850,20 +850,8 @@ likely result in errors.</p>
|
||||
</dd>
|
||||
</dl>
|
||||
<h3>Methods:</h3>
|
||||
<h5><a href="#method_ba_App__handle_app_pause">handle_app_pause()</a>, <a href="#method_ba_App__handle_app_resume">handle_app_resume()</a>, <a href="#method_ba_App__handle_deep_link">handle_deep_link()</a>, <a href="#method_ba_App__launch_coop_game">launch_coop_game()</a>, <a href="#method_ba_App__pause">pause()</a>, <a href="#method_ba_App__resume">resume()</a>, <a href="#method_ba_App__return_to_main_menu_session_gracefully">return_to_main_menu_session_gracefully()</a></h5>
|
||||
<h5><a href="#method_ba_App__handle_deep_link">handle_deep_link()</a>, <a href="#method_ba_App__launch_coop_game">launch_coop_game()</a>, <a href="#method_ba_App__on_app_pause">on_app_pause()</a>, <a href="#method_ba_App__on_app_resume">on_app_resume()</a>, <a href="#method_ba_App__pause">pause()</a>, <a href="#method_ba_App__resume">resume()</a>, <a href="#method_ba_App__return_to_main_menu_session_gracefully">return_to_main_menu_session_gracefully()</a></h5>
|
||||
<dl>
|
||||
<dt><h4><a name="method_ba_App__handle_app_pause">handle_app_pause()</a></dt></h4><dd>
|
||||
<p><span>handle_app_pause(self) -> None</span></p>
|
||||
|
||||
<p>Called when the app goes to a suspended state.</p>
|
||||
|
||||
</dd>
|
||||
<dt><h4><a name="method_ba_App__handle_app_resume">handle_app_resume()</a></dt></h4><dd>
|
||||
<p><span>handle_app_resume(self) -> None</span></p>
|
||||
|
||||
<p>Run when the app resumes from a suspended state.</p>
|
||||
|
||||
</dd>
|
||||
<dt><h4><a name="method_ba_App__handle_deep_link">handle_deep_link()</a></dt></h4><dd>
|
||||
<p><span>handle_deep_link(self, url: str) -> None</span></p>
|
||||
|
||||
@ -875,6 +863,18 @@ likely result in errors.</p>
|
||||
|
||||
<p>High level way to launch a co-op session locally.</p>
|
||||
|
||||
</dd>
|
||||
<dt><h4><a name="method_ba_App__on_app_pause">on_app_pause()</a></dt></h4><dd>
|
||||
<p><span>on_app_pause(self) -> None</span></p>
|
||||
|
||||
<p>Called when the app goes to a suspended state.</p>
|
||||
|
||||
</dd>
|
||||
<dt><h4><a name="method_ba_App__on_app_resume">on_app_resume()</a></dt></h4><dd>
|
||||
<p><span>on_app_resume(self) -> None</span></p>
|
||||
|
||||
<p>Run when the app resumes from a suspended state.</p>
|
||||
|
||||
</dd>
|
||||
<dt><h4><a name="method_ba_App__pause">pause()</a></dt></h4><dd>
|
||||
<p><span>pause(self) -> None</span></p>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user