mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-19 21:37:57 +08:00
tidying
This commit is contained in:
parent
e7f2368eec
commit
64c6613c23
56
.efrocachemap
generated
56
.efrocachemap
generated
@ -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": "c6d67ec79facefc5cad965530b23bcd8",
|
||||
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "3d66a0cd0dd6e11c7f0bc9bca7c32918",
|
||||
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "3b57ad3a4c258a38022ff6760fb99273",
|
||||
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "49494eff1ea0e26629b31d1962072f03",
|
||||
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "7ec96c9d86bd7ab6a8972c486421037b",
|
||||
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "8cfbdb28fcefb6746efcf45368e4d4c8",
|
||||
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "c4f03152366701177ac8df1b1216800e",
|
||||
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "9c2a644cffb13828706d3a62fc93bea1",
|
||||
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "82cb874a3aab2d3a86a446987686e50f",
|
||||
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "138da633cfcbc99d4a32632dfd20220e",
|
||||
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "7d26e8d3b9ca3ef030c31bd3219a81f6",
|
||||
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "7d50251a8c2a865868f55fef1b1e7bbe",
|
||||
"build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "e823ba47693a1fa0dabdad310e56aee5",
|
||||
"build/prefab/full/mac_x86_64_gui/release/ballisticakit": "8787b88ac1276d15a93685dd4d192a82",
|
||||
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "9e281fcbf8bdd498646646b3fed7257d",
|
||||
"build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "c6d5c81f924d607acc6c996989ba8726",
|
||||
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "d4ce0446eabed898120bb9306dbaae1c",
|
||||
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "4bab9b11091309039860c712305f14a0",
|
||||
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "a7ae68ea69d0cf32842ca7d4559fd719",
|
||||
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "667491d9323656d8112f7f8df86821ef",
|
||||
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "512c99d6d32d3f7ca27de9d00b3f6bee",
|
||||
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "407a6d564f35c7db571702ef6996adc1",
|
||||
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "03c278694182a2a7cd6e39d7cf0cdde8",
|
||||
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "8c0f3132135f6a392b31dccce44ecc72",
|
||||
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "399783ec75c825a7c0ceffb6b66546a6",
|
||||
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "7d5f43f891ddbc0e68e1e4b924717941",
|
||||
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "97b462045118ca81436452c19e50ead3",
|
||||
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "daedf2d4f2c7012f9f1146ef5e675a51",
|
||||
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "ef571b31a6175b391c70cde46587afc6",
|
||||
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "fcbe9cb15740f5569d32daaef838bae3",
|
||||
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "06d8ed9ca06ed1fb12437708b117621f",
|
||||
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "eff858f25a173f090731401c42fcfad7",
|
||||
"build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "21401c4a1bb13c6a50fbcc2413a34bc6",
|
||||
"build/prefab/full/mac_x86_64_gui/release/ballisticakit": "a5f6bf1f1a675a60b43674cbe06ee740",
|
||||
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "4965d74db093926f890d37a2d2bcb0cf",
|
||||
"build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "527d364caa4c68cb3a5e70575a834333",
|
||||
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "f3e69ff8d4928b52fb301c911d6e01cb",
|
||||
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "82dd100621de502523d9feca94de7fc5",
|
||||
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "6c66e68c95330200d339ec5a44706491",
|
||||
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "f6903fb7071440ee807963cf34fd220f",
|
||||
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "73ad3303fe1a82005918fbc5dae3446c",
|
||||
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "fa659b5d6119acba6570c92ce4d35ae2",
|
||||
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "73ad3303fe1a82005918fbc5dae3446c",
|
||||
@ -4132,14 +4132,14 @@
|
||||
"build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "3e5c5fd0a09f55ba7b05ce1e2ec7171e",
|
||||
"build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "1659535e95e3047fda529543e265ac97",
|
||||
"build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "3e5c5fd0a09f55ba7b05ce1e2ec7171e",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "8452c85e5970578ecf49d0b3c48a518a",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "1acf59d4e8e9267484e5635bee0730ea",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "65d344082b8282acb78193d3ddcd3751",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "57ad999dcdb7b2810276ef52f8da7c2e",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "ec35b5c459c74efb3bf0f9d1461a3936",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "14ecbf98f8ff91e6dc27220563e566a5",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "f8ac156a52ebf4a834f13b74cba4c260",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "c08e8ab8c1d1ccc533c1f44457cfe90e",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "3193670862ed84af2f6bbf3dc7265137",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "5e45916a6cfb40a5667c691e507ea81d",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "419fba17d012361c3ca8174c44dffdb2",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "d895b4afb3bb74dd1c94595a126a2c24",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "56a67ab9520c07bc4be68162e78534b3",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "40f942e6da490173c0e17fdf23e786e8",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "3242b64140d0b0d6f7af09825d9489e0",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "5d41c8b29dc4e585b878c100e01e8af4",
|
||||
"src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c",
|
||||
"src/assets/ba_data/python/babase/_mgen/enums.py": "cb299985623bbcc86015cb103a424ae6",
|
||||
"src/ballistica/base/mgen/pyembed/binding_base.inc": "efa61468cf098f77cc6a234461d8b86d",
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
### 1.7.37 (build 21974, api 9, 2024-08-30)
|
||||
### 1.7.37 (build 21976, api 9, 2024-08-30)
|
||||
- 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.
|
||||
@ -41,7 +41,7 @@
|
||||
back-button handling are more automatic and windows don't have to hard-code
|
||||
where they came from. There are also other benefits such as better state
|
||||
saving/restoring. When writing a MainWindow, pretty much all navigation should
|
||||
only need too use methods: `can_change_main_window()`, `main_window_back()`,
|
||||
only need too use methods: `main_window_has_control()`, `main_window_back()`,
|
||||
and `main_window_replace()`.
|
||||
- Finally got things updated so language testing works again, and made it a bit
|
||||
spiffier while at it. You now simply point the game at your test language and
|
||||
|
||||
@ -52,7 +52,7 @@ if TYPE_CHECKING:
|
||||
|
||||
# Build number and version of the ballistica binary we expect to be
|
||||
# using.
|
||||
TARGET_BALLISTICA_BUILD = 21974
|
||||
TARGET_BALLISTICA_BUILD = 21976
|
||||
TARGET_BALLISTICA_VERSION = '1.7.37'
|
||||
|
||||
|
||||
|
||||
@ -99,7 +99,7 @@ class MainWindow(Window):
|
||||
edit=self._root_widget, transition=self._main_window_transition_out
|
||||
)
|
||||
|
||||
def can_change_main_window(self) -> bool:
|
||||
def main_window_has_control(self) -> bool:
|
||||
"""Is this MainWindow allowed to change the global main window?
|
||||
|
||||
It is a good idea to make sure this is True before calling
|
||||
@ -118,12 +118,12 @@ class MainWindow(Window):
|
||||
def main_window_back(self) -> None:
|
||||
"""Move back in the main window stack."""
|
||||
|
||||
# Users should always check can_change_main_window() before
|
||||
# Users should always check main_window_has_control() before
|
||||
# calling us. Error if it seems they did not.
|
||||
if not self.can_change_main_window():
|
||||
if not self.main_window_has_control():
|
||||
raise RuntimeError(
|
||||
'main_window_back() should only be called'
|
||||
' if can_change_main_window() returns True'
|
||||
' if main_window_has_control() returns True'
|
||||
' (it currently is False).'
|
||||
)
|
||||
|
||||
@ -137,13 +137,13 @@ class MainWindow(Window):
|
||||
) -> None:
|
||||
"""Replace ourself with a new MainWindow."""
|
||||
|
||||
# Users should always check can_change_main_window() before
|
||||
# Users should always check main_window_has_control() before
|
||||
# creating new MainWindows and passing them in here. Error if it
|
||||
# seems they did not.
|
||||
if not self.can_change_main_window():
|
||||
if not self.main_window_has_control():
|
||||
raise RuntimeError(
|
||||
'main_window_replace() should only be called'
|
||||
' if can_change_main_window() returns True'
|
||||
' if main_window_has_control() returns True'
|
||||
' (it currently is False).'
|
||||
)
|
||||
|
||||
|
||||
@ -487,7 +487,7 @@ class MainMenuWindow(bui.MainWindow):
|
||||
from bauiv1lib.confirm import QuitWindow
|
||||
|
||||
# no-op if we're not currently in control.
|
||||
if not self.can_change_main_window():
|
||||
if not self.main_window_has_control():
|
||||
return
|
||||
|
||||
# Note: Normally we should go through bui.quit(confirm=True) but
|
||||
@ -500,7 +500,7 @@ class MainMenuWindow(bui.MainWindow):
|
||||
from bauiv1lib.credits import CreditsWindow
|
||||
|
||||
# no-op if we're not currently in control.
|
||||
if not self.can_change_main_window():
|
||||
if not self.main_window_has_control():
|
||||
return
|
||||
|
||||
self.main_window_replace(
|
||||
@ -513,7 +513,7 @@ class MainMenuWindow(bui.MainWindow):
|
||||
from bauiv1lib.helpui import HelpWindow
|
||||
|
||||
# no-op if we're not currently in control.
|
||||
if not self.can_change_main_window():
|
||||
if not self.main_window_has_control():
|
||||
return
|
||||
|
||||
self.main_window_replace(
|
||||
@ -580,7 +580,7 @@ class MainMenuWindow(bui.MainWindow):
|
||||
from bauiv1lib.gather import GatherWindow
|
||||
|
||||
# no-op if we're not currently in control.
|
||||
if not self.can_change_main_window():
|
||||
if not self.main_window_has_control():
|
||||
return
|
||||
|
||||
self.main_window_replace(
|
||||
@ -592,7 +592,7 @@ class MainMenuWindow(bui.MainWindow):
|
||||
from bauiv1lib.watch import WatchWindow
|
||||
|
||||
# no-op if we're not currently in control.
|
||||
if not self.can_change_main_window():
|
||||
if not self.main_window_has_control():
|
||||
return
|
||||
|
||||
self.main_window_replace(
|
||||
@ -604,7 +604,7 @@ class MainMenuWindow(bui.MainWindow):
|
||||
from bauiv1lib.play import PlayWindow
|
||||
|
||||
# no-op if we're not currently in control.
|
||||
if not self.can_change_main_window():
|
||||
if not self.main_window_has_control():
|
||||
return
|
||||
|
||||
classic = bui.app.classic
|
||||
|
||||
@ -541,7 +541,7 @@ class PlayWindow(bui.MainWindow):
|
||||
# pylint: disable=cyclic-import
|
||||
|
||||
# no-op if we're not currently in control.
|
||||
if not self.can_change_main_window():
|
||||
if not self.main_window_has_control():
|
||||
return
|
||||
|
||||
if self._is_main_menu:
|
||||
@ -567,7 +567,7 @@ class PlayWindow(bui.MainWindow):
|
||||
from bauiv1lib.coop.browser import CoopBrowserWindow
|
||||
|
||||
# no-op if we're not currently in control.
|
||||
if not self.can_change_main_window():
|
||||
if not self.main_window_has_control():
|
||||
return
|
||||
|
||||
plus = bui.app.plus
|
||||
@ -588,7 +588,7 @@ class PlayWindow(bui.MainWindow):
|
||||
from bauiv1lib.playlist.browser import PlaylistBrowserWindow
|
||||
|
||||
# no-op if we're not currently in control.
|
||||
if not self.can_change_main_window():
|
||||
if not self.main_window_has_control():
|
||||
return
|
||||
|
||||
self._save_state()
|
||||
@ -604,7 +604,7 @@ class PlayWindow(bui.MainWindow):
|
||||
from bauiv1lib.playlist.browser import PlaylistBrowserWindow
|
||||
|
||||
# no-op if we're not currently in control.
|
||||
if not self.can_change_main_window():
|
||||
if not self.main_window_has_control():
|
||||
return
|
||||
|
||||
self._save_state()
|
||||
|
||||
@ -125,55 +125,11 @@ class StoreBrowserWindow(bui.MainWindow):
|
||||
bui.containerwidget(
|
||||
edit=self._root_widget, on_cancel_call=self._back
|
||||
)
|
||||
# backbutton = bui.get_special_widget('back_button')
|
||||
backbuttonspecial = True
|
||||
else:
|
||||
bui.containerwidget(edit=self._root_widget, cancel_button=btn)
|
||||
# backbutton = self._back_button
|
||||
backbuttonspecial = False
|
||||
|
||||
# self._ticket_count_text: bui.Widget | None = None
|
||||
# self._get_tickets_button: bui.Widget | None = None
|
||||
|
||||
# if bool(False):
|
||||
# if app.classic.allow_ticket_purchases:
|
||||
# self._get_tickets_button = bui.buttonwidget(
|
||||
# parent=self._root_widget,
|
||||
# size=(210, 65),
|
||||
# on_activate_call=self._on_get_more_tickets_press,
|
||||
# autoselect=True,
|
||||
# scale=0.9,
|
||||
# text_scale=1.4,
|
||||
# left_widget=backbutton,
|
||||
# color=(0.7, 0.5, 0.85),
|
||||
# textcolor=(0.2, 1.0, 0.2),
|
||||
# label=bui.Lstr(resource='getTicketsWindow.titleText'),
|
||||
# )
|
||||
# else:
|
||||
# self._ticket_count_text = bui.textwidget(
|
||||
# parent=self._root_widget,
|
||||
# size=(210, 64),
|
||||
# color=(0.2, 1.0, 0.2),
|
||||
# h_align='center',
|
||||
# v_align='center',
|
||||
# )
|
||||
|
||||
# Move this dynamically to keep it out of the way of the party icon.
|
||||
# self._update_get_tickets_button_pos()
|
||||
# self._get_ticket_pos_update_timer = bui.AppTimer(
|
||||
# 1.0,
|
||||
# bui.WeakCall(self._update_get_tickets_button_pos),
|
||||
# repeat=True,
|
||||
# )
|
||||
# if self._get_tickets_button and not backbuttonspecial:
|
||||
# bui.widget(
|
||||
# edit=self._back_button, right_widget=self._get_tickets_button
|
||||
# )
|
||||
# self._ticket_text_update_timer = bui.AppTimer(
|
||||
# 1.0, bui.WeakCall(self._update_tickets_text), repeat=True
|
||||
# )
|
||||
# self._update_tickets_text()
|
||||
|
||||
if (
|
||||
app.classic.platform in ['mac', 'ios']
|
||||
and app.classic.subplatform == 'appstore'
|
||||
@ -316,17 +272,6 @@ class StoreBrowserWindow(bui.MainWindow):
|
||||
)
|
||||
self._update_tabs()
|
||||
|
||||
# if self._get_tickets_button:
|
||||
# last_tab_button = self._tab_row.tabs[tabs_def[-1][0]].button
|
||||
# bui.widget(
|
||||
# edit=self._get_tickets_button, down_widget=last_tab_button
|
||||
# )
|
||||
# bui.widget(
|
||||
# edit=last_tab_button,
|
||||
# up_widget=self._get_tickets_button,
|
||||
# right_widget=self._get_tickets_button,
|
||||
# )
|
||||
|
||||
if uiscale is bui.UIScale.SMALL:
|
||||
first_tab_button = self._tab_row.tabs[tabs_def[0][0]].button
|
||||
last_tab_button = self._tab_row.tabs[tabs_def[-1][0]].button
|
||||
@ -346,28 +291,6 @@ class StoreBrowserWindow(bui.MainWindow):
|
||||
self._status_textwidget: bui.Widget | None = None
|
||||
self._restore_state()
|
||||
|
||||
# def _update_get_tickets_button_pos(self) -> None:
|
||||
# assert bui.app.classic is not None
|
||||
# uiscale = bui.app.ui_v1.uiscale
|
||||
# pos = (
|
||||
# self._width
|
||||
# - 252
|
||||
# - (
|
||||
# self._x_inset
|
||||
# + (
|
||||
# 47
|
||||
# if uiscale is bui.UIScale.SMALL
|
||||
# and bui.is_party_icon_visible()
|
||||
# else 0
|
||||
# )
|
||||
# ),
|
||||
# self._height - 70,
|
||||
# )
|
||||
# if self._get_tickets_button:
|
||||
# bui.buttonwidget(edit=self._get_tickets_button, position=pos)
|
||||
# if self._ticket_count_text:
|
||||
# bui.textwidget(edit=self._ticket_count_text, position=pos)
|
||||
|
||||
def _restore_purchases(self) -> None:
|
||||
from bauiv1lib import account
|
||||
|
||||
@ -411,25 +334,6 @@ class StoreBrowserWindow(bui.MainWindow):
|
||||
bui.textwidget(edit=tab_data['text'], text='')
|
||||
bui.imagewidget(edit=tab_data['img'], opacity=0.0)
|
||||
|
||||
# def _update_tickets_text(self) -> None:
|
||||
# from bauiv1 import SpecialChar
|
||||
|
||||
# if not self._root_widget:
|
||||
# return
|
||||
# plus = bui.app.plus
|
||||
# assert plus is not None
|
||||
# sval: str | bui.Lstr
|
||||
# if plus.get_v1_account_state() == 'signed_in':
|
||||
# sval = bui.charstr(SpecialChar.TICKET) + str(
|
||||
# plus.get_v1_account_ticket_count()
|
||||
# )
|
||||
# else:
|
||||
# sval = bui.Lstr(resource='getTicketsWindow.titleText')
|
||||
# if self._get_tickets_button:
|
||||
# bui.buttonwidget(edit=self._get_tickets_button, label=sval)
|
||||
# if self._ticket_count_text:
|
||||
# bui.textwidget(edit=self._ticket_count_text, text=sval)
|
||||
|
||||
def _set_tab(self, tab_id: TabID) -> None:
|
||||
if self._current_tab is tab_id:
|
||||
return
|
||||
@ -491,7 +395,6 @@ class StoreBrowserWindow(bui.MainWindow):
|
||||
window = self._window()
|
||||
if window is not None and (window.request is self):
|
||||
window.request = None
|
||||
# noinspection PyProtectedMember
|
||||
window._on_response(data)
|
||||
|
||||
# Kick off a server request.
|
||||
@ -601,8 +504,6 @@ class StoreBrowserWindow(bui.MainWindow):
|
||||
from bauiv1lib import account
|
||||
from bauiv1lib.confirm import ConfirmWindow
|
||||
|
||||
# from bauiv1lib import gettickets
|
||||
|
||||
assert bui.app.classic is not None
|
||||
store = bui.app.classic.store
|
||||
|
||||
@ -1292,8 +1193,6 @@ class StoreBrowserWindow(bui.MainWindow):
|
||||
for tab_id, tab in self._tab_row.tabs.items()
|
||||
if sel == tab.button
|
||||
]
|
||||
# if sel == self._get_tickets_button:
|
||||
# sel_name = 'GetTickets'
|
||||
if sel == self._scrollwidget:
|
||||
sel_name = 'Scroll'
|
||||
elif sel == self._back_button:
|
||||
@ -1327,8 +1226,6 @@ class StoreBrowserWindow(bui.MainWindow):
|
||||
|
||||
if self._show_tab is not None:
|
||||
current_tab = self._show_tab
|
||||
# if sel_name == 'GetTickets' and self._get_tickets_button:
|
||||
# sel = self._get_tickets_button
|
||||
if sel_name == 'Back':
|
||||
sel = self._back_button
|
||||
elif sel_name == 'Scroll':
|
||||
@ -1342,7 +1239,7 @@ class StoreBrowserWindow(bui.MainWindow):
|
||||
else:
|
||||
sel = self._tab_row.tabs[current_tab].button
|
||||
|
||||
# If we were requested to show a tab, select it too..
|
||||
# If we were requested to show a tab, select it too.
|
||||
if (
|
||||
self._show_tab is not None
|
||||
and self._show_tab in self._tab_row.tabs
|
||||
@ -1354,63 +1251,21 @@ class StoreBrowserWindow(bui.MainWindow):
|
||||
except Exception:
|
||||
logging.exception('Error restoring state for %s.', self)
|
||||
|
||||
# def _on_get_more_tickets_press(self) -> None:
|
||||
# # pylint: disable=cyclic-import
|
||||
# from bauiv1lib.account import show_sign_in_prompt
|
||||
# from bauiv1lib.gettickets import GetTicketsWindow
|
||||
|
||||
# # no-op if our underlying widget is dead or on its way out.
|
||||
# if not self._root_widget or self._root_widget.transitioning_out:
|
||||
# return
|
||||
|
||||
# plus = bui.app.plus
|
||||
# assert plus is not None
|
||||
|
||||
# if plus.get_v1_account_state() != 'signed_in':
|
||||
# show_sign_in_prompt()
|
||||
# return
|
||||
# self._save_state()
|
||||
# bui.containerwidget(edit=self._root_widget, transition='out_left')
|
||||
# window = GetTicketsWindow(
|
||||
# from_modal_store=self._modal,
|
||||
# store_back_location=self._back_location,
|
||||
# )
|
||||
# if not self._modal:
|
||||
# assert bui.app.classic is not None
|
||||
# bui.app.ui_v1.set_main_window(window, from_window=self)
|
||||
|
||||
def _back(self) -> None:
|
||||
# pylint: disable=cyclic-import
|
||||
# from bauiv1lib.coop.browser import CoopBrowserWindow
|
||||
# from bauiv1lib.mainmenu import MainMenuWindow
|
||||
|
||||
# no-op if our underlying widget is dead or on its way out.
|
||||
if not self._root_widget or self._root_widget.transitioning_out:
|
||||
return
|
||||
|
||||
self._save_state()
|
||||
|
||||
if self._modal:
|
||||
# no-op if our underlying widget is dead or on its way out.
|
||||
if not self._root_widget or self._root_widget.transitioning_out:
|
||||
return
|
||||
self._save_state()
|
||||
bui.containerwidget(
|
||||
edit=self._root_widget, transition=self._transition_out
|
||||
)
|
||||
else:
|
||||
# no-op if we're not currently in control.
|
||||
if not self.main_window_has_control():
|
||||
return
|
||||
self.main_window_back()
|
||||
# if not self._modal:
|
||||
# assert bui.app.classic is not None
|
||||
# if self._back_location == 'CoopBrowserWindow':
|
||||
# bui.app.ui_v1.set_main_window(
|
||||
# CoopBrowserWindow(transition='in_left'),
|
||||
# from_window=self,
|
||||
# is_back=True,
|
||||
# )
|
||||
# else:
|
||||
# bui.app.ui_v1.set_main_window(
|
||||
# MainMenuWindow(transition='in_left'),
|
||||
# from_window=self,
|
||||
# is_back=True,
|
||||
# is_top_level=True,
|
||||
# )
|
||||
if self._on_close_call is not None:
|
||||
self._on_close_call()
|
||||
|
||||
|
||||
@ -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 = 21974;
|
||||
const int kEngineBuildNumber = 21976;
|
||||
const char* kEngineVersion = "1.7.37";
|
||||
const int kEngineApiVersion = 9;
|
||||
|
||||
|
||||
@ -683,7 +683,7 @@ void RootWidget::Setup() {
|
||||
td.button = b;
|
||||
td.y = 0.0f;
|
||||
td.width = bd.width * 0.8f;
|
||||
td.text = "PlayerName";
|
||||
td.text = "AccountName";
|
||||
td.scale = 1.2f;
|
||||
td.depth_min = 0.3f;
|
||||
td.color_r = 0.5f;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user