diff --git a/.efrocachemap b/.efrocachemap index 62c55b86..54e7e583 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": "073a90aa4103e4e7fb6e9224baa598be", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "f15c66ff1ca4b383cce7ee8500302326", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "5425edaccb03ac8560cb0f255124c5da", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "38fd575620c4b20a5b618d7371c5f20e", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "ec2a56e7a1db46f06e0d09dc0cc4a6d7", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "af6b01b85380b1a9874f8d7e7db435e4", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "23039996985b4aa93dff5aaf41067ea4", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "56775e7415d62ea2d92ac73c6eb944a4", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "03bf4a2e606ee1fd85b3ba9839da87e6", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "10fc3f2ecef4e957b26d1ec82b441255", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "b33d1932f2beb9b3d2769c8f4e35dcad", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "ee6d0760189953307799b7e06858aa87", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "372d0ad3ef2bcd7f8fa93b9d83e2a300", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "e6f8c4f279931182f28722a33b9e3fc0", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "8e28d37c93494d05479d3132a6525967", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "e0db14d2a7df35e29fc4cdfe9c6c42d6", + "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "d2ace4eb71e1ab58cb253455ddaa8a1e", + "build/prefab/full/linux_arm64_gui/release/ballisticakit": "b10e808844e4630de445d4a6384ddc84", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "4a96fa2ffe45b543b6f342e6b03be506", + "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "664b383d3d8e02fcebaa197435db702f", + "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "b89aeb6deaeaf5f6be6f75bfca959ca0", + "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "c5c5866a0f65ec311b9d71618f742bf5", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "6ef47107865b4f5c26966aa62739e338", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "1746b9f1ab4e45e59abd086ac1faa444", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "b128f7bfd17b44bbe8d5982744dda8f1", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "82f26af87fa79c563758875f610ef996", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "d47e44813f76272f0d1f908c6fedc4b9", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "0aa5733b5cdbf60a88e5502fcb3ca486", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "bb8a0f22da4e27eda758615698268802", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "f57c5e729e8c0a2ae2163f22e0245d77", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "1979c6e54e64585a694542d88025bafa", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "a416831f86049d2fd94dcc3d097f5a29", "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": "3f2dddebc7313756f2f6ee83c377f265", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "d4a5d87e4ae724ae5e49cec56cb17a58", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "72d5ac0df3f03d2fceb5f015e9071ca3", - "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "12b693aea7eb0a3d501bea4ae7de75e1", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "091f0ff2326739346407622d4d8cc449", - "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "4ad50d22cac50a74f4953abf24016088", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "0be3a0c54d84379972bacc70f0c16887", - "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "cf56d84fe7f9a4bd8bf93172b561c5c0", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "6be4291d37aabee7a0e93409d251d6b1", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "e361ed6b27848849d996ad38255e3c2f", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "db69b0a9540ba7fac204570d0ae1fb5a", + "build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "a51d83807874d0f49432aa7e35fb254e", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "2c2f707147183ef4e8deafe33a5b74d1", + "build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "ffdf6fad9a56aba019e35d7015c684e2", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "dd75a346a12885db2502cd37be01c726", + "build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "4c32a8fe55af58faa3b61c07e6e12133", "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 b00ba78e..261d1ad0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.37 (build 22229, api 9, 2025-01-22) +### 1.7.37 (build 22230, 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 d1cd8933..95dc7dda 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 = 22229 +TARGET_BALLISTICA_BUILD = 22230 TARGET_BALLISTICA_VERSION = '1.7.37' diff --git a/src/assets/ba_data/python/bauiv1lib/gather/publictab.py b/src/assets/ba_data/python/bauiv1lib/gather/publictab.py index 1526a63f..28b93769 100644 --- a/src/assets/ba_data/python/bauiv1lib/gather/publictab.py +++ b/src/assets/ba_data/python/bauiv1lib/gather/publictab.py @@ -162,7 +162,6 @@ class UIRow: Selection(party.get_key(), SelectionComponent.STATS_BUTTON), ), size=(120, 40), - # position=(sub_scroll_width * 0.66 + hpos, 1 + vpos), position=(sub_scroll_width - 270.0, 1 + vpos), scale=0.9, ) @@ -177,8 +176,7 @@ class UIRow: text=str(party.size) + '/' + str(party.size_max), parent=columnwidget, size=(0, 0), - # position=(sub_scroll_width * 0.86 + hpos, 20 + vpos), - position=(sub_scroll_width - 100, 20 + vpos), + position=(sub_scroll_width - 90, 20 + vpos), scale=0.7, color=(0.8, 0.8, 0.8), h_align='right', @@ -193,8 +191,7 @@ class UIRow: self._ping_widget = bui.textwidget( parent=columnwidget, size=(0, 0), - # position=(sub_scroll_width * 0.94 + hpos, 20 + vpos), - position=(sub_scroll_width - 30.0, 20 + vpos), + position=(sub_scroll_width - 25.0, 20 + vpos), scale=0.7, h_align='right', v_align='center', diff --git a/src/assets/ba_data/python/bauiv1lib/league/rankwindow.py b/src/assets/ba_data/python/bauiv1lib/league/rankwindow.py index 760851e0..f207ac7f 100644 --- a/src/assets/ba_data/python/bauiv1lib/league/rankwindow.py +++ b/src/assets/ba_data/python/bauiv1lib/league/rankwindow.py @@ -47,37 +47,56 @@ class LeagueRankWindow(bui.MainWindow): assert bui.app.classic is not None uiscale = bui.app.ui_v1.uiscale - self._width = 1490 if uiscale is bui.UIScale.SMALL else 1120 + self._width = 1500 if uiscale is bui.UIScale.SMALL else 1120 x_inset = 100 if uiscale is bui.UIScale.SMALL else 0 self._height = ( - 660 + 1000 if uiscale is bui.UIScale.SMALL else 710 if uiscale is bui.UIScale.MEDIUM else 800 ) self._r = 'coopSelectWindow' self._rdict = bui.app.lang.get_resource(self._r) - top_extra = 20 if uiscale is bui.UIScale.SMALL else 0 + # top_extra = 20 if uiscale is bui.UIScale.SMALL else 0 - self._xoffs = 80.0 if uiscale is bui.UIScale.SMALL else 0 + # self._xoffs = 80.0 if uiscale is bui.UIScale.SMALL else 0 + self._xoffs = 40 self._league_url_arg = '' self._is_current_season = False self._can_do_more_button = True + # 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.08 + if uiscale is bui.UIScale.SMALL + else 0.93 if uiscale is bui.UIScale.MEDIUM else 0.8 + ) + # Calc screen size in our local container space and clamp to a + # bit smaller than our container size. + target_width = min(self._width - 130, screensize[0] / scale) + target_height = min(self._height - 130, 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 * self._height + 0.5 * target_height + 30.0 + + self._scroll_width = target_width + self._scroll_height = target_height - 35 + scroll_bottom = yoffs - 80 - self._scroll_height + super().__init__( root_widget=bui.containerwidget( - size=(self._width, self._height + top_extra), + size=(self._width, self._height), stack_offset=( (0, 0) if uiscale is bui.UIScale.SMALL else (0, 10) if uiscale is bui.UIScale.MEDIUM else (0, 0) ), - scale=( - 1.08 - if uiscale is bui.UIScale.SMALL - else 0.93 if uiscale is bui.UIScale.MEDIUM else 0.8 - ), + scale=scale, toolbar_visibility=( 'menu_minimal' if uiscale is bui.UIScale.SMALL @@ -86,6 +105,8 @@ class LeagueRankWindow(bui.MainWindow): ), 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: @@ -94,22 +115,15 @@ class LeagueRankWindow(bui.MainWindow): edit=self._root_widget, on_cancel_call=self.main_window_back ) else: - self._back_button = btn = bui.buttonwidget( + self._back_button = bui.buttonwidget( parent=self._root_widget, - position=(75 + x_inset, self._height - 87), - size=(120, 60), + position=(75 + x_inset, yoffs - 60), + size=(60, 55), scale=1.2, autoselect=True, - label=bui.Lstr(resource='backText'), - button_type='back', - on_activate_call=self.main_window_back, - ) - bui.buttonwidget( - edit=btn, - button_type='backSmall', - position=(75 + x_inset, self._height - 87), - size=(60, 55), label=bui.charstr(bui.SpecialChar.BACK), + button_type='backSmall', + on_activate_call=self.main_window_back, ) bui.containerwidget( edit=self._root_widget, @@ -121,7 +135,7 @@ class LeagueRankWindow(bui.MainWindow): parent=self._root_widget, position=( self._width * 0.5, - self._height - (66 if uiscale is bui.UIScale.SMALL else 56), + yoffs - (55 if uiscale is bui.UIScale.SMALL else 30), ), size=(0, 0), text=bui.Lstr( @@ -130,19 +144,21 @@ class LeagueRankWindow(bui.MainWindow): ), h_align='center', color=bui.app.ui_v1.title_color, - scale=1.4, + scale=1.2 if uiscale is bui.UIScale.SMALL else 1.3, maxwidth=600, v_align='center', ) - self._scroll_width = self._width - (130 + 2 * x_inset) - self._scroll_height = self._height - 160 self._scrollwidget = bui.scrollwidget( parent=self._root_widget, highlight=False, - position=(65 + x_inset, 70), size=(self._scroll_width, self._scroll_height), + position=( + self._width * 0.5 - self._scroll_width * 0.5, + scroll_bottom, + ), center_small_content=True, + center_small_content_horizontally=True, border_opacity=0.4, ) bui.widget(edit=self._scrollwidget, autoselect=True) @@ -152,7 +168,7 @@ class LeagueRankWindow(bui.MainWindow): self._doing_power_ranking_query = False self._subcontainer: bui.Widget | None = None - self._subcontainerwidth = max(800, self._scroll_width) + self._subcontainerwidth = 1024 self._subcontainerheight = 483 self._power_ranking_score_widgets: list[bui.Widget] = [] @@ -195,8 +211,9 @@ class LeagueRankWindow(bui.MainWindow): def _on_achievements_press(self) -> None: from bauiv1lib.achievements import AchievementsWindow - # only allow this for all-time or the current season - # (we currently don't keep specific achievement data for old seasons) + # Only allow this for all-time or the current season (we + # currently don't keep specific achievement data for old + # seasons). if self._season == 'a' or self._is_current_season: prab = self._power_ranking_achievements_button assert prab is not None @@ -498,12 +515,7 @@ class LeagueRankWindow(bui.MainWindow): size=(200, 60), icon=bui.gettexture('logo'), icon_color=(0.3, 0, 0.3), - # label='Up-To-Date Bonus', label=bui.Lstr(resource='league.upToDateBonusText'), - # label=bui.Lstr( - # resource='store.bombSquadProNameText', - # subs=[('${APP_NAME}', bui.Lstr(resource='titleText'))], - # ), autoselect=True, on_activate_call=bui.WeakCall(self._on_up_to_date_bonus_press), left_widget=self._back_button, @@ -998,17 +1010,15 @@ class LeagueRankWindow(bui.MainWindow): textcolor=(0.7, 0.7, 0.8, 1.0), icon_color=(0.5, 0, 0.5, 1.0), ) - # pylint: disable=consider-using-f-string bui.textwidget( edit=self._activity_mult_text, - text='x ' + ('%.2f' % data['act']), + text=f'x {data['act']:.2f}', ) # This used to be a bonus for 'BombSquad Pro' holders, but since # we're transitioning away from that it is now a bonus for # everyone running a recent-ish version of the game. - # have_pro = False if data is None else data['p'] have_up_to_date_bonus = data is not None pro_mult = ( 1.0 diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index 6c53228a..ccee3039 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 = 22229; +const int kEngineBuildNumber = 22230; const char* kEngineVersion = "1.7.37"; const int kEngineApiVersion = 9;