diff --git a/.efrocachemap b/.efrocachemap index 813269df..7189bcdc 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4174,22 +4174,22 @@ "build/assets/windows/Win32/ucrtbased.dll": "bfd1180c269d3950b76f35a63655e9e1", "build/assets/windows/Win32/vc_redist.x86.exe": "15a5f1f876503885adbdf5b3989b3718", "build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599", - "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "284180bebd99d9ab6c80b4980f476520", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "d399a752be8f05fa169eacd5299a8ea7", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "25fe2039202be7c3e2f7fca41af08bc7", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "f49bdc0ff973c35faaae83bae48a03e3", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "3511767e1c0b83f26609cf83ea69cdb2", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "c232ebe3b1f8867fbba90e99b5fd338b", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "5d36df591701239ecf4aab7047bcc59a", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "b6f6f83cef188487a65f4cc1422b36a7", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "0cd2af5e637965ee5cd806f3d14b7537", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "70483766b8daf78848e5d95408cd487e", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "425e8aa2a6f0705dca164914f49c3bf6", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "04ae10a335af46eefb714ca442e7f46a", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "83b3ceaac9a3df215b6d4e95d664a38c", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "9e1a002b88fa660b9142d026cccb8c49", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "ba0b5d4e36218e665dc4f26145bbac1b", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "1aa7f66edfafd0007343fbce1d8aaa18", + "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "0139a8323d7954bc9f59e27021e6f081", + "build/prefab/full/linux_arm64_gui/release/ballisticakit": "60d2b1d1208874dc5308b09f837bff9e", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "8e2c9ec41347fcfbc31196c873a2eb97", + "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "49a8658db834b4f60e1ad4aab430fb84", + "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "f8f3a9ab1e0e396c21ca41a3db2d39ca", + "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "903cc1d82af8ccec8f5c263be6306d76", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "64cc8d9afc4edd9a9ded04612501e135", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "8959e986a3d2746c9d5d5017dc2af04c", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "33e03322643af2ff56779f5cfdc1626f", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "477aa76ac9cf6840f76975db188e5038", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "6052738c5bed732014d9a56f03244ab7", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "59add35f81e0db909ec81d84dc51a425", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "7bd21174dcff36439b846055ad745286", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "c60d24bedff1651665b27326260031fc", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "5fa4e89475eb3b73a1f17fa05e419ef3", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "3b984f65e13e9533871be1ecfbce9a8c", "build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "4d70703c4eba1a402fbc2d997d84aa93", "build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "bb64e2182b1a533679f93c5997f14584", "build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "4d70703c4eba1a402fbc2d997d84aa93", @@ -4202,14 +4202,14 @@ "build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "116b500c2d57caf06619408b2176e83b", "build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "e3e9d9c7a94f8cd22939839fd8fbc178", "build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "116b500c2d57caf06619408b2176e83b", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "9da3786db2f6a20330ae6f27fbeca3c1", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "6d8156c1c283fb5851e4a679ac6cc573", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "a1826abc76294f4e81d3dc83f1a24063", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "d192cfa87f02152f370e9e2ab4ef2c29", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "9cb4d787b43e504cb7ddd363e36bd2c0", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "dafeafd115f43bc352b3ff7194dc65eb", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "7c6744e850b4dec153fd3a92b8dbd9a1", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "d1a0c9e4826e7c6ca8f5bc7afc87992a", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "c6143598f138540e037f5db00b06dec6", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "e33a3aba6ddfb80b60775607a2cebd8b", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "020a83e991f6bbe09777f98ddaddd5ea", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "c5cf94ba3c780cfe2cc3347203268564", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "df887a9716c1fdcf01e82fa40907f1c3", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "b879e1fa05e2e8cb91045b314541445f", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "4d4243b7fa84f0d854d34ba1fd20f4a9", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "6297240dd285491699ff076e0923e07b", "src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c", "src/assets/ba_data/python/babase/_mgen/enums.py": "794d258d59fd17a61752843a9a0551ad", "src/ballistica/base/mgen/pyembed/binding_base.inc": "06042d31df0ff9af96b99477162e2a91", diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f3fa6b0..61fea533 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.37 (build 22227, api 9, 2025-01-21) +### 1.7.37 (build 22228, api 9, 2025-01-22) - 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/baenv.py b/src/assets/ba_data/python/baenv.py index d26b4b8f..ea26b287 100644 --- a/src/assets/ba_data/python/baenv.py +++ b/src/assets/ba_data/python/baenv.py @@ -53,7 +53,7 @@ if TYPE_CHECKING: # Build number and version of the ballistica binary we expect to be # using. -TARGET_BALLISTICA_BUILD = 22227 +TARGET_BALLISTICA_BUILD = 22228 TARGET_BALLISTICA_VERSION = '1.7.37' diff --git a/src/assets/ba_data/python/bauiv1lib/credits.py b/src/assets/ba_data/python/bauiv1lib/credits.py index 7d56d9e4..a9045761 100644 --- a/src/assets/ba_data/python/bauiv1lib/credits.py +++ b/src/assets/ba_data/python/bauiv1lib/credits.py @@ -31,8 +31,29 @@ class CreditsWindow(bui.MainWindow): assert bui.app.classic is not None uiscale = bui.app.ui_v1.uiscale width = 990 if uiscale is bui.UIScale.SMALL else 670 - x_inset = 100 if uiscale is bui.UIScale.SMALL else 0 - height = 450 if uiscale is bui.UIScale.SMALL else 500 + height = 750 if uiscale is bui.UIScale.SMALL else 500 + + # Do some fancy math to fill all available screen area up to the + # size of our backing container. This lets us fit to the exact + # screen shape at small ui scale. + screensize = bui.get_virtual_screen_size() + scale = ( + 1.8 + if uiscale is bui.UIScale.SMALL + else 1.2 if uiscale is bui.UIScale.MEDIUM else 1.0 + ) + # Calc screen size in our local container space and clamp to a + # bit smaller than our container size. + target_width = min(width - 80, screensize[0] / scale) + target_height = min(height - 80, screensize[1] / scale) + + # To get top/left coords, go to the center of our window and + # offset by half the width/height of our target area. + yoffs = 0.5 * height + 0.5 * target_height + 30.0 + + scroll_width = target_width + scroll_height = target_height - 29 + scroll_y = yoffs - 58 - scroll_height self._r = 'creditsWindow' super().__init__( @@ -43,17 +64,12 @@ class CreditsWindow(bui.MainWindow): if uiscale is bui.UIScale.SMALL else 'menu_full' ), - scale=( - 1.8 - if uiscale is bui.UIScale.SMALL - else 1.2 if uiscale is bui.UIScale.MEDIUM else 1.0 - ), - stack_offset=( - (0, 0) if uiscale is bui.UIScale.SMALL else (0, 0) - ), + scale=scale, ), transition=transition, origin_widget=origin_widget, + # We're affected by screen size only at small ui-scale. + refresh_on_screen_size_changes=uiscale is bui.UIScale.SMALL, ) if uiscale is bui.UIScale.SMALL: @@ -63,49 +79,38 @@ class CreditsWindow(bui.MainWindow): else: btn = bui.buttonwidget( parent=self._root_widget, - position=(40 + x_inset, height - 62), - size=(140, 60), + position=(40, yoffs - 46), + size=(60, 48), scale=0.8, - label=bui.Lstr(resource='backText'), - button_type='back', + label=bui.charstr(bui.SpecialChar.BACK), + button_type='backSmall', on_activate_call=self.main_window_back, autoselect=True, ) bui.containerwidget(edit=self._root_widget, cancel_button=btn) - bui.buttonwidget( - edit=btn, - button_type='backSmall', - position=( - 40 + x_inset, - height - 62 + 5, - ), - size=(60, 48), - label=bui.charstr(bui.SpecialChar.BACK), - ) - bui.textwidget( parent=self._root_widget, - position=(0, height - (93 if uiscale is bui.UIScale.SMALL else 54)), - size=(width, 30), + position=( + width * 0.5, + yoffs - (44 if uiscale is bui.UIScale.SMALL else 28), + ), + size=(0, 0), scale=0.8 if uiscale is bui.UIScale.SMALL else 1.0, text=bui.Lstr( resource=f'{self._r}.titleText', subs=[('${APP_NAME}', bui.Lstr(resource='titleText'))], ), h_align='center', - color=bui.app.ui_v1.title_color, - maxwidth=330, v_align='center', + color=bui.app.ui_v1.title_color, + maxwidth=scroll_width * 0.7, ) scroll = bui.scrollwidget( parent=self._root_widget, - position=(40 + x_inset, 62 if uiscale is bui.UIScale.SMALL else 35), - size=( - width - (80 + 2 * x_inset), - height - (160 if uiscale is bui.UIScale.SMALL else 100), - ), + size=(scroll_width, scroll_height), + position=(width * 0.5 - scroll_width * 0.5, scroll_y), capture_arrows=True, border_opacity=0.4, ) diff --git a/src/assets/ba_data/python/bauiv1lib/inbox.py b/src/assets/ba_data/python/bauiv1lib/inbox.py index 29247a7d..f3e1daf7 100644 --- a/src/assets/ba_data/python/bauiv1lib/inbox.py +++ b/src/assets/ba_data/python/bauiv1lib/inbox.py @@ -391,7 +391,7 @@ class InboxWindow(bui.MainWindow): size=(0, 0), h_align='center', v_align='center', - scale=0.6, + scale=0.6 if uiscale is bui.UIScale.SMALL else 0.8, text=bui.Lstr(resource='inboxText'), maxwidth=200, color=bui.app.ui_v1.title_color, diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index edcd753b..6870ec90 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 = 22227; +const int kEngineBuildNumber = 22228; const char* kEngineVersion = "1.7.37"; const int kEngineApiVersion = 9;