a few more UI fixes for 16:9 phones

This commit is contained in:
Eric 2024-09-25 19:08:39 -07:00
parent 029dc1520c
commit 86d2a78974
No known key found for this signature in database
GPG Key ID: 89C93F0F8D6D5A98
9 changed files with 60 additions and 92 deletions

56
.efrocachemap generated
View File

@ -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": "7fd769a5fba18ef66df318f3e37e997b",
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "d1791e5fb831a8b2c9b57311e5150cfa",
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "4ac30721dfa5733629e658b9c9f72c20",
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "67efb133f38243baf802f50b675a5012",
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "6422858d74bde927974f04650ef1dc42",
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "c596fbb576be7d5a4a892423cbc38174",
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "c7ca5174ea1aeeac78e6c08ee3d0a6fe",
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "ba2405d69ae54d8cf94023c973fe0f9f",
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "db91aff1e1646bd2bb0eab4281efe164",
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "aab047ea9912fd75194c74ab91351a86",
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "8b1a6d52494ec4430ca2431f6492663a",
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "d8c3d60b782999942cdacb76c18dc33f",
"build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "19d64c31b8c7e40bf81ca64b574eaf0c",
"build/prefab/full/mac_x86_64_gui/release/ballisticakit": "7bfea504671ad515e4466fa8d79bc68c",
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "92b49993780d368c00960887a96a18e5",
"build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "99c3beebabf9ab885ba06b98131ad8f4",
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "033636a6f1c6d4530ead7cb6e126b568",
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "64223eac879a1b500564fa3e742dcd7e",
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "0cc20eaf538e0cb0b98de0a3a55bba5c",
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "a265f0275487fb15d30a050c8db145bf",
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "65b928385abc5fb852a9bfca74e25515",
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "949ec63b1c4049ca8b53177e3a1b4125",
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "3e8a83e2a34261d99879c6be7a035f76",
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "b23e959d29accbcacbb2e07983a4585b",
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "293bb35597a0f9b39b4a940094b25c80",
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "1c79a0db39022e7341c1f4228bbf1bfe",
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "3dfaacb9b36d61081d39493ac5e95ae9",
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "61a7153508cc55bad48bd9102a672b58",
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "daf24f76db0462c10219c0422bef7651",
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "4ad78818230f71946ecd45dddad495d3",
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "1c22dcc8b478a5673e81eec9484b4c95",
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "3ea63c2c531c1201511bd65cc84328c0",
"build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "d1dda1bcd25be89d924f59daeb76deb4",
"build/prefab/full/mac_x86_64_gui/release/ballisticakit": "461dd43017d4b9ddd66f07b663ea073a",
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "8b5f76faeb062bf526f4de2e36756e86",
"build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "b11df699748ceaeabb9d7b1d575d574b",
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "0273dbc73771533d13d88636c0a0d920",
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "c95d98be2122ffb63ea7ba2ea00bdc94",
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "5945a64fbd6a70d3fed7e6cfe042515c",
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "dfc3f3e2501435163035e43b2996624f",
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "ad908b297b41c2fdf13582e34c434245",
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "086a2ce72497e44079ad6b747fc5439f",
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "ad908b297b41c2fdf13582e34c434245",
@ -4132,14 +4132,14 @@
"build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "d7a1d4deb51b0792d083737477e6833b",
"build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "4c11b81a574aa9af593f54db4d998e61",
"build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "d7a1d4deb51b0792d083737477e6833b",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "c454896ceaa45a8b17071e2640b3c05f",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "895bf9f6264abcafad739fd262105d4e",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "a35f999cae9384f769f5b159b4c4f6ae",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "862f051934a0f941800cf26b57aedc0f",
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "0158bce6f4270a0e25ccffe8cde23215",
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "a9d874c34cab4aa660cf607aca32363a",
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "b65364291ce3784dbf5e873eeee0a41e",
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "c91dfeeaa90ac17c3160cbe79dd468d5",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "07ac2d15d5fdcaaf8505439b07b5f2aa",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "c55f3ea6d1e8d3f951e0ca08460e853f",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "c93e65e95335b64a5a7de102094bfe75",
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "a276c3209acad4d12cdce69936044160",
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "464fdc0293df656486ec70358b0bf9e8",
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "f827037308d6d4a9b4fc978a362d166f",
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "14f7fe0fa80210300c86ba65a5c70b75",
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "75a7444330624357cb388077eccd9e69",
"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": "efa61468cf098f77cc6a234461d8b86d",

View File

@ -1,4 +1,4 @@
### 1.7.37 (build 22013, api 9, 2024-09-25)
### 1.7.37 (build 22014, api 9, 2024-09-25)
- 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.

View File

