Skip to content

Commit

Permalink
more ui polishing
Browse files Browse the repository at this point in the history
  • Loading branch information
efroemling committed Dec 28, 2024
1 parent 2a69a93 commit 68be5d3
Show file tree
Hide file tree
Showing 38 changed files with 438 additions and 1,083 deletions.
48 changes: 24 additions & 24 deletions .efrocachemap

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
### 1.7.37 (build 22146, api 9, 2024-12-25)
### 1.7.37 (build 22147, api 9, 2024-12-28)
- 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.
Expand Down
6 changes: 2 additions & 4 deletions src/assets/.asset_manifest_public.json
Original file line number Diff line number Diff line change
Expand Up @@ -420,11 +420,13 @@
"ba_data/python/bauiv1lib/account/__pycache__/__init__.cpython-312.opt-1.pyc",
"ba_data/python/bauiv1lib/account/__pycache__/link.cpython-312.opt-1.pyc",
"ba_data/python/bauiv1lib/account/__pycache__/settings.cpython-312.opt-1.pyc",
"ba_data/python/bauiv1lib/account/__pycache__/signin.cpython-312.opt-1.pyc",
"ba_data/python/bauiv1lib/account/__pycache__/unlink.cpython-312.opt-1.pyc",
"ba_data/python/bauiv1lib/account/__pycache__/v2proxy.cpython-312.opt-1.pyc",
"ba_data/python/bauiv1lib/account/__pycache__/viewer.cpython-312.opt-1.pyc",
"ba_data/python/bauiv1lib/account/link.py",
"ba_data/python/bauiv1lib/account/settings.py",
"ba_data/python/bauiv1lib/account/signin.py",
"ba_data/python/bauiv1lib/account/unlink.py",
"ba_data/python/bauiv1lib/account/v2proxy.py",
"ba_data/python/bauiv1lib/account/viewer.py",
Expand Down Expand Up @@ -476,9 +478,7 @@
"ba_data/python/bauiv1lib/kiosk.py",
"ba_data/python/bauiv1lib/league/__init__.py",
"ba_data/python/bauiv1lib/league/__pycache__/__init__.cpython-312.opt-1.pyc",
"ba_data/python/bauiv1lib/league/__pycache__/rankbutton.cpython-312.opt-1.pyc",
"ba_data/python/bauiv1lib/league/__pycache__/rankwindow.cpython-312.opt-1.pyc",
"ba_data/python/bauiv1lib/league/rankbutton.py",
"ba_data/python/bauiv1lib/league/rankwindow.py",
"ba_data/python/bauiv1lib/mainmenu.py",
"ba_data/python/bauiv1lib/party.py",
Expand Down Expand Up @@ -570,10 +570,8 @@
"ba_data/python/bauiv1lib/store/__init__.py",
"ba_data/python/bauiv1lib/store/__pycache__/__init__.cpython-312.opt-1.pyc",
"ba_data/python/bauiv1lib/store/__pycache__/browser.cpython-312.opt-1.pyc",
"ba_data/python/bauiv1lib/store/__pycache__/button.cpython-312.opt-1.pyc",
"ba_data/python/bauiv1lib/store/__pycache__/item.cpython-312.opt-1.pyc",
"ba_data/python/bauiv1lib/store/browser.py",
"ba_data/python/bauiv1lib/store/button.py",
"ba_data/python/bauiv1lib/store/item.py",
"ba_data/python/bauiv1lib/tabs.py",
"ba_data/python/bauiv1lib/teamnamescolors.py",
Expand Down
6 changes: 2 additions & 4 deletions src/assets/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,7 @@ SCRIPT_TARGETS_PY_PUBLIC = \
$(BUILD_DIR)/ba_data/python/bauiv1lib/account/__init__.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/account/link.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/account/settings.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/account/signin.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/account/unlink.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/account/v2proxy.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/account/viewer.py \
Expand Down Expand Up @@ -378,7 +379,6 @@ SCRIPT_TARGETS_PY_PUBLIC = \
$(BUILD_DIR)/ba_data/python/bauiv1lib/keyboard/englishkeyboard.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/kiosk.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/league/__init__.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/league/rankbutton.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/league/rankwindow.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/mainmenu.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/party.py \
Expand Down Expand Up @@ -432,7 +432,6 @@ SCRIPT_TARGETS_PY_PUBLIC = \
$(BUILD_DIR)/ba_data/python/bauiv1lib/soundtrack/macmusicapp.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/store/__init__.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/store/browser.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/store/button.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/store/item.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/tabs.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/teamnamescolors.py \
Expand Down Expand Up @@ -622,6 +621,7 @@ SCRIPT_TARGETS_PYC_PUBLIC = \
$(BUILD_DIR)/ba_data/python/bauiv1lib/account/__pycache__/__init__.cpython-312.opt-1.pyc \
$(BUILD_DIR)/ba_data/python/bauiv1lib/account/__pycache__/link.cpython-312.opt-1.pyc \
$(BUILD_DIR)/ba_data/python/bauiv1lib/account/__pycache__/settings.cpython-312.opt-1.pyc \
$(BUILD_DIR)/ba_data/python/bauiv1lib/account/__pycache__/signin.cpython-312.opt-1.pyc \
$(BUILD_DIR)/ba_data/python/bauiv1lib/account/__pycache__/unlink.cpython-312.opt-1.pyc \
$(BUILD_DIR)/ba_data/python/bauiv1lib/account/__pycache__/v2proxy.cpython-312.opt-1.pyc \
$(BUILD_DIR)/ba_data/python/bauiv1lib/account/__pycache__/viewer.cpython-312.opt-1.pyc \
Expand Down Expand Up @@ -659,7 +659,6 @@ SCRIPT_TARGETS_PYC_PUBLIC = \
$(BUILD_DIR)/ba_data/python/bauiv1lib/keyboard/__pycache__/englishkeyboard.cpython-312.opt-1.pyc \
$(BUILD_DIR)/ba_data/python/bauiv1lib/__pycache__/kiosk.cpython-312.opt-1.pyc \
$(BUILD_DIR)/ba_data/python/bauiv1lib/league/__pycache__/__init__.cpython-312.opt-1.pyc \
$(BUILD_DIR)/ba_data/python/bauiv1lib/league/__pycache__/rankbutton.cpython-312.opt-1.pyc \
$(BUILD_DIR)/ba_data/python/bauiv1lib/league/__pycache__/rankwindow.cpython-312.opt-1.pyc \
$(BUILD_DIR)/ba_data/python/bauiv1lib/__pycache__/mainmenu.cpython-312.opt-1.pyc \
$(BUILD_DIR)/ba_data/python/bauiv1lib/__pycache__/party.cpython-312.opt-1.pyc \
Expand Down Expand Up @@ -713,7 +712,6 @@ SCRIPT_TARGETS_PYC_PUBLIC = \
$(BUILD_DIR)/ba_data/python/bauiv1lib/soundtrack/__pycache__/macmusicapp.cpython-312.opt-1.pyc \
$(BUILD_DIR)/ba_data/python/bauiv1lib/store/__pycache__/__init__.cpython-312.opt-1.pyc \
$(BUILD_DIR)/ba_data/python/bauiv1lib/store/__pycache__/browser.cpython-312.opt-1.pyc \
$(BUILD_DIR)/ba_data/python/bauiv1lib/store/__pycache__/button.cpython-312.opt-1.pyc \
$(BUILD_DIR)/ba_data/python/bauiv1lib/store/__pycache__/item.cpython-312.opt-1.pyc \
$(BUILD_DIR)/ba_data/python/bauiv1lib/__pycache__/tabs.cpython-312.opt-1.pyc \
$(BUILD_DIR)/ba_data/python/bauiv1lib/__pycache__/teamnamescolors.cpython-312.opt-1.pyc \
Expand Down
3 changes: 2 additions & 1 deletion src/assets/ba_data/python/babase/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
get_type_name,
)
from babase._language import Lstr, LanguageSubsystem
from babase._logging import balog, lifecyclelog
from babase._logging import balog, applog, lifecyclelog
from babase._login import LoginAdapter, LoginInfo

