diff --git a/.efrocachemap b/.efrocachemap index b01a4e99..f4186604 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4096,26 +4096,26 @@ "build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1", "build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae", "build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599", - "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "09e1d02460a30d04eabbb2452430c2c2", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "3f7acbf88886a6ead1de37c49d3b6eac", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "eecc40e7d72e0e5321c906b992225c3c", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "2572971053d7aa2b72f23921bf6d0471", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "410330f469fa87e017121f4f51fe5107", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "6c3c924c068c6299429204d634344cf3", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "1cc419fa2065502276c1913ebe2862aa", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "3fcd65bad8c769160ac291f0222c6206", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "8246ae194fa3f01e121ac8feb9c08465", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "0239ca26472abec7facd9d9861456df4", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "f319e26182c705a6e5bb178ff99ee047", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "562937117ff516d2a2fbc3680d1b8b08", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "1edbb82242592aa2a66625e7a1b38c0a", - "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "17e8a2747695e5594fc4328d8332874b", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "3c55156b1d02cfa37cbf7a545b8a73ce", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "f0f9238f0ba4601e7f108db9e4aef779", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "1377cb4a5370aa185a9020c2c7897a0e", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "abc74dc8348c9ae7be4484b484292501", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "aed20bb1dbaeae0ce0f58df060cf5c61", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "27406336b06f3986f6e03ebbdf746696", + "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "e5178f2851b3af9a4e38e3a7d267a240", + "build/prefab/full/linux_arm64_gui/release/ballisticakit": "912611f71c3b7d50a7e125ecede0c719", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "d37e2e367d558d8dc2acb0c65297e439", + "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "9d17cdce4ead349207e33ef2e1797210", + "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "7e77b7064e3d727c6774dc7b6e4d0484", + "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "c3c2386a4a8a033eaa1bd2bb30620467", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "ec5ef8638ab507847fe3cc70598f6467", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "6fef8a6f718c2ac6b322affc4fbe5dd2", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "d7aceacd58ddb44e8381291ba229d976", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "645725e7904049c6d5473e508e5b0a89", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "69ec81fbfd03210abf87ae39b45282bf", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "571cce7f35bceb1a2c53ca67e6d2ba66", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "fbfb6bbbde2ff59ac9279ac2162b2733", + "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "bb2c684f084e2bf3eb87392718b00493", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "5c8cc694aaca54b7d28823a7bbb99f5a", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "974e88892bd2ed2ac9a8c9d7cb63e38e", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "d19acafe6c0b7bf869976ec6b4d47250", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "98152c4194eaf779c2cda75e5fbd8deb", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "2bcd3acef687c45602a56b30d2b9541b", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "f7a1726e53ea787e70c57212018487b6", "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "73ad3303fe1a82005918fbc5dae3446c", "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "fa659b5d6119acba6570c92ce4d35ae2", "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "73ad3303fe1a82005918fbc5dae3446c", @@ -4132,14 +4132,14 @@ "build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "3e5c5fd0a09f55ba7b05ce1e2ec7171e", "build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "1659535e95e3047fda529543e265ac97", "build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "3e5c5fd0a09f55ba7b05ce1e2ec7171e", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "9de8b0fae465ab0336c33b389103083d", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "846a8707586f1073d9a27d282c4f414e", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "6a93c2ae4d42ca2fd7b9acc68c76df84", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "97b2f41be2efc6038d5ef9650a0afb30", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "64ceef6d628e94b3b26cbcc3fe0a2d71", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "b44eac48f052d505c5a3c8a1602e9465", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "f3f556d5939b2ecc840b536dfcee7b17", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "1767f93d5e8c210da88e83c9464b3b97", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "70d97e9b1ee3aab626edaaa250ecb161", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "2cde0bcaa51f05ca76bea9f8fba23de0", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "bf044c328cb751d29a96f6f75a9a8034", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "26d6dc203dc2a055b393c1962a2c90e3", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "957b55aaa06ccea86893d802eda3432d", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "7b0dc8b1d2393700ca44a82ba00dad0c", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "100976691f6e41d024e108f5a14d55c1", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "679aceecd0f8d165553a6ce4f411957f", "src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c", "src/assets/ba_data/python/babase/_mgen/enums.py": "cb299985623bbcc86015cb103a424ae6", "src/ballistica/base/mgen/pyembed/binding_base.inc": "efa61468cf098f77cc6a234461d8b86d", diff --git a/CHANGELOG.md b/CHANGELOG.md index d63ee668..04a5c26c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.37 (build 21987, api 9, 2024-09-04) +### 1.7.37 (build 21988, api 9, 2024-09-04) - Bumping api version to 9. As you'll see below, there's some UI changes that will require a bit of work for any UI mods to adapt to. If your mods don't touch UI stuff at all you can simply bump your api version and call it a day. diff --git a/src/assets/ba_data/python/baclassic/_appsubsystem.py b/src/assets/ba_data/python/baclassic/_appsubsystem.py index e10c5dfd..2048568e 100644 --- a/src/assets/ba_data/python/baclassic/_appsubsystem.py +++ b/src/assets/ba_data/python/baclassic/_appsubsystem.py @@ -830,18 +830,15 @@ class ClassicAppSubsystem(babase.AppSubsystem): # UI stuff fails now in headless builds; avoid it. pass else: - # main_menu_location = ( - # bascenev1.app.ui_v1.get_main_menu_location() - # ) - # When coming back from a kiosk-mode game, jump to - # the kiosk start screen. + # When coming back from a kiosk-mode game, jump to the + # kiosk start screen. if env.demo or env.arcade: # pylint: disable=cyclic-import from bauiv1lib.kiosk import KioskWindow app.ui_v1.set_main_window( - KioskWindow(), from_window=False # Disable check here. + KioskWindow(), is_top_level=True, suppress_warning=True ) # ..or in normal cases go back to the main menu else: @@ -912,17 +909,3 @@ class ClassicAppSubsystem(babase.AppSubsystem): is_top_level=True, suppress_warning=True, ) - - # attempt to show any pending offers immediately. - # If that doesn't work, try again in a few seconds - # (we may not have heard back from the server) - # ..if that doesn't work they'll just have to wait - # until the next opportunity. - # if not specialoffer.show_offer(): - - # def try_again() -> None: - # if not specialoffer.show_offer(): - # # Try one last time.. - # bauiv1.apptimer(2.0, specialoffer.show_offer) - - # bauiv1.apptimer(2.0, try_again) diff --git a/src/assets/ba_data/python/baenv.py b/src/assets/ba_data/python/baenv.py index 58e21b1e..0ddf60d1 100644 --- a/src/assets/ba_data/python/baenv.py +++ b/src/assets/ba_data/python/baenv.py @@ -52,7 +52,7 @@ if TYPE_CHECKING: # Build number and version of the ballistica binary we expect to be # using. -TARGET_BALLISTICA_BUILD = 21987 +TARGET_BALLISTICA_BUILD = 21988 TARGET_BALLISTICA_VERSION = '1.7.37' diff --git a/src/assets/ba_data/python/bascenev1/_gameactivity.py b/src/assets/ba_data/python/bascenev1/_gameactivity.py index d990f818..fc9f0b83 100644 --- a/src/assets/ba_data/python/bascenev1/_gameactivity.py +++ b/src/assets/ba_data/python/bascenev1/_gameactivity.py @@ -64,44 +64,6 @@ class GameActivity(Activity[PlayerT, TeamT]): # (unless overridden by the map). default_music: bascenev1.MusicType | None = None - # @classmethod - # def create_settings_ui( - # cls, - # sessiontype: type[bascenev1.Session], - # settings: dict | None, - # completion_call: Callable[[dict | None], None], - # ) -> None: - # """Launch an in-game UI to configure settings for a game type. - - # 'sessiontype' should be the bascenev1.Session class the game will - # be used in. - - # 'settings' should be an existing settings dict (implies 'edit' - # ui mode) or None (implies 'add' ui mode). - - # 'completion_call' will be called with a filled-out settings dict on - # success or None on cancel. - - # Generally subclasses don't need to override this; if they override - # bascenev1.GameActivity.get_available_settings() and - # bascenev1.GameActivity.get_supported_maps() they can just rely on - # the default implementation here which calls those methods. - # """ - # # pylint: disable=cyclic-import - # from bauiv1lib.playlist.editgame import PlaylistEditGameWindow - - # assert babase.app.classic is not None - # babase.app.ui_v1.clear_main_window() - # babase.app.ui_v1.set_main_window( - # PlaylistEditGameWindow( - # cls, - # sessiontype, - # settings, - # completion_call=completion_call, - # ), - # from_window=False, # Disable check since we don't know. - # ) - @classmethod def getscoreconfig(cls) -> bascenev1.ScoreConfig: """Return info about game scoring setup; can be overridden by games.""" diff --git a/src/assets/ba_data/python/bauiv1lib/kiosk.py b/src/assets/ba_data/python/bauiv1lib/kiosk.py index 206569dc..c3814cd7 100644 --- a/src/assets/ba_data/python/bauiv1lib/kiosk.py +++ b/src/assets/ba_data/python/bauiv1lib/kiosk.py @@ -4,6 +4,8 @@ from __future__ import annotations +from typing import override + import bascenev1 as bs import bauiv1 as bui @@ -359,6 +361,20 @@ class KioskWindow(bui.MainWindow): 1.0, bui.WeakCall(self._update), repeat=True ) + @override + def get_main_window_state(self) -> bui.MainWindowState: + # Support recreating our window for back/refresh purposes. + cls = type(self) + return bui.BasicMainWindowState( + create_call=lambda transition, origin_widget: cls( + transition=transition, origin_widget=origin_widget + ) + ) + + @override + def on_main_window_close(self) -> None: + self._save_state() + def _restore_state(self) -> None: assert bui.app.classic is not None sel_name = bui.app.ui_v1.window_states.get(type(self)) @@ -510,13 +526,13 @@ class KioskWindow(bui.MainWindow): # pylint: disable=cyclic-import from bauiv1lib.mainmenu import MainMenuWindow - # no-op if our underlying widget is dead or on its way out. - if not self._root_widget or self._root_widget.transitioning_out: + # no-op if we're not in control. + if not self.main_window_has_control(): return assert bui.app.classic is not None self._save_state() - bui.containerwidget(edit=self._root_widget, transition='out_left') bui.app.classic.did_menu_intro = True # prevent delayed transition-in - bui.app.ui_v1.set_main_window(MainMenuWindow(), from_window=self) + + self.main_window_replace(MainMenuWindow()) diff --git a/src/assets/ba_data/python/bauiv1lib/playlist/browser.py b/src/assets/ba_data/python/bauiv1lib/playlist/browser.py index 7523639d..65721765 100644 --- a/src/assets/ba_data/python/bauiv1lib/playlist/browser.py +++ b/src/assets/ba_data/python/bauiv1lib/playlist/browser.py @@ -716,26 +716,23 @@ class PlaylistBrowserWindow(bui.MainWindow): PlaylistCustomizeBrowserWindow, ) - # no-op if our underlying widget is dead or on its way out. - if not self._root_widget or self._root_widget.transitioning_out: + # no-op if we're not in control. + if not self.main_window_has_control(): return - self._save_state() - bui.containerwidget(edit=self._root_widget, transition='out_left') - bui.app.ui_v1.set_main_window( + self.main_window_replace( PlaylistCustomizeBrowserWindow( origin_widget=self._customize_button, sessiontype=self._sessiontype, - ), - from_window=self, + ) ) def _on_back_press(self) -> None: # pylint: disable=cyclic-import # from bauiv1lib.play import PlayWindow - # no-op if our underlying widget is dead or on its way out. - if not self._root_widget or self._root_widget.transitioning_out: + # no-op if we're not in control. + if not self.main_window_has_control(): return # Store our selected playlist if that's changed. diff --git a/src/assets/ba_data/python/bauiv1lib/playlist/editgame.py b/src/assets/ba_data/python/bauiv1lib/playlist/editgame.py index 9192703f..22a10fda 100644 --- a/src/assets/ba_data/python/bauiv1lib/playlist/editgame.py +++ b/src/assets/ba_data/python/bauiv1lib/playlist/editgame.py @@ -545,10 +545,6 @@ class PlaylistEditGameWindow(bui.MainWindow): if not self.main_window_has_control(): return - # no-op if our underlying widget is dead or on its way out. - # if not self._root_widget or self._root_widget.transitioning_out: - # return - self._config = self._getconfig() # Replace ourself with the map-select UI. @@ -556,26 +552,12 @@ class PlaylistEditGameWindow(bui.MainWindow): PlaylistMapSelectWindow( self._gametype, self._sessiontype, - # copy.deepcopy(self._getconfig()), self._config, self._edit_info, self._completion_call, ) ) - # bui.containerwidget(edit=self._root_widget, transition='out_left') - # assert bui.app.classic is not None - # bui.app.ui_v1.set_main_window( - # PlaylistMapSelectWindow( - # self._gametype, - # self._sessiontype, - # copy.deepcopy(self._getconfig()), - # self._edit_info, - # self._completion_call, - # ), - # from_window=self, - # ) - def _choice_inc( self, setting_name: str, diff --git a/src/assets/ba_data/python/bauiv1lib/playlist/mapselect.py b/src/assets/ba_data/python/bauiv1lib/playlist/mapselect.py index 6383945d..c58128dc 100644 --- a/src/assets/ba_data/python/bauiv1lib/playlist/mapselect.py +++ b/src/assets/ba_data/python/bauiv1lib/playlist/mapselect.py @@ -61,7 +61,6 @@ class PlaylistMapSelectWindow(bui.MainWindow): super().__init__( root_widget=bui.containerwidget( size=(width, height + top_extra), - # transition=transition, scale=( 1.95 if uiscale is bui.UIScale.SMALL @@ -299,66 +298,22 @@ class PlaylistMapSelectWindow(bui.MainWindow): self.main_window_replace( StoreBrowserWindow( - # modal=True, show_tab=StoreBrowserWindow.TabID.MAPS, - # on_close_call=self._on_store_close, origin_widget=self._get_more_maps_button, minimal_toolbars=True, ) ) - # def _on_store_close(self) -> None: - # pass - # self._refresh(select_get_more_maps_button=True) - def _select(self, map_name: str) -> None: - # from bauiv1lib.playlist.editgame import PlaylistEditGameWindow # no-op if our underlying widget is dead or on its way out. - if not self._root_widget or self._root_widget.transitioning_out: + if not self.main_window_has_control(): return self._config['settings']['map'] = map_name self.main_window_back() - # bui.containerwidget(edit=self._root_widget, transition='out_right') - # assert bui.app.classic is not None - # bui.app.ui_v1.set_main_window( - # PlaylistEditGameWindow( - # self._gametype, - # self._sessiontype, - # self._config, - # self._completion_call, - # default_selection='map', - # transition='in_left', - # edit_info=self._edit_info, - # ), - # from_window=self, - # ) def _select_with_delay(self, map_name: str) -> None: bui.lock_all_input() bui.apptimer(0.1, bui.unlock_all_input) bui.apptimer(0.1, bui.WeakCall(self._select, map_name)) - - # def _cancel(self) -> None: - # from bauiv1lib.playlist.editgame import PlaylistEditGameWindow - - # # no-op if our underlying widget is dead or on its way out. - # if not self._root_widget or self._root_widget.transitioning_out: - # return - - # bui.containerwidget(edit=self._root_widget, transition='out_right') - # assert bui.app.classic is not None - # bui.app.ui_v1.set_main_window( - # PlaylistEditGameWindow( - # self._gametype, - # self._sessiontype, - # self._config, - # self._completion_call, - # default_selection='map', - # transition='in_left', - # edit_info=self._edit_info, - # ), - # from_window=self, - # is_back=True, - # ) diff --git a/src/assets/ba_data/python/bauiv1lib/playoptions.py b/src/assets/ba_data/python/bauiv1lib/playoptions.py index 0428db3a..0c772183 100644 --- a/src/assets/ba_data/python/bauiv1lib/playoptions.py +++ b/src/assets/ba_data/python/bauiv1lib/playoptions.py @@ -500,8 +500,8 @@ class PlayOptionsWindow(PopupWindow): cfg = bui.app.config cfg[self._pvars.config_name + ' Playlist Selection'] = self._playlist - # Head back to the gather window in playlist-select mode - # or start the game in regular mode. + # Head back to the gather window in playlist-select mode or + # start the game in regular mode. if self._playlist_select_context is not None: # from bauiv1lib.gather import GatherWindow @@ -514,14 +514,6 @@ class PlayOptionsWindow(PopupWindow): cfg['Private Party Host Session Type'] = typename bui.getsound('gunCocking').play() - # assert bui.app.classic is not None - # # Note: this is a wonky situation where we aren't actually - # # the main window but we set it on behalf of the main window - # # that popped us up. - # bui.app.ui_v1.set_main_window( - # GatherWindow(transition='in_right'), - # from_window=False, # Disable this test. - # ) self._transition_out(transition='out_left') if self._delegate is not None: self._delegate.on_play_options_window_run_game() diff --git a/src/assets/ba_data/python/bauiv1lib/settings/gamepad.py b/src/assets/ba_data/python/bauiv1lib/settings/gamepad.py index 962eb3ad..94b266d1 100644 --- a/src/assets/ba_data/python/bauiv1lib/settings/gamepad.py +++ b/src/assets/ba_data/python/bauiv1lib/settings/gamepad.py @@ -798,22 +798,15 @@ class GamepadSettingsWindow(bui.MainWindow): def _cancel(self) -> None: - # no-op if our underlying widget is dead or on its way out. - if not self._root_widget or self._root_widget.transitioning_out: - return - if self._modal: + # no-op if our underlying widget is dead or on its way out. + if not self._root_widget or self._root_widget.transitioning_out: + return bui.containerwidget( edit=self._root_widget, transition=self._transition_out ) else: self.main_window_back() - # assert bui.app.classic is not None - # bui.app.ui_v1.set_main_window( - # ControlsSettingsWindow(transition='in_left'), - # from_window=self, - # is_back=True, - # ) def _reset(self) -> None: from bauiv1lib.confirm import ConfirmWindow diff --git a/src/assets/ba_data/python/bauiv1lib/settings/keyboard.py b/src/assets/ba_data/python/bauiv1lib/settings/keyboard.py index 3226f7ae..5d2f6f96 100644 --- a/src/assets/ba_data/python/bauiv1lib/settings/keyboard.py +++ b/src/assets/ba_data/python/bauiv1lib/settings/keyboard.py @@ -377,17 +377,16 @@ class ConfigKeyboardWindow(bui.MainWindow): """Called when the popup is closing.""" def _save(self) -> None: - # from bauiv1lib.settings.controls import ControlsSettingsWindow - # no-op if our underlying widget is dead or on its way out. - if not self._root_widget or self._root_widget.transitioning_out: + # no-op if we're not in control. + if not self.main_window_has_control(): return assert bui.app.classic is not None - # bui.containerwidget(edit=self._root_widget, transition='out_right') bui.getsound('gunCocking').play() - # There's a chance the device disappeared; handle that gracefully. + # There's a chance the device disappeared; handle that + # gracefully. if not self._input: return @@ -402,8 +401,8 @@ class ConfigKeyboardWindow(bui.MainWindow): if val != -1: dst2[key] = val - # Send this config to the master-server so we can generate - # more defaults in the future. + # Send this config to the master-server so we can generate more + # defaults in the future. if bui.app.classic is not None: bui.app.classic.master_server_v1_post( 'controllerConfig', @@ -418,11 +417,6 @@ class ConfigKeyboardWindow(bui.MainWindow): bui.app.config.apply_and_commit() self.main_window_back() - # bui.app.ui_v1.set_main_window( - # ControlsSettingsWindow(transition='in_left'), - # from_window=self, - # is_back=True, - # ) class AwaitKeyboardInputWindow(bui.Window): diff --git a/src/assets/ba_data/python/bauiv1lib/settings/nettesting.py b/src/assets/ba_data/python/bauiv1lib/settings/nettesting.py index 9542c07f..23a6142f 100644 --- a/src/assets/ba_data/python/bauiv1lib/settings/nettesting.py +++ b/src/assets/ba_data/python/bauiv1lib/settings/nettesting.py @@ -56,10 +56,11 @@ class NetTestingWindow(bui.MainWindow): self._done_button: bui.Widget | None = bui.buttonwidget( parent=self._root_widget, position=(46, self._height - 77), - size=(120, 60), - scale=0.8, + size=(60, 60), + scale=0.9, + label=bui.charstr(bui.SpecialChar.BACK), + button_type='backSmall', autoselect=True, - label=bui.Lstr(resource='doneText'), on_activate_call=self.main_window_back, ) @@ -164,28 +165,11 @@ class NetTestingWindow(bui.MainWindow): def _show_val_testing(self) -> None: assert bui.app.classic is not None - # no-op if our underlying widget is dead or on its way out. - if not self._root_widget or self._root_widget.transitioning_out: + # no-op if we're not in control. + if not self.main_window_has_control(): return - bui.app.ui_v1.set_main_window(NetValTestingWindow(), from_window=self) - bui.containerwidget(edit=self._root_widget, transition='out_left') - - # def _done(self) -> None: - # # pylint: disable=cyclic-import - # from bauiv1lib.settings.advanced import AdvancedSettingsWindow - - # # no-op if our underlying widget is dead or on its way out. - # if not self._root_widget or self._root_widget.transitioning_out: - # return - - # assert bui.app.classic is not None - # bui.app.ui_v1.set_main_window( - # AdvancedSettingsWindow(transition='in_left'), - # from_window=self, - # is_back=True, - # ) - # bui.containerwidget(edit=self._root_widget, transition='out_right') + self.main_window_replace(NetValTestingWindow()) def _run_diagnostics(weakwin: weakref.ref[NetTestingWindow]) -> None: diff --git a/src/assets/ba_data/python/bauiv1lib/settings/touchscreen.py b/src/assets/ba_data/python/bauiv1lib/settings/touchscreen.py index ad8195a7..e468f0c2 100644 --- a/src/assets/ba_data/python/bauiv1lib/settings/touchscreen.py +++ b/src/assets/ba_data/python/bauiv1lib/settings/touchscreen.py @@ -22,7 +22,6 @@ class TouchscreenSettingsWindow(bui.MainWindow): ) -> None: self._width = 780 self._height = 380 - # self._spacing = 40 self._r = 'configTouchscreenWindow' bs.set_touchscreen_editing(True) @@ -302,19 +301,3 @@ class TouchscreenSettingsWindow(bui.MainWindow): del cfg[cfgkey] cfg.apply_and_commit() bui.apptimer(0, self._build_gui) - - # def _back(self) -> None: - # from bauiv1lib.settings import controls - - # # no-op if our underlying widget is dead or on its way out. - # if not self._root_widget or self._root_widget.transitioning_out: - # return - - # bui.containerwidget(edit=self._root_widget, transition='out_right') - # assert bui.app.classic is not None - # bui.app.ui_v1.set_main_window( - # controls.ControlsSettingsWindow(transition='in_left'), - # from_window=self, - # is_back=True, - # ) - # bs.set_touchscreen_editing(False) diff --git a/src/assets/ba_data/python/bauiv1lib/store/browser.py b/src/assets/ba_data/python/bauiv1lib/store/browser.py index 17a36740..44771ac8 100644 --- a/src/assets/ba_data/python/bauiv1lib/store/browser.py +++ b/src/assets/ba_data/python/bauiv1lib/store/browser.py @@ -42,10 +42,7 @@ class StoreBrowserWindow(bui.MainWindow): self, transition: str | None = 'in_right', origin_widget: bui.Widget | None = None, - # modal: bool = False, show_tab: StoreBrowserWindow.TabID | None = None, - # on_close_call: Callable[[], Any] | None = None, - # back_location: str | None = None, minimal_toolbars: bool = False, ): # pylint: disable=too-many-statements @@ -59,20 +56,11 @@ class StoreBrowserWindow(bui.MainWindow): bui.set_analytics_screen('Store Window') - # Need to store this ourself for modal mode. - # if origin_widget is not None: - # self._transition_out = 'out_scale' - # else: - # self._transition_out = 'out_right' - self.button_infos: dict[str, dict[str, Any]] | None = None self.update_buttons_timer: bui.AppTimer | None = None self._status_textwidget_update_timer = None - # self._back_location = back_location - # self._on_close_call = on_close_call self._show_tab = show_tab - # self._modal = modal self._width = 1670 if uiscale is bui.UIScale.SMALL else 1040 self._x_inset = x_inset = 310 if uiscale is bui.UIScale.SMALL else 0 self._height = ( @@ -1252,31 +1240,13 @@ class StoreBrowserWindow(bui.MainWindow): except Exception: logging.exception('Error restoring state for %s.', self) - # def _back(self) -> None: - - # # if self._modal: - # # # no-op if our underlying widget is dead or on its way out. - # # if not self._root_widget or self._root_widget.transitioning_out: - # # return - # # self._save_state() - # # bui.containerwidget( - # # edit=self._root_widget, transition=self._transition_out - # # ) - # # else: - # # no-op if we're not currently in control. - # if not self.main_window_has_control(): - # return - # self.main_window_back() - # # if self._on_close_call is not None: - # # self._on_close_call() - def _check_merch_availability_in_bg_thread() -> None: # pylint: disable=cell-var-from-loop - # Merch is available from some countries only. - # Make a reasonable check to ask the master-server about this at - # launch and store the results. + # Merch is available from some countries only. Make a reasonable + # check to ask the master-server about this at launch and store the + # results. plus = bui.app.plus assert plus is not None diff --git a/src/assets/ba_data/python/bauiv1lib/watch.py b/src/assets/ba_data/python/bauiv1lib/watch.py index 7d6ced1a..d5dcb133 100644 --- a/src/assets/ba_data/python/bauiv1lib/watch.py +++ b/src/assets/ba_data/python/bauiv1lib/watch.py @@ -87,19 +87,13 @@ class WatchWindow(bui.MainWindow): parent=self._root_widget, autoselect=True, position=(70 + x_inset, self._height - 74), - size=(140, 60), + size=(60, 60), scale=1.1, - label=bui.Lstr(resource='backText'), - button_type='back', + label=bui.charstr(bui.SpecialChar.BACK), + button_type='backSmall', on_activate_call=self.main_window_back, ) bui.containerwidget(edit=self._root_widget, cancel_button=btn) - bui.buttonwidget( - edit=btn, - button_type='backSmall', - size=(60, 60), - label=bui.charstr(bui.SpecialChar.BACK), - ) bui.textwidget( parent=self._root_widget, diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index 68c6f256..fe1c0e3a 100644 --- a/src/ballistica/shared/ballistica.cc +++ b/src/ballistica/shared/ballistica.cc @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int { namespace ballistica { // These are set automatically via script; don't modify them here. -const int kEngineBuildNumber = 21987; +const int kEngineBuildNumber = 21988; const char* kEngineVersion = "1.7.37"; const int kEngineApiVersion = 9;