langs and more ui wiring

This commit is contained in:
Eric Froemling 2024-12-12 02:25:43 -08:00
parent 327324a08a
commit 1aa3e39ec5
No known key found for this signature in database
14 changed files with 180 additions and 138 deletions

88
.efrocachemap generated
View File

@ -421,9 +421,9 @@
"build/assets/ba_data/audio/zoeOw.ogg": "b2d705c31c9dcc1efdc71394764c3beb", "build/assets/ba_data/audio/zoeOw.ogg": "b2d705c31c9dcc1efdc71394764c3beb",
"build/assets/ba_data/audio/zoePickup01.ogg": "e9366dc2d2b8ab8b0c4e2c14c02d0789", "build/assets/ba_data/audio/zoePickup01.ogg": "e9366dc2d2b8ab8b0c4e2c14c02d0789",
"build/assets/ba_data/audio/zoeScream01.ogg": "903e0e45ee9b3373e9d9ce20c814374e", "build/assets/ba_data/audio/zoeScream01.ogg": "903e0e45ee9b3373e9d9ce20c814374e",
"build/assets/ba_data/data/langdata.json": "03810e5cca79c5fa092f47648060ca0f", "build/assets/ba_data/data/langdata.json": "7db4a04756081874702adcd3b295d9e8",
"build/assets/ba_data/data/languages/arabic.json": "8f89f09ad168c251765efebde4c9069c", "build/assets/ba_data/data/languages/arabic.json": "8f89f09ad168c251765efebde4c9069c",
"build/assets/ba_data/data/languages/belarussian.json": "1004e5ea10b8deaef517fd37e9309521", "build/assets/ba_data/data/languages/belarussian.json": "0b60a9d4496d1213c2d0b647d346ce30",
"build/assets/ba_data/data/languages/chinese.json": "3a8ad6b99e13152872962019b3eef49d", "build/assets/ba_data/data/languages/chinese.json": "3a8ad6b99e13152872962019b3eef49d",
"build/assets/ba_data/data/languages/chinesetraditional.json": "904b35b656c53f9830e406565edd5120", "build/assets/ba_data/data/languages/chinesetraditional.json": "904b35b656c53f9830e406565edd5120",
"build/assets/ba_data/data/languages/croatian.json": "1e541070309ff6be95b0c39940aa7e99", "build/assets/ba_data/data/languages/croatian.json": "1e541070309ff6be95b0c39940aa7e99",
@ -440,22 +440,22 @@
"build/assets/ba_data/data/languages/hindi.json": "567e6976b3c72f891431ad7fcc62ab16", "build/assets/ba_data/data/languages/hindi.json": "567e6976b3c72f891431ad7fcc62ab16",
"build/assets/ba_data/data/languages/hungarian.json": "9d88004a98f0fbe2ea72edd5e0b3002e", "build/assets/ba_data/data/languages/hungarian.json": "9d88004a98f0fbe2ea72edd5e0b3002e",
"build/assets/ba_data/data/languages/indonesian.json": "2ccb3fe081ead7706dbebb1008a8bc4e", "build/assets/ba_data/data/languages/indonesian.json": "2ccb3fe081ead7706dbebb1008a8bc4e",
"build/assets/ba_data/data/languages/italian.json": "43735ea42d14c121bc14eace16f904a2", "build/assets/ba_data/data/languages/italian.json": "eabad2faba952c426876bc07e1490d09",
"build/assets/ba_data/data/languages/korean.json": "4e3524327a0174250aff5e1ef4c0c597", "build/assets/ba_data/data/languages/korean.json": "4e3524327a0174250aff5e1ef4c0c597",
"build/assets/ba_data/data/languages/malay.json": "f6ce0426d03a62612e3e436ed5d1be1f", "build/assets/ba_data/data/languages/malay.json": "f6ce0426d03a62612e3e436ed5d1be1f",
"build/assets/ba_data/data/languages/persian.json": "2584895475fe62b3fe49a5ea5e69b4b1", "build/assets/ba_data/data/languages/persian.json": "2584895475fe62b3fe49a5ea5e69b4b1",
"build/assets/ba_data/data/languages/piratespeak.json": "b9fe871e6331b7178cbacbf7eb3033aa", "build/assets/ba_data/data/languages/piratespeak.json": "7c7e3b72b87c1bcd5b04c9f64d912f0c",
"build/assets/ba_data/data/languages/polish.json": "d0822d5d3bdd72ddb04dc3c43a0b1395", "build/assets/ba_data/data/languages/polish.json": "d0822d5d3bdd72ddb04dc3c43a0b1395",
"build/assets/ba_data/data/languages/portuguese.json": "46649f4a8f3c5f69758e8b75ffacf439", "build/assets/ba_data/data/languages/portuguese.json": "b4463a05d65515f6812e1177c60ac666",
"build/assets/ba_data/data/languages/romanian.json": "5ae206fe0b71c4015b02b86da8931c8f", "build/assets/ba_data/data/languages/romanian.json": "5ae206fe0b71c4015b02b86da8931c8f",
"build/assets/ba_data/data/languages/russian.json": "72bdbb27ede61bbfeafbf81fa4a19e45", "build/assets/ba_data/data/languages/russian.json": "fc64ed6b6356ea11385ee5c20748425a",
"build/assets/ba_data/data/languages/serbian.json": "623fa4129a1154c2f32ed7867e56ff6a", "build/assets/ba_data/data/languages/serbian.json": "623fa4129a1154c2f32ed7867e56ff6a",
"build/assets/ba_data/data/languages/slovak.json": "3c08c748c96c71bd9e1d7291fb8817b6", "build/assets/ba_data/data/languages/slovak.json": "3c08c748c96c71bd9e1d7291fb8817b6",
"build/assets/ba_data/data/languages/spanish.json": "13f587058931acbb68a48981063ee5ff", "build/assets/ba_data/data/languages/spanish.json": "499b464318a8c9d1fb271cf480862b57",
"build/assets/ba_data/data/languages/swedish.json": "3b179e7333183c70adb0811246b09959", "build/assets/ba_data/data/languages/swedish.json": "3b179e7333183c70adb0811246b09959",
"build/assets/ba_data/data/languages/tamil.json": "ead39b864228696a9b0d19344bc4b5ec", "build/assets/ba_data/data/languages/tamil.json": "ead39b864228696a9b0d19344bc4b5ec",
"build/assets/ba_data/data/languages/thai.json": "383540a1e9c7c131ac579f51afc87471", "build/assets/ba_data/data/languages/thai.json": "383540a1e9c7c131ac579f51afc87471",
"build/assets/ba_data/data/languages/turkish.json": "440cb59e69ed689018c17d4be0fb4696", "build/assets/ba_data/data/languages/turkish.json": "ccec3224e41bee03f798d9c1a7d23342",
"build/assets/ba_data/data/languages/ukrainian.json": "6063d27c9d6ed013b2b64ff452433621", "build/assets/ba_data/data/languages/ukrainian.json": "6063d27c9d6ed013b2b64ff452433621",
"build/assets/ba_data/data/languages/venetian.json": "abebcc38ca2655578e65428cc0dd3c45", "build/assets/ba_data/data/languages/venetian.json": "abebcc38ca2655578e65428cc0dd3c45",
"build/assets/ba_data/data/languages/vietnamese.json": "59f6686890ceac2b0ac92597751a18ca", "build/assets/ba_data/data/languages/vietnamese.json": "59f6686890ceac2b0ac92597751a18ca",
@ -4103,42 +4103,42 @@
"build/assets/windows/Win32/ucrtbased.dll": "bfd1180c269d3950b76f35a63655e9e1", "build/assets/windows/Win32/ucrtbased.dll": "bfd1180c269d3950b76f35a63655e9e1",
"build/assets/windows/Win32/vc_redist.x86.exe": "15a5f1f876503885adbdf5b3989b3718", "build/assets/windows/Win32/vc_redist.x86.exe": "15a5f1f876503885adbdf5b3989b3718",
"build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599", "build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599",
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "350b2bde93ebd0b898af75e7c537593e", "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "6a6b5a81a0398637ab032501ebef45e0",
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "aa93eac2ca5e2b585bc58007a9a7374d", "build/prefab/full/linux_arm64_gui/release/ballisticakit": "e25e7120708abad6a26c202e3f43f2a1",
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "195d8e78d9598bd94d6912de4c7c08f1", "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "38c6cd9d1fda895d5438a127cc4025df",
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "e5f9cd858fb8b699fd79fe75a54acdcb", "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "58391fd251fa3698fd60e49f8ffab8dd",
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "5455d6b73d70b60390f2455cd145f6fd", "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "de106a0d319b579487b3f49d9a839de0",
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "b2eda8f3cb29e99157e47852aad17930", "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "e02ae01dc7922b1324a506805aade940",
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "eb3cc9dc20632ce84d1b2cd4d3072ea8", "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "dfffbd298de9818511e85a92b9b896f2",
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "b3f2fce44e5552093825190b763826a8", "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "b778c94e161a86c69c9d9279a33f99e2",
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "20b8de1495c2d82e079e6ea1ea720888", "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "e16970fb9f8cf72e74a957126feff8f2",
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "a624bd02b74589a097aa265e7c42fc10", "build/prefab/full/mac_arm64_gui/release/ballisticakit": "081674ba8c39a729d0ca0cdd4e18e7c5",
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "25630bca72b77a6dc56013ee0e8367a3", "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "05690b982897eab49ca81b44ccf128a9",
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "030e2ee45f19c69770e079d48a474b7c", "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "66622ba04928e7c27a2fc56188fa199d",
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "ee59e9bf36b46e574f33a3826430b5d2", "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "b4719f8a13595a66c706597c7f8d5af4",
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "70ce8264ec98aa3de411838c6aaa329b", "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "2c946e8429e6e30c31ff233ff12e40ba",
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "68bd3725e087fac142979f9f5c1d0dc3", "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "05f5752ee8889cda4c084b5475872aea",
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "c69217389ecaf461af3b9a25a9ddb7c0", "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "81a6e9ea469430c4d3e960d998e80f93",
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "678f8cbc0a31cf59f86211804f3d18f3", "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "70370c724e34f5e84c2af6ea3a5c70a4",
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "658a1267cf8454e74dd7a43d4921a862", "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "59bd83efb949ff66e8845ee1b6f04deb",
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "678f8cbc0a31cf59f86211804f3d18f3", "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "70370c724e34f5e84c2af6ea3a5c70a4",
"build/prefab/lib/linux_arm64_server/release/libballisticaplus.a": "658a1267cf8454e74dd7a43d4921a862", "build/prefab/lib/linux_arm64_server/release/libballisticaplus.a": "59bd83efb949ff66e8845ee1b6f04deb",
"build/prefab/lib/linux_x86_64_gui/debug/libballisticaplus.a": "5dfc9ffb40df78765dee25eed63b4d30", "build/prefab/lib/linux_x86_64_gui/debug/libballisticaplus.a": "a102df2262d65b3e7368be2092c39032",
"build/prefab/lib/linux_x86_64_gui/release/libballisticaplus.a": "9c65f68f604202158a6c7486eeb985a9", "build/prefab/lib/linux_x86_64_gui/release/libballisticaplus.a": "bd88ede126790cb71c571817ba97a055",
"build/prefab/lib/linux_x86_64_server/debug/libballisticaplus.a": "5dfc9ffb40df78765dee25eed63b4d30", "build/prefab/lib/linux_x86_64_server/debug/libballisticaplus.a": "a102df2262d65b3e7368be2092c39032",
"build/prefab/lib/linux_x86_64_server/release/libballisticaplus.a": "9c65f68f604202158a6c7486eeb985a9", "build/prefab/lib/linux_x86_64_server/release/libballisticaplus.a": "bd88ede126790cb71c571817ba97a055",
"build/prefab/lib/mac_arm64_gui/debug/libballisticaplus.a": "4e5e0cac71feae718dfcccdeaa03eba1", "build/prefab/lib/mac_arm64_gui/debug/libballisticaplus.a": "82c4761b385f40fbb78c4538ce22356f",
"build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "c54e70ec873ecab76c655c20e13f595e", "build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "48c26b5899970ceaeaa09d47de7537dc",
"build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "4e5e0cac71feae718dfcccdeaa03eba1", "build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "82c4761b385f40fbb78c4538ce22356f",
"build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "c54e70ec873ecab76c655c20e13f595e", "build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "48c26b5899970ceaeaa09d47de7537dc",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "07b2fb0516fce4cce2bd1be0ec4a72ba", "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "f911b4274de1beffbd32edbcb66ebff8",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "af473b4892a9e38c0e7a377534002639", "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "0e4e1340b2dbe074546d3831af9d115a",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "0197ca506582361947be75ee7d3872cd", "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "7f67b5ed4ce5c72103f0eb920597e8c9",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "bf721fa759cc404b78b12467ece5158c", "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "9c706ceda2432513ecb3bb14b57ccab8",
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "469d1e980701c71ff59e027ed3bf194e", "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "e95a15ac3ed57d1177a2a877feb7de15",
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "616ac71908f70c7073007cc6be0097bf", "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "77453446385b7a35a7e9b16f42009616",
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "587ce43506de3fb122481b9fba5a29e8", "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "e4d1fb62b0a0a67e92c7a20461acd18d",
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "e733a9814771f96448c055071fefec20", "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "956281fe24cdd7c420440c47334f3bf9",
"src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c", "src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c",
"src/assets/ba_data/python/babase/_mgen/enums.py": "794d258d59fd17a61752843a9a0551ad", "src/assets/ba_data/python/babase/_mgen/enums.py": "794d258d59fd17a61752843a9a0551ad",
"src/ballistica/base/mgen/pyembed/binding_base.inc": "06042d31df0ff9af96b99477162e2a91", "src/ballistica/base/mgen/pyembed/binding_base.inc": "06042d31df0ff9af96b99477162e2a91",