@ -6,7 +6,7 @@ mypy==1.11.2
pbxproj==4.2.1
pdoc==14.7.0
pur==7.3.2
pylint==3.3.0
pylint==3.3.1
pylsp-mypy==0.6.9
pytest==8.3.3
python-daemon==3.0.1

View File

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

View File

@ -195,8 +195,6 @@ class CharacterPicker(PopupWindow):
def _on_store_press(self) -> None:
from bauiv1lib.account import show_sign_in_prompt
# from bauiv1lib.store.browser import StoreBrowserWindow
plus = bui.app.plus
assert plus is not None
@ -209,15 +207,6 @@ class CharacterPicker(PopupWindow):
self._transition_out()
# bui.screenmessage('UNDER CONSTRUCTION')
# return
# StoreBrowserWindow(
# modal=True,
# show_tab=StoreBrowserWindow.TabID.CHARACTERS,
# origin_widget=self._get_more_characters_button,
# )
def _select_character(self, character: str) -> None:
if self._delegate is not None:
self._delegate.on_character_picker_pick(character)

View File

@ -47,7 +47,7 @@ class CoopBrowserWindow(bui.MainWindow):
# Quick note to players that tourneys won't work in ballistica
# core builds. (need to split the word so it won't get subbed
# out)
if 'ballistica' + 'kit' == bui.appname():
if 'ballistica' + 'kit' == bui.appname() and bui.do_once():
bui.apptimer(
1.0,
lambda: bui.screenmessage(

View File

@ -62,10 +62,11 @@ class EditProfileWindow(bui.MainWindow, CharacterPickerDelegate):
self._width = width = 880.0 if uiscale is bui.UIScale.SMALL else 680.0
self._x_inset = x_inset = 100.0 if uiscale is bui.UIScale.SMALL else 0.0
self._height = height = (
450.0
500.0
if uiscale is bui.UIScale.SMALL
else 400.0 if uiscale is bui.UIScale.MEDIUM else 450.0
)
yoffs = -42 if uiscale is bui.UIScale.SMALL else 0
spacing = 40
self._base_scale = (
1.6
@ -78,7 +79,7 @@ class EditProfileWindow(bui.MainWindow, CharacterPickerDelegate):
size=(width, height + top_extra),
scale=self._base_scale,
stack_offset=(
(0, -40) if uiscale is bui.UIScale.SMALL else (0, 0)
(0, 0) if uiscale is bui.UIScale.SMALL else (0, 0)
),
toolbar_visibility=(
# 'menu_minimal'
@ -92,7 +93,7 @@ class EditProfileWindow(bui.MainWindow, CharacterPickerDelegate):
)
cancel_button = btn = bui.buttonwidget(
parent=self._root_widget,
position=(52 + x_inset, height - 60),
position=(52 + x_inset, height - 60 + yoffs),
size=(155, 60),
scale=0.8,
autoselect=True,
@ -102,7 +103,7 @@ class EditProfileWindow(bui.MainWindow, CharacterPickerDelegate):
bui.containerwidget(edit=self._root_widget, cancel_button=btn)
save_button = btn = bui.buttonwidget(
parent=self._root_widget,
position=(width - (177 + x_inset), height - 60),
position=(width - (177 + x_inset), height - 60 + yoffs),
size=(155, 60),
autoselect=True,
scale=0.8,
@ -113,7 +114,7 @@ class EditProfileWindow(bui.MainWindow, CharacterPickerDelegate):
bui.containerwidget(edit=self._root_widget, start_button=btn)
bui.textwidget(
parent=self._root_widget,
position=(self._width * 0.5, height - 38),
position=(self._width * 0.5, height - 38 + yoffs),
size=(0, 0),
text=(
bui.Lstr(resource=f'{self._r}.titleNewText')
@ -163,7 +164,7 @@ class EditProfileWindow(bui.MainWindow, CharacterPickerDelegate):
self._icon_index = icon_index
bui.buttonwidget(edit=save_button, on_activate_call=self.save)
v = height - 115.0
v = height - 115.0 + yoffs
self._name = (
'' if self._existing_profile is None else self._existing_profile
)

View File

@ -34,13 +34,14 @@ class ProfileUpgradeWindow(bui.Window):
uiscale = bui.app.ui_v1.uiscale
self._width = 750 if uiscale is bui.UIScale.SMALL else 680
self._height = 350
self._height = 450 if uiscale is bui.UIScale.SMALL else 350
assert bui.app.classic is not None
self._base_scale = (
1.9
if uiscale is bui.UIScale.SMALL
else 1.5 if uiscale is bui.UIScale.MEDIUM else 1.2
)
yoffs = -60.0 if uiscale is bui.UIScale.SMALL else 0
self._upgrade_start_time: float | None = None
self._name = edit_profile_window.getname()
self._edit_profile_window = weakref.ref(edit_profile_window)
@ -53,13 +54,13 @@ class ProfileUpgradeWindow(bui.Window):
transition=transition,
scale=self._base_scale,
stack_offset=(
(0, -30) if uiscale is bui.UIScale.SMALL else (0, 0)
(0, 0) if uiscale is bui.UIScale.SMALL else (0, 0)
),
)
)
cancel_button = bui.buttonwidget(
parent=self._root_widget,
position=(52, 60),
position=(52, self._height - 290 + yoffs),
size=(155, 60),
scale=0.8,
autoselect=True,
@ -68,7 +69,7 @@ class ProfileUpgradeWindow(bui.Window):
)
self._upgrade_button = bui.buttonwidget(
parent=self._root_widget,
position=(self._width - 190, 60),
position=(self._width - 190, self._height - 290 + yoffs),
size=(155, 60),
scale=0.8,
autoselect=True,
@ -85,7 +86,7 @@ class ProfileUpgradeWindow(bui.Window):
assert bui.app.classic is not None
bui.textwidget(
parent=self._root_widget,
position=(self._width * 0.5, self._height - 38),
position=(self._width * 0.5, self._height - 38 + yoffs),
size=(0, 0),
text=bui.Lstr(resource=f'{self._r}.upgradeToGlobalProfileText'),
color=bui.app.ui_v1.title_color,
@ -98,7 +99,7 @@ class ProfileUpgradeWindow(bui.Window):
assert bui.app.classic is not None
bui.textwidget(
parent=self._root_widget,
position=(self._width * 0.5, self._height - 100),
position=(self._width * 0.5, self._height - 100 + yoffs),
size=(0, 0),
text=bui.Lstr(resource=f'{self._r}.upgradeProfileInfoText'),
color=bui.app.ui_v1.infotextcolor,
@ -110,7 +111,7 @@ class ProfileUpgradeWindow(bui.Window):
self._status_text = bui.textwidget(
parent=self._root_widget,
position=(self._width * 0.5, self._height - 160),
position=(self._width * 0.5, self._height - 160 + yoffs),
size=(0, 0),
text=bui.Lstr(
resource=f'{self._r}.checkingAvailabilityText',
@ -125,7 +126,7 @@ class ProfileUpgradeWindow(bui.Window):
self._price_text = bui.textwidget(
parent=self._root_widget,
position=(self._width * 0.5, self._height - 230),
position=(self._width * 0.5, self._height - 230 + yoffs),
size=(0, 0),
text='',
color=(0.2, 1, 0.2),
@ -135,22 +136,6 @@ class ProfileUpgradeWindow(bui.Window):
v_align='center',
)
self._tickets_text: bui.Widget | None
# if not bui.app.ui_v1.use_toolbars:
# self._tickets_text = bui.textwidget(
# parent=self._root_widget,
# position=(self._width * 0.9 - 5, self._height - 30),
# size=(0, 0),
# text=bui.charstr(bui.SpecialChar.TICKET) + '123',
# color=(0.2, 1, 0.2),
# maxwidth=100,
# scale=0.5,
# h_align='right',
# v_align='center',
# )
# else:
self._tickets_text = None
bui.app.classic.master_server_v1_get(
'bsGlobalProfileCheck',
{'name': self._name, 'b': bui.app.env.engine_build_number},
@ -161,7 +146,7 @@ class ProfileUpgradeWindow(bui.Window):
)
self._status: str | None = 'waiting'
self._update_timer = bui.AppTimer(
1.0, bui.WeakCall(self._update), repeat=True
1.023, bui.WeakCall(self._update), repeat=True
)
self._update()
@ -256,23 +241,16 @@ class ProfileUpgradeWindow(bui.Window):
plus = bui.app.plus
assert plus is not None
try:
t_str = str(plus.get_v1_account_ticket_count())
except Exception:
t_str = '?'
if self._tickets_text is not None:
bui.textwidget(
edit=self._tickets_text,
text=bui.Lstr(
resource='getTicketsWindow.youHaveShortText',
subs=[
(
'${COUNT}',
bui.charstr(bui.SpecialChar.TICKET) + t_str,
)
],
),
)
# If our originating window dies at any point, cancel.
edit_profile_window = self._edit_profile_window()
if edit_profile_window is None:
self._cancel()
return
# try:
# t_str = str(plus.get_v1_account_ticket_count())
# except Exception:
# t_str = '?'
# Once we've kicked off an upgrade attempt and all transactions go
# through, we're done.

View File

@ -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 = 22013;
const int kEngineBuildNumber = 22014;
const char* kEngineVersion = "1.7.37";
const int kEngineApiVersion = 9;