from babase._mgen.enums import (
Expand Down Expand Up @@ -214,6 +214,7 @@
'AppIntentExec',
'AppMode',
'app_instance_uuid',
'applog',
'appname',
'appnameupper',
'AppModeSelector',
Expand Down
3 changes: 2 additions & 1 deletion src/assets/ba_data/python/babase/_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from babase._stringedit import StringEditSubsystem
from babase._devconsole import DevConsoleSubsystem
from babase._appconfig import AppConfig
from babase._logging import lifecyclelog
from babase._logging import lifecyclelog, applog

if TYPE_CHECKING:
import asyncio
Expand Down Expand Up @@ -909,6 +909,7 @@ def _update_state(self) -> None:
# Entering shutdown state:
if self.state is not self.State.SHUTTING_DOWN:
self.state = self.State.SHUTTING_DOWN
applog.info('Shutting down...')
lifecyclelog.info('app-state is now %s', self.state.name)
self._on_shutting_down()

Expand Down
1 change: 1 addition & 0 deletions src/assets/ba_data/python/babase/_logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@

# Our standard set of loggers.
balog = logging.getLogger('ba')
applog = logging.getLogger('ba.app')
lifecyclelog = logging.getLogger('ba.lifecycle')
75 changes: 58 additions & 17 deletions src/assets/ba_data/python/baclassic/_appmode.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
from bacommon.app import AppExperience
import babase
import bauiv1
from bauiv1lib.connectivity import wait_for_connectivity
from bauiv1lib.account.signin import show_sign_in_prompt

import _baclassic

Expand Down Expand Up @@ -429,17 +431,26 @@ def _auxiliary_window_nav(
def _root_ui_achievements_press(self) -> None:
from bauiv1lib.achievements import AchievementsWindow

self._auxiliary_window_nav(
win_type=AchievementsWindow,
win_create_call=lambda: AchievementsWindow(
origin_widget=bauiv1.get_special_widget('achievements_button')
),
if not self._ensure_signed_in_v1():
return

wait_for_connectivity(
on_connected=lambda: self._auxiliary_window_nav(
win_type=AchievementsWindow,
win_create_call=lambda: AchievementsWindow(
origin_widget=bauiv1.get_special_widget(
'achievements_button'
)
),
)
)

def _root_ui_inbox_press(self) -> None:
from bauiv1lib.connectivity import wait_for_connectivity
from bauiv1lib.inbox import InboxWindow

if not self._ensure_signed_in():
return

wait_for_connectivity(
on_connected=lambda: self._auxiliary_window_nav(
win_type=InboxWindow,
Expand All @@ -452,11 +463,16 @@ def _root_ui_inbox_press(self) -> None:
def _root_ui_store_press(self) -> None:
from bauiv1lib.store.browser import StoreBrowserWindow

self._auxiliary_window_nav(
win_type=StoreBrowserWindow,
win_create_call=lambda: StoreBrowserWindow(
origin_widget=bauiv1.get_special_widget('store_button')
),
if not self._ensure_signed_in_v1():
return

wait_for_connectivity(
on_connected=lambda: self._auxiliary_window_nav(
win_type=StoreBrowserWindow,
win_create_call=lambda: StoreBrowserWindow(
origin_widget=bauiv1.get_special_widget('store_button')
),
)
)

def _root_ui_tickets_meter_press(self) -> None:
Expand All @@ -474,13 +490,9 @@ def _root_ui_tokens_meter_press(self) -> None:
)

def _root_ui_trophy_meter_press(self) -> None:
from bauiv1lib.account import show_sign_in_prompt
from bauiv1lib.league.rankwindow import LeagueRankWindow

plus = bauiv1.app.plus
assert plus is not None
if plus.get_v1_account_state() != 'signed_in':
show_sign_in_prompt()
if not self._ensure_signed_in_v1():
return

self._auxiliary_window_nav(
Expand All @@ -500,16 +512,46 @@ def _root_ui_level_meter_press(self) -> None:
def _root_ui_inventory_press(self) -> None:
from bauiv1lib.inventory import InventoryWindow

if not self._ensure_signed_in_v1():
return

self._auxiliary_window_nav(
win_type=InventoryWindow,
win_create_call=lambda: InventoryWindow(
origin_widget=bauiv1.get_special_widget('inventory_button')
),
)

def _ensure_signed_in(self) -> bool:
"""Make sure we're signed in (requiring modern v2 accounts)."""
plus = bauiv1.app.plus
if plus is None:
bauiv1.screenmessage('This requires plus.', color=(1, 0, 0))
bauiv1.getsound('error').play()
return False
if plus.accounts.primary is None:
show_sign_in_prompt()
return False
return True

def _ensure_signed_in_v1(self) -> bool:
"""Make sure we're signed in (allowing legacy v1-only accounts)."""
plus = bauiv1.app.plus
if plus is None:
bauiv1.screenmessage('This requires plus.', color=(1, 0, 0))
bauiv1.getsound('error').play()
return False
if plus.get_v1_account_state() != 'signed_in':
show_sign_in_prompt()
return False
return True

def _root_ui_get_tokens_press(self) -> None:
from bauiv1lib.gettokens import GetTokensWindow

if not self._ensure_signed_in():
return

self._auxiliary_window_nav(
win_type=GetTokensWindow,
win_create_call=lambda: GetTokensWindow(
Expand All @@ -524,7 +566,6 @@ def _root_ui_chest_slot_pressed(self, index: int) -> None:
ChestWindow2,
ChestWindow3,
)
from bauiv1lib.connectivity import wait_for_connectivity

widgetid: Literal[
'chest_0_button',
Expand Down
2 changes: 1 addition & 1 deletion src/assets/ba_data/python/baenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

# Build number and version of the ballistica binary we expect to be
# using.
TARGET_BALLISTICA_BUILD = 22146
TARGET_BALLISTICA_BUILD = 22147
TARGET_BALLISTICA_VERSION = '1.7.37'


Expand Down
Loading

0 comments on commit 68be5d3

Please sign in to comment.