View File

@ -1,4 +1,4 @@
### 1.7.37 (build 22130, api 9, 2024-12-06) ### 1.7.37 (build 22133, api 9, 2024-12-12)
- Bumping api version to 9. As you'll see below, there's some UI changes that - 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 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. touch UI stuff at all you can simply bump your api version and call it a day.

View File

@ -5,7 +5,7 @@ furo==2024.8.6
mypy==1.13.0 mypy==1.13.0
pbxproj==4.2.1 pbxproj==4.2.1
pdoc==15.0.0 pdoc==15.0.0
pur==7.3.2 pur==7.3.3
pylint==3.3.2 pylint==3.3.2
pylsp-mypy==0.6.9 pylsp-mypy==0.6.9
pytest==8.3.4 pytest==8.3.4

View File

@ -33,7 +33,7 @@ class NetworkSubsystem:
# that a nearby server has been pinged. # that a nearby server has been pinged.
self.zone_pings: dict[str, float] = {} self.zone_pings: dict[str, float] = {}
# For debugging. # For debugging/progress.
self.v1_test_log: str = '' self.v1_test_log: str = ''
self.v1_ctest_results: dict[int, str] = {} self.v1_ctest_results: dict[int, str] = {}
self.connectivity_state = 'uninited' self.connectivity_state = 'uninited'

View File

@ -202,8 +202,9 @@ class ClassicAppMode(babase.AppMode):
print(f'GOT SUB TEST UPDATE: {val}') print(f'GOT SUB TEST UPDATE: {val}')
def _on_classic_account_data_change( def _on_classic_account_data_change(
self, val: bacommon.cloud.ClassicAccountLiveData self, val: bacommon.cloud.BSClassicAccountLiveData
) -> None: ) -> None:
# print('ACCOUNT CHANGED', val)
achp = round(val.achievements / max(val.achievements_total, 1) * 100.0) achp = round(val.achievements / max(val.achievements_total, 1) * 100.0)
ibc = str(val.inbox_count) ibc = str(val.inbox_count)
if val.inbox_count_is_max: if val.inbox_count_is_max:

View File

@ -53,7 +53,7 @@ if TYPE_CHECKING:
# Build number and version of the ballistica binary we expect to be # Build number and version of the ballistica binary we expect to be
# using. # using.
TARGET_BALLISTICA_BUILD = 22130 TARGET_BALLISTICA_BUILD = 22133
TARGET_BALLISTICA_VERSION = '1.7.37' TARGET_BALLISTICA_VERSION = '1.7.37'

View File

@ -202,7 +202,7 @@ class CloudSubsystem(babase.AppSubsystem):
def subscribe_classic_account_data( def subscribe_classic_account_data(
self, self,
updatecall: Callable[[bacommon.cloud.ClassicAccountLiveData], None], updatecall: Callable[[bacommon.cloud.BSClassicAccountLiveData], None],
) -> babase.CloudSubscription: ) -> babase.CloudSubscription:
"""Subscribe to classic account data.""" """Subscribe to classic account data."""
raise NotImplementedError( raise NotImplementedError(

View File

@ -369,7 +369,15 @@ class AccountSettingsWindow(bui.MainWindow):
show_manage_account_button = primary_v2_account is not None show_manage_account_button = primary_v2_account is not None
manage_account_button_space = 70.0 manage_account_button_space = 70.0
show_delete_account_button = primary_v2_account is not None # Apple asks us to make a delete-account button directly
# available in the UI. Currently disabling this elsewhere
# however as I feel that poking 'Manage Account' and scrolling
# down to 'Delete Account' is not hard to find.
show_delete_account_button = primary_v2_account is not None and (
bui.app.classic is not None
and bui.app.classic.platform == 'mac'
and bui.app.classic.subplatform == 'appstore'
)
delete_account_button_space = 70.0 delete_account_button_space = 70.0
show_link_accounts_button = self._v1_signed_in and ( show_link_accounts_button = self._v1_signed_in and (

View File

@ -4,7 +4,6 @@
from __future__ import annotations from __future__ import annotations
import time
from typing import TYPE_CHECKING from typing import TYPE_CHECKING
import bauiv1 as bui import bauiv1 as bui
@ -49,12 +48,6 @@ class WaitForConnectivityWindow(bui.Window):
self._on_cancel = on_cancel self._on_cancel = on_cancel
self._width = 650 self._width = 650
self._height = 300 self._height = 300
self._infos: list[str | bui.Lstr] = [
'This can take a few moments, especially on first launch.',
'Make sure your internet connection is working.',
]
self._last_info_switch_time = time.monotonic()
self._info_index = 0
super().__init__( super().__init__(
root_widget=bui.containerwidget( root_widget=bui.containerwidget(
size=(self._width, self._height), size=(self._width, self._height),
@ -69,21 +62,23 @@ class WaitForConnectivityWindow(bui.Window):
scale=1.2, scale=1.2,
h_align='center', h_align='center',
v_align='center', v_align='center',
text='Locating nearest regional servers...', text=bui.Lstr(resource='internal.connectingToPartyText'),
maxwidth=self._width * 0.9, maxwidth=self._width * 0.9,
) )
self._info_text = bui.textwidget( self._info_text = bui.textwidget(
parent=self._root_widget, parent=self._root_widget,
position=(self._width * 0.5, self._height * 0.45), position=(self._width * 0.5, self._height * 0.45),
size=(0, 0), size=(0, 0),
color=(0.7, 0.6, 0.7), color=(0.6, 0.5, 0.6),
flatness=1.0, flatness=1.0,
scale=0.8, shadow=0.0,
scale=0.75,
h_align='center', h_align='center',
v_align='center', v_align='center',
text=self._infos[0], text='',
maxwidth=self._width * 0.9, maxwidth=self._width * 0.9,
) )
self._info_text_str = ''
cancel_button = bui.buttonwidget( cancel_button = bui.buttonwidget(
parent=self._root_widget, parent=self._root_widget,
autoselect=True, autoselect=True,
@ -98,7 +93,6 @@ class WaitForConnectivityWindow(bui.Window):
) )
def _update(self) -> None: def _update(self) -> None:
now = time.monotonic()
plus = bui.app.plus plus = bui.app.plus
assert plus is not None assert plus is not None
@ -107,12 +101,16 @@ class WaitForConnectivityWindow(bui.Window):
self._connected() self._connected()
return return
if now - self._last_info_switch_time > 5.0: # Show what connectivity is up to if we don't have any published
self._info_index = (self._info_index + 1) % len(self._infos) # zone-pings yet (or if we do but there's no transport state to
bui.textwidget( # show yet).
edit=self._info_text, text=self._infos[self._info_index] if not bui.app.net.zone_pings or not bui.app.net.transport_state:
) infotext = bui.app.net.connectivity_state
self._last_info_switch_time = now else:
infotext = bui.app.net.transport_state
if infotext != self._info_text_str:
self._info_text_str = infotext
bui.textwidget(edit=self._info_text, text=infotext)
def _connected(self) -> None: def _connected(self) -> None:
if not self._root_widget or self._root_widget.transitioning_out: if not self._root_widget or self._root_widget.transitioning_out:

View File

@ -36,16 +36,12 @@ class _MessageEntry:
class InboxWindow(bui.MainWindow): class InboxWindow(bui.MainWindow):
"""Popup window to show account messages.""" """Popup window to show account messages."""
def __del__(self) -> None:
print('~InboxWindow()')
def __init__( def __init__(
self, self,
transition: str | None = 'in_right', transition: str | None = 'in_right',
origin_widget: bui.Widget | None = None, origin_widget: bui.Widget | None = None,
): ):
print('InboxWindow()')
assert bui.app.classic is not None assert bui.app.classic is not None
uiscale = bui.app.ui_v1.uiscale uiscale = bui.app.ui_v1.uiscale
@ -63,9 +59,7 @@ class InboxWindow(bui.MainWindow):
root_widget=bui.containerwidget( root_widget=bui.containerwidget(
size=(self._width, self._height), size=(self._width, self._height),
toolbar_visibility=( toolbar_visibility=(
'menu_minimal' 'menu_full' if uiscale is bui.UIScale.SMALL else 'menu_full'
if uiscale is bui.UIScale.SMALL
else 'menu_full'
), ),
scale=( scale=(
2.3 2.3
@ -119,15 +113,29 @@ class InboxWindow(bui.MainWindow):
color=bui.app.ui_v1.title_color, color=bui.app.ui_v1.title_color,
) )
# Shows 'loading', 'no messages', etc.
self._infotext = bui.textwidget(
parent=self._root_widget,
position=(self._width * 0.5, self._height * 0.5),
maxwidth=self._width * 0.7,
scale=0.5,
flatness=1.0,
color=(0.4, 0.4, 0.5),
shadow=0.0,
text=bui.Lstr(resource='loadingText'),
size=(0, 0),
h_align='center',
v_align='center',
)
self._scrollwidget = bui.scrollwidget( self._scrollwidget = bui.scrollwidget(
parent=self._root_widget, parent=self._root_widget,
size=( size=(
self._width - 60, self._width - 60,
self._height - (150 if uiscale is bui.UIScale.SMALL else 70), self._height - (170 if uiscale is bui.UIScale.SMALL else 70),
), ),
position=( position=(
30, 30,
(110 if uiscale is bui.UIScale.SMALL else 30) + yoffs, (133 if uiscale is bui.UIScale.SMALL else 30) + yoffs,
), ),
capture_arrows=True, capture_arrows=True,
simple_culling_v=200, simple_culling_v=200,
@ -172,17 +180,9 @@ class InboxWindow(bui.MainWindow):
def _error(self, errmsg: bui.Lstr | str) -> None: def _error(self, errmsg: bui.Lstr | str) -> None:
"""Put ourself in a permanent error state.""" """Put ourself in a permanent error state."""
bui.textwidget( bui.textwidget(
parent=self._root_widget, edit=self._infotext,
position=(self._width * 0.5, self._height * 0.5),
maxwidth=self._width * 0.7,
scale=1.0,
flatness=1.0,
color=(1, 0, 0), color=(1, 0, 0),
shadow=0.0,
text=errmsg, text=errmsg,
size=(0, 0),
h_align='center',
v_align='center',
) )
def _on_message_entry_press( def _on_message_entry_press(
@ -315,7 +315,21 @@ class InboxWindow(bui.MainWindow):
# Whee; no error. Mark as done. # Whee; no error. Mark as done.
if button is not None: if button is not None:
bui.buttonwidget(edit=button, label=bui.Lstr(resource='doneText')) # For positive claim buttons, say 'success'.
# Otherwise default to 'done.'
if (
entry.type
in {
bacommon.cloud.BSInboxEntryType.CLAIM,
bacommon.cloud.BSInboxEntryType.CLAIM_DISCARD,
}
and process_type
is bacommon.cloud.BSInboxEntryProcessType.POSITIVE
):
label = bui.Lstr(resource='successText')
else:
label = bui.Lstr(resource='doneText')
bui.buttonwidget(edit=button, label=label)
def _on_inbox_request_response( def _on_inbox_request_response(
self, response: bacommon.cloud.BSInboxRequestResponse | Exception self, response: bacommon.cloud.BSInboxRequestResponse | Exception
@ -350,20 +364,14 @@ class InboxWindow(bui.MainWindow):
# keyboard control working in the empty case. # keyboard control working in the empty case.
if not response.entries: if not response.entries:
bui.textwidget( bui.textwidget(
parent=self._root_widget, edit=self._infotext,
position=(self._width * 0.5, self._height * 0.5), color=(0.4, 0.4, 0.5),
maxwidth=self._width * 0.7,
scale=1.0,
flatness=1.0,
color=(0.4, 0.4, 0.4),
shadow=0.0,
text=bui.Lstr(resource='noMessagesText'), text=bui.Lstr(resource='noMessagesText'),
size=(0, 0),
h_align='center',
v_align='center',
) )
return return
bui.textwidget(edit=self._infotext, text='')
sub_width = self._width - 90 sub_width = self._width - 90
sub_height = 0.0 sub_height = 0.0

View File

@ -66,8 +66,8 @@ auto BasePlatform::GetPublicDeviceUUID() -> std::string {
// We used to plug version in directly here, but that caused uuids to // We used to plug version in directly here, but that caused uuids to
// shuffle too rapidly during periods of rapid development. This // shuffle too rapidly during periods of rapid development. This
// keeps it more constant. // keeps it more constant.
// __last_rand_uuid_component_shuffle_date__ 2024 6 13 // __last_rand_uuid_component_shuffle_date__ 2024 12 11
auto rand_uuid_component{"1URRE62C7234VP9L1BUPJ1P7QT7Q8YW3"}; auto rand_uuid_component{"ACIMGEQUN3F6CIUMFYO3X6GYLPTTSPOZ"};
inputs.emplace_back(rand_uuid_component); inputs.emplace_back(rand_uuid_component);
auto gil{Python::ScopedInterpreterLock()}; auto gil{Python::ScopedInterpreterLock()};

View File

@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int {
namespace ballistica { namespace ballistica {
// These are set automatically via script; don't modify them here. // These are set automatically via script; don't modify them here.
const int kEngineBuildNumber = 22130; const int kEngineBuildNumber = 22133;
const char* kEngineVersion = "1.7.37"; const char* kEngineVersion = "1.7.37";
const int kEngineApiVersion = 9; const int kEngineApiVersion = 9;

View File

@ -18,11 +18,12 @@
namespace ballistica::ui_v1 { namespace ballistica::ui_v1 {
#define TOOLBAR_OPACITY_2 1.0f static const float kBotLeftColorR{0.6f};
static const float kBotLeftColorG{0.6f};
static const float kBotLeftColorB{0.8f};
#define BOT_LEFT_COLOR_R 0.6 // Flip this to true when we're ready to use levels.
#define BOT_LEFT_COLOR_G 0.6 static const bool kShowLevels{false};
#define BOT_LEFT_COLOR_B 0.8
// For defining toolbar buttons. // For defining toolbar buttons.
struct RootWidget::ButtonDef { struct RootWidget::ButtonDef {
@ -166,24 +167,30 @@ void RootWidget::AddMeter_(MeterType type, float h_align, float r, float g,
bd.color_b = 0.5f; bd.color_b = 0.5f;
bd.depth_min = 0.3f; bd.depth_min = 0.3f;
bd.visibility_mask =
(static_cast<uint32_t>(Widget::ToolbarVisibility::kMenuFull)
| static_cast<uint32_t>(Widget::ToolbarVisibility::kMenuFullNoBack)
| static_cast<uint32_t>(Widget::ToolbarVisibility::kMenuFullRoot));
bd.allow_in_game = false; if (type == MeterType::kLevel && !kShowLevels) {
// Keep levels hidden always.
} else {
bd.visibility_mask =
(static_cast<uint32_t>(Widget::ToolbarVisibility::kMenuFull)
| static_cast<uint32_t>(Widget::ToolbarVisibility::kMenuFullNoBack)
| static_cast<uint32_t>(Widget::ToolbarVisibility::kMenuFullRoot));
// Show some in store mode. bd.allow_in_game = false;
if (type == MeterType::kLevel || type == MeterType::kTickets) {
bd.visibility_mask |= // Show some in store mode.
static_cast<uint32_t>(Widget::ToolbarVisibility::kMenuStore) if (type == MeterType::kLevel || type == MeterType::kTickets) {
| static_cast<uint32_t>(Widget::ToolbarVisibility::kMenuStoreNoBack); bd.visibility_mask |=
} static_cast<uint32_t>(Widget::ToolbarVisibility::kMenuStore)
// Show some in get-tokens/tokens mode | static_cast<uint32_t>(
if (type == MeterType::kTokens) { Widget::ToolbarVisibility::kMenuStoreNoBack);
bd.visibility_mask |= }
static_cast<uint32_t>(Widget::ToolbarVisibility::kGetTokens) // Show some in get-tokens/tokens mode
| static_cast<uint32_t>(Widget::ToolbarVisibility::kMenuTokens); if (type == MeterType::kTokens) {
bd.visibility_mask |=
static_cast<uint32_t>(Widget::ToolbarVisibility::kGetTokens)
| static_cast<uint32_t>(Widget::ToolbarVisibility::kMenuTokens);
}
} }
// Adjust buffer between neighbors. // Adjust buffer between neighbors.
@ -531,7 +538,7 @@ void RootWidget::Setup() {
AddMeter_(MeterType::kLevel, 0.0f, 1.0f, 1.0f, 1.0f, false, ""); AddMeter_(MeterType::kLevel, 0.0f, 1.0f, 1.0f, 1.0f, false, "");
AddMeter_(MeterType::kTrophy, 0.0f, 1.0f, 1.0f, 1.0f, false, ""); AddMeter_(MeterType::kTrophy, 0.0f, 1.0f, 1.0f, 1.0f, false, "");
// Menu button (only shows up when we're not in a menu) // Menu button (only shows up when we're not in a menu).
// FIXME - this should never be visible on TV or VR UI modes // FIXME - this should never be visible on TV or VR UI modes
{ {
ButtonDef b; ButtonDef b;
@ -618,9 +625,9 @@ void RootWidget::Setup() {
b.width = b.height = 60.0f; b.width = b.height = 60.0f;
// b.x = bx; // b.x = bx;
b.y = b.height * 0.5f + 2.0f; b.y = b.height * 0.5f + 2.0f;
b.color_r = BOT_LEFT_COLOR_R; b.color_r = kBotLeftColorR;
b.color_g = BOT_LEFT_COLOR_G; b.color_g = kBotLeftColorG;
b.color_b = BOT_LEFT_COLOR_B; b.color_b = kBotLeftColorB;
b.img = "logIcon"; b.img = "logIcon";
b.call = UIV1Python::ObjID::kRootUIInboxButtonPressCall; b.call = UIV1Python::ObjID::kRootUIInboxButtonPressCall;
b.visibility_mask = b.visibility_mask =
@ -675,9 +682,9 @@ void RootWidget::Setup() {
b.v_align = VAlign::kBottom; b.v_align = VAlign::kBottom;
b.width = b.height = 60.0f; b.width = b.height = 60.0f;
b.y = b.height * 0.5f + 2.0f; b.y = b.height * 0.5f + 2.0f;
b.color_r = BOT_LEFT_COLOR_R; b.color_r = kBotLeftColorR;
b.color_g = BOT_LEFT_COLOR_G; b.color_g = kBotLeftColorG;
b.color_b = BOT_LEFT_COLOR_B; b.color_b = kBotLeftColorB;
b.img = "achievementsIcon"; b.img = "achievementsIcon";
b.call = UIV1Python::ObjID::kRootUIAchievementsButtonPressCall; b.call = UIV1Python::ObjID::kRootUIAchievementsButtonPressCall;
b.visibility_mask = b.visibility_mask =
@ -717,9 +724,9 @@ void RootWidget::Setup() {
b.width = b.height = 60.0f; b.width = b.height = 60.0f;
// b.x = bx; // b.x = bx;
b.y = b.height * 0.5f + 2.0f; b.y = b.height * 0.5f + 2.0f;
b.color_r = BOT_LEFT_COLOR_R; b.color_r = kBotLeftColorR;
b.color_g = BOT_LEFT_COLOR_G; b.color_g = kBotLeftColorG;
b.color_b = BOT_LEFT_COLOR_B; b.color_b = kBotLeftColorB;
b.img = "leaderboardsIcon"; b.img = "leaderboardsIcon";
b.visibility_mask = b.visibility_mask =
(static_cast<uint32_t>(Widget::ToolbarVisibility::kMenuFull) (static_cast<uint32_t>(Widget::ToolbarVisibility::kMenuFull)
@ -737,9 +744,9 @@ void RootWidget::Setup() {
b.width = b.height = 60.0f; b.width = b.height = 60.0f;
// b.x = bx; // b.x = bx;
b.y = b.height * 0.58f - 2.0f; b.y = b.height * 0.58f - 2.0f;
b.color_r = BOT_LEFT_COLOR_R; b.color_r = kBotLeftColorR;
b.color_g = BOT_LEFT_COLOR_G; b.color_g = kBotLeftColorG;
b.color_b = BOT_LEFT_COLOR_B; b.color_b = kBotLeftColorB;
b.img = "settingsIcon"; b.img = "settingsIcon";
b.call = UIV1Python::ObjID::kRootUISettingsButtonPressCall; b.call = UIV1Python::ObjID::kRootUISettingsButtonPressCall;
b.visibility_mask = b.visibility_mask =
@ -1023,9 +1030,9 @@ void RootWidget::UpdateForFocusedWindow_(Widget* widget) {
} }
void RootWidget::StepChildWidgets_(float dt) { void RootWidget::StepChildWidgets_(float dt) {
// Hitches tend to break our math and cause buttons to overshoot on // Hitches tend to break our math and cause buttons to overshoot on their
// their transitions in and then back up. So let's limit our max dt // transitions in and then back up. So let's limit our max dt to about
// to about what ~30fps would give us. // what ~30fps would give us.
dt = std::min(dt, 1000.0f / 30.0f); dt = std::min(dt, 1000.0f / 30.0f);
if (!child_widgets_dirty_) { if (!child_widgets_dirty_) {

View File

@ -327,11 +327,29 @@ class BSPrivatePartyResponse(Response):
datacode: Annotated[str | None, IOAttrs('d')] datacode: Annotated[str | None, IOAttrs('d')]
class BSClassicChestAppearance(Enum):
"""Appearances bombsquad classic chests can have."""
UNKNOWN = 'u'
DEFAULT = 'd'
@ioprepped @ioprepped
@dataclass @dataclass
class ClassicAccountLiveData: class BSClassicAccountLiveData:
"""Account related data kept up to date live for classic app mode.""" """Account related data kept up to date live for classic app mode."""
@dataclass
class Chest:
"""A lovely chest."""
appearance: Annotated[
BSClassicChestAppearance,
IOAttrs('a', enum_fallback=BSClassicChestAppearance.UNKNOWN),
]
unlock_time: Annotated[datetime.datetime, IOAttrs('t')]
ad_unlock_time: Annotated[datetime.datetime | None, IOAttrs('at')]
class LeagueType(Enum): class LeagueType(Enum):
"""Type of league we are in.""" """Type of league we are in."""
@ -359,6 +377,8 @@ class ClassicAccountLiveData:
inbox_count: Annotated[int, IOAttrs('ibc')] inbox_count: Annotated[int, IOAttrs('ibc')]
inbox_count_is_max: Annotated[bool, IOAttrs('ibcm')] inbox_count_is_max: Annotated[bool, IOAttrs('ibcm')]
chests: Annotated[dict[str, Chest], IOAttrs('c')]
class BSInboxEntryType(Enum): class BSInboxEntryType(Enum):
"""Types of entries that can be in an inbox.""" """Types of entries that can be in an inbox."""