diff --git a/.efrocachemap b/.efrocachemap index 869672b0..813269df 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": "677778a5f7114170c50602335fc3ddf1", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "8887729af3137c9709ee10b70f353786", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "2f9c170609a70d52d3bca2a1fcfe31d6", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "97220018e9d2fb42421d3fb2d7d98d47", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "22e38fabd263a4e639c69c901408e56d", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "9ce287d7714226daa851880f79c38d05", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "a53442bb694a34052bc5de9cc8a27f59", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "69b314b2d8528d226ef1b40f5b02e711", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "5321c1204fa17516585e38ed666f1780", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "008d0196de947e99620005d158880336", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "9a886a68cdeed63295c390b60569908d", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "36a30c52a024f465d9c40f5fc42323e1", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "58af78df373616cb036378bde97b7156", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "67586111ab10332c67950f59da204727", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "807305abf012d74fdae2135a45f722b5", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "7508d7247ab006ba404042f84fcf36d7", + "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/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": "02852ae5c8a085e5a2ba4fda0168d900", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "470ba5671d23d3305ae57dd944266555", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "21f0264a92a57ac971e6d320210cfe2e", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "450e24f24e377bc4cee7045d600e6dab", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "38190b24b4d579e9cf6d2109ce8576cc", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "7bbabb2f5741f7ac84ebb8c64e3894fd", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "0fcf45e01c140cbfe3c5ec16f24f326b", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "ea7347fd38385a1dcc857445ea7b17d1", + "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", "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 398b2a0f..3f3fa6b0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.37 (build 22226, api 9, 2025-01-21) +### 1.7.37 (build 22227, api 9, 2025-01-21) - 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 fe7cefbb..d26b4b8f 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 = 22226 +TARGET_BALLISTICA_BUILD = 22227 TARGET_BALLISTICA_VERSION = '1.7.37' diff --git a/src/assets/ba_data/python/bauiv1lib/help.py b/src/assets/ba_data/python/bauiv1lib/help.py index cc1213ff..12142234 100644 --- a/src/assets/ba_data/python/bauiv1lib/help.py +++ b/src/assets/ba_data/python/bauiv1lib/help.py @@ -31,15 +31,35 @@ class HelpWindow(bui.MainWindow): assert bui.app.classic is not None uiscale = bui.app.ui_v1.uiscale width = 1050 if uiscale is bui.UIScale.SMALL else 750 - xoffs = 70 if uiscale is bui.UIScale.SMALL else 0 - yoffs = -33 if uiscale is bui.UIScale.SMALL else 0 height = ( - 500 + 700 if uiscale is bui.UIScale.SMALL else 530 if uiscale is bui.UIScale.MEDIUM else 600 ) + # 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.55 + if uiscale is bui.UIScale.SMALL + else 1.15 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 - 90, screensize[0] / scale) + target_height = min(height - 90, 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 - 36 + scroll_y = yoffs - 64 - scroll_height + super().__init__( root_widget=bui.containerwidget( size=(width, height), @@ -48,74 +68,22 @@ class HelpWindow(bui.MainWindow): if uiscale is bui.UIScale.SMALL else 'menu_full' ), - scale=( - 1.55 - if uiscale is bui.UIScale.SMALL - else 1.15 if uiscale is bui.UIScale.MEDIUM else 1.0 - ), - stack_offset=( - (0, 0) - if uiscale is bui.UIScale.SMALL - else (0, 15) if uiscale is bui.UIScale.MEDIUM 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, ) - bui.textwidget( - parent=self._root_widget, - position=( - 0, - height - (50 if uiscale is bui.UIScale.SMALL else 45) + yoffs, - ), - size=(width, 25), - text=bui.Lstr( - resource=f'{self._r}.titleText', - subs=[('${APP_NAME}', bui.Lstr(resource='titleText'))], - ), - color=bui.app.ui_v1.title_color, - h_align='center', - v_align='top', - ) - - self._scrollwidget = bui.scrollwidget( - parent=self._root_widget, - position=( - 44 + xoffs, - (92 if uiscale is bui.UIScale.SMALL else 55) + yoffs, - ), - simple_culling_v=100.0, - size=( - width - (88 + 2 * xoffs), - height - (150 if uiscale is bui.UIScale.SMALL else 120), - ), - capture_arrows=True, - border_opacity=0.4, - ) - - bui.widget( - edit=self._scrollwidget, - right_widget=bui.get_special_widget('squad_button'), - ) - bui.containerwidget( - edit=self._root_widget, selected_child=self._scrollwidget - ) - - # ugly: create this last so it gets first dibs at touch events (since - # we have it close to the scroll widget) if uiscale is bui.UIScale.SMALL: bui.containerwidget( edit=self._root_widget, on_cancel_call=self.main_window_back ) - bui.widget( - edit=self._scrollwidget, - left_widget=bui.get_special_widget('back_button'), - ) else: btn = bui.buttonwidget( parent=self._root_widget, - position=(xoffs + 50, height - 55), + position=(50, yoffs - 45), size=(60, 55), scale=0.8, label=bui.charstr(bui.SpecialChar.BACK), @@ -126,6 +94,46 @@ class HelpWindow(bui.MainWindow): ) bui.containerwidget(edit=self._root_widget, cancel_button=btn) + bui.textwidget( + parent=self._root_widget, + position=( + width * 0.5, + yoffs - (47 if uiscale is bui.UIScale.SMALL else 25), + ), + size=(0, 0), + text=bui.Lstr( + resource=f'{self._r}.titleText', + subs=[('${APP_NAME}', bui.Lstr(resource='titleText'))], + ), + maxwidth=scroll_width * 0.7, + color=bui.app.ui_v1.title_color, + h_align='center', + v_align='center', + ) + + self._scrollwidget = bui.scrollwidget( + parent=self._root_widget, + size=(scroll_width, scroll_height), + position=(width * 0.5 - scroll_width * 0.5, scroll_y), + simple_culling_v=100.0, + capture_arrows=True, + border_opacity=0.4, + ) + + if uiscale is bui.UIScale.SMALL: + bui.widget( + edit=self._scrollwidget, + left_widget=bui.get_special_widget('back_button'), + ) + + bui.widget( + edit=self._scrollwidget, + right_widget=bui.get_special_widget('squad_button'), + ) + bui.containerwidget( + edit=self._root_widget, selected_child=self._scrollwidget + ) + self._sub_width = 810 if uiscale is bui.UIScale.SMALL else 660 self._sub_height = ( 1590 diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index 0151dea8..edcd753b 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 = 22226; +const int kEngineBuildNumber = 22227; const char* kEngineVersion = "1.7.37"; const int kEngineApiVersion = 9;