Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
156 changes: 78 additions & 78 deletions .efrocachemap

Large diffs are not rendered by default.

51 changes: 50 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,53 @@
### 1.7.53 (build 22573, api 9, 2025-10-03)
### 1.7.54 (build 22604, api 9, 2025-10-29)
- `scrollwidget` and `hscrollwidget` now center selected items that are too
large to fit completely in view instead of unpredictably scrolling to the
beginning or end of them. This makes show-buffer values (which effectively
make things bigger in the scrollwidget's eyes) more intuitive to use.
- Added new `button_type` values for `bauiv1.buttonwidget()`: 'small', 'medium',
'large', and 'larger'. These correspond to the styles that are normally
selected based on button dimensions; you can now choose them explicitly if you
like.

### 1.7.53 (build 22597, api 9, 2025-10-25)
- Fixes an issue where deleting player profiles would error.
- App audio output should now update when the default sound device changes
(plugging in headphones, etc). This applies to all platforms using recent
builds of OpenALSoft which should be most of them at this point.
- Added a `literal` arg to `bauiv1.textwidget()`. If you pass False for this,
the widget will never interpret strings such as '{"v":"foo"}' as Lstr data
(This is how Lstr values work under the hood). Another way to protect literal
strings is to wrap them in Lstrs (`bui.Lstr(value='{IAmNotJSON}')`), but that
way is less efficient.
- Added `text_literal` arg for `bauiv1.buttonwidget()` which does the same for
the button's label.
- Added `babase.CallPartial` and `babase.WeakCallPartial` - these are the same
as `babase.Call` and `babase.WeakCall`, with the addition that they now
support extra keyword args at call time; not only positional args.
- Added `babase.CallStrict` and `babase.WeakCallStrict` - these versions do not
allow extra args or keywords to be passed at call time, but in return they do
more complete type checking. You should prefer these when you are not passing
extra args at call time.
- Added warnings for `babase.Call` and `babase.WeakCall` that they should be
replaced by either the explicit 'partial' or 'strict' versions. Once api 9
support ends, `babase.Call` and `babase.WeakCall` will behave like the strict
versions instead of the partial versions and the warning will be removed.
- Added `auto_select_toolbars_only` bool arg to `bauiv1.widget()` (for editing
arbitrary widgets). When auto-select is on for a widget, this causes it to
*only* consider widgets in the top and bottom toolbars. This can be handy to
enable if you want to explicitly assign all other left/right/up/down widget
relationships in your window; this ensures that any directions you don't
assign will go to toolbars and not neighbor widgets (as sometimes auto-select
can make questionable choices).
- Toolbar nav buttons now glow while you are visiting them.
- UI control can now be taken from another input device after it is idle for 15
seconds (down from 30). Please holler if this feels too chaotic.
- Made UI selection highlighting behavior smarter and more consistent across
platforms. Highlighting is now disabled while clicks or taps are being used to
navigate the UI and enabled while any other devices (keyboards, game
controllers, etc.) are being used. Previously highlighting was either always
enabled or always disabled based on what devices were detected. This way
someone who plays with a keyboard or game controller but who taps/clicks their
way around the UI won't have to deal with confusing flashing buttons.

### 1.7.52 (build 22572, api 9, 2025-10-03)
- Empty version number bump.
Expand Down
50 changes: 50 additions & 0 deletions CHANGELOG_API_VERSIONS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
This file documents past and future changes associated with api-version bumps.

Although Ballistica strives to maintain backward compatibility when possible,
breaking changes are sometimes necessary. Ballistica's api-version system exists
to allow user code to gracefully adapt to these changes and to prevent older
incompatible code from being loaded and causing problems.

## Overlapping API Versions
In the past, api-version bumps required *all* mods to immediately update their
target versions before they would load again, which resulted in large amounts of
friction in the modding community. To avoid this problem, the engine will be
transitioning to an overlapping api-version system for the next api-version
bump. This means at some point it will support both api 9 and 10 at once. Mods
targeting api 9 will still function but will get warnings about updating to 10
and preparing for changes to occur with the removal of 9. Once enough time has
passed to allow the mod ecosystem to prepare, api 9 support will end and the
associated changes will occur. Later this process will repeat with api 10 and 11
coexisting for a while before 10 is dropped, etc.

To maintain a working mod, keep your `# ba_meta require api` lines targeting the
newest api version 'X' and ensure that your code accounts for all upcoming
changes to happen with the removal of 'X-1'. Generally the engine will issue
warnings for such code, but it is important to check the list below to be sure.

Note that once api 'X' becomes available, no more changes will be scheduled for
the 'X-1' removal. This means that if you update your code for 'X' and account
for all listed 'X-1' changes, your code should remain functional for as long as
'X' remains supported.

Note also that the engine makes no guarantees of *forward* compatibility within
api-versions. Changes and additions can happen at any time as long as they are
backwards compatible, and code targeting those changes should only expect to
work on builds newer than what they were built against; not older - even if the
api-version has not changed. In general it is best to always be running newest
available builds.

### Upcoming changes when api 9 support ends (and how to prepare for them)
- `ba*.Call()` will change to behave like `ba*.CallStrict()` instead of
`ba*.CallPartial()`. To prepare for this, change all of your existing `Call()`
usage to `CallPartial()` to lock in current behavior. Or use `CallStrict()` if
you don't need to pass extra args at call-time, as this gives better
type-checking.
- Same as above for `ba*.WeakCall()` (migrate to `WeakCallPartial()` or
`WeakCallStrict()`).
- `MainWindow.main_window_replace()` will no longer accept `MainWindow` objects
directly. To prepare for this, you should be passing callables to generate
`MainWindow` objects. Look at `bauiv1lib` for examples.
- `bauiv1.uicleanupcheck()` will be removed. To prepare for this, use
`ba*.app.ui_v1.add_use_cleanup_check()` instead.

2 changes: 2 additions & 0 deletions ballisticakit-windows/Generic/BallisticaKitGeneric.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@
</IgnoreAllDefaultLibraries>
<LinkTimeCodeGeneration>Default</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>../../src/external/windows/lib/$(Platform)</AdditionalLibraryDirectories>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
Expand Down Expand Up @@ -158,6 +159,7 @@
<OptimizeReferences>true</OptimizeReferences>
<LinkTimeCodeGeneration>UseFastLinkTimeCodeGeneration</LinkTimeCodeGeneration>
<AdditionalLibraryDirectories>../../src/external/windows/lib/$(Platform)</AdditionalLibraryDirectories>
<ImageHasSafeExceptionHandlers>false</ImageHasSafeExceptionHandlers>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
Expand Down
10 changes: 5 additions & 5 deletions config/requirements.txt
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
cpplint==2.0.2
cryptography==46.0.2
cryptography==46.0.3
dmgbuild==1.6.5
filelock==3.19.1
filelock==3.20.0
furo==2025.9.25
libcst==1.8.5
mypy==1.18.2
pbxproj==4.3.0
pbxproj==4.3.2
pur==7.3.3
pylint==3.3.8
pylint==4.0.2
pylsp-mypy==0.7.0
pytest==8.4.2
python-daemon==3.1.2
Expand All @@ -17,7 +17,7 @@ requests==2.32.5
Sphinx==8.2.3
tomlkit==0.13.3
types-certifi==2021.10.8.3
types-docutils==0.22.2.20250924
types-docutils==0.22.2.20251006
types-filelock==3.2.7
types-requests==2.32.4.20250913
typing_extensions==4.15.0
Expand Down
10 changes: 8 additions & 2 deletions src/assets/.asset_manifest_public.json
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,13 @@
"ba_data/python/bacommon/bs/_chest.py",
"ba_data/python/bacommon/bs/_clienteffect.py",
"ba_data/python/bacommon/bs/_clouddialog.py",
"ba_data/python/bacommon/bs/_cloudui.py",
"ba_data/python/bacommon/bs/_displayitem.py",
"ba_data/python/bacommon/bs/_msg.py",
"ba_data/python/bacommon/build.py",
"ba_data/python/bacommon/cloud.py",
"ba_data/python/bacommon/cloudui/__init__.py",
"ba_data/python/bacommon/cloudui/_cloudui.py",
"ba_data/python/bacommon/cloudui/v1.py",
"ba_data/python/bacommon/locale.py",
"ba_data/python/bacommon/loggercontrol.py",
"ba_data/python/bacommon/logging.py",
Expand Down Expand Up @@ -201,7 +203,6 @@
"ba_data/python/batemplatefs/_hooks.py",
"ba_data/python/bauiv1/__init__.py",
"ba_data/python/bauiv1/_appsubsystem.py",
"ba_data/python/bauiv1/_cloudui.py",
"ba_data/python/bauiv1/_hooks.py",
"ba_data/python/bauiv1/_keyboard.py",
"ba_data/python/bauiv1/_uitypes.py",
Expand All @@ -217,6 +218,11 @@
"ba_data/python/bauiv1lib/appinvite.py",
"ba_data/python/bauiv1lib/characterpicker.py",
"ba_data/python/bauiv1lib/chest.py",
"ba_data/python/bauiv1lib/cloudui/__init__.py",
"ba_data/python/bauiv1lib/cloudui/_controller.py",
"ba_data/python/bauiv1lib/cloudui/_prep.py",
"ba_data/python/bauiv1lib/cloudui/_test.py",
"ba_data/python/bauiv1lib/cloudui/_window.py",
"ba_data/python/bauiv1lib/colorpicker.py",
"ba_data/python/bauiv1lib/config.py",
"ba_data/python/bauiv1lib/confirm.py",
Expand Down
10 changes: 8 additions & 2 deletions src/assets/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,6 @@ SCRIPT_TARGETS_PY_PUBLIC = \
$(BUILD_DIR)/ba_data/python/batemplatefs/_hooks.py \
$(BUILD_DIR)/ba_data/python/bauiv1/__init__.py \
$(BUILD_DIR)/ba_data/python/bauiv1/_appsubsystem.py \
$(BUILD_DIR)/ba_data/python/bauiv1/_cloudui.py \
$(BUILD_DIR)/ba_data/python/bauiv1/_hooks.py \
$(BUILD_DIR)/ba_data/python/bauiv1/_keyboard.py \
$(BUILD_DIR)/ba_data/python/bauiv1/_uitypes.py \
Expand All @@ -352,6 +351,11 @@ SCRIPT_TARGETS_PY_PUBLIC = \
$(BUILD_DIR)/ba_data/python/bauiv1lib/appinvite.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/characterpicker.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/chest.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/cloudui/__init__.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/cloudui/_controller.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/cloudui/_prep.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/cloudui/_test.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/cloudui/_window.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/colorpicker.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/config.py \
$(BUILD_DIR)/ba_data/python/bauiv1lib/confirm.py \
Expand Down Expand Up @@ -486,11 +490,13 @@ SCRIPT_TARGETS_PY_PUBLIC_TOOLS = \
$(BUILD_DIR)/ba_data/python/bacommon/bs/_chest.py \
$(BUILD_DIR)/ba_data/python/bacommon/bs/_clienteffect.py \
$(BUILD_DIR)/ba_data/python/bacommon/bs/_clouddialog.py \
$(BUILD_DIR)/ba_data/python/bacommon/bs/_cloudui.py \
$(BUILD_DIR)/ba_data/python/bacommon/bs/_displayitem.py \
$(BUILD_DIR)/ba_data/python/bacommon/bs/_msg.py \
$(BUILD_DIR)/ba_data/python/bacommon/build.py \
$(BUILD_DIR)/ba_data/python/bacommon/cloud.py \
$(BUILD_DIR)/ba_data/python/bacommon/cloudui/__init__.py \
$(BUILD_DIR)/ba_data/python/bacommon/cloudui/_cloudui.py \
$(BUILD_DIR)/ba_data/python/bacommon/cloudui/v1.py \
$(BUILD_DIR)/ba_data/python/bacommon/locale.py \
$(BUILD_DIR)/ba_data/python/bacommon/loggercontrol.py \
$(BUILD_DIR)/ba_data/python/bacommon/logging.py \
Expand Down
56 changes: 32 additions & 24 deletions src/assets/ba_data/python/babase/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
# from other modules/packages. Code *within* this package should import
# things from this package's submodules directly to reduce the chance of
# dependency loops. The exception is TYPE_CHECKING blocks and
# annotations since those aren't evaluated at runtime.
# annotations - since those aren't evaluated at runtime, it is cleaner
# looking to use top level names directly.

import _babase
from _babase import (
Expand Down Expand Up @@ -134,68 +135,71 @@
from babase._appmodeselector import AppModeSelector
from babase._appconfig import AppConfig
from babase._apputils import (
AppHealthSubsystem,
get_remote_app_name,
handle_leftover_v1_cloud_log_file,
is_browser_likely_available,
get_remote_app_name,
AppHealthSubsystem,
utc_now_cloud,
)
from babase._cloud import CloudSubscription
from babase._devconsole import (
DevConsoleButtonDef,
DevConsoleSubsystem,
DevConsoleTab,
DevConsoleTabEntry,
DevConsoleSubsystem,
)
from babase._discord import DiscordSubsystem
from babase._emptyappmode import EmptyAppMode
from babase._error import (
ActivityNotFoundError,
ActorNotFoundError,
ContextError,
DelegateNotFoundError,
InputDeviceNotFoundError,
MapNotFoundError,
NodeNotFoundError,
NotFoundError,
PlayerNotFoundError,
SessionNotFoundError,
SessionPlayerNotFoundError,
NodeNotFoundError,
ActorNotFoundError,
InputDeviceNotFoundError,
WidgetNotFoundError,
ActivityNotFoundError,
TeamNotFoundError,
MapNotFoundError,
SessionTeamNotFoundError,
SessionNotFoundError,
DelegateNotFoundError,
TeamNotFoundError,
WidgetNotFoundError,
)
from babase._gc import GarbageCollectionSubsystem
from babase._general import (
DisplayTime,
AppTime,
WeakCall,
Call,
existing,
CallPartial,
CallStrict,
DisplayTime,
Existable,
verify_object_death,
storagename,
getclass,
WeakCall,
WeakCallPartial,
WeakCallStrict,
existing,
get_type_name,
getclass,
storagename,
verify_object_death,
)
from babase._language import Lstr, LanguageSubsystem
from babase._language import LanguageSubsystem, Lstr
from babase._locale import LocaleSubsystem
from babase._logging import (
balog,
accountlog,
applog,
balog,
lifecyclelog,
netlog,
uilog,
)
from babase._login import LoginAdapter, LoginInfo

from babase._mgen.enums import (
InputType,
Permission,
QuitType,
SpecialChar,
InputType,
UIScale,
QuitType,
)
from babase._math import normalized_color, is_point_in_box, vec3validate
from babase._meta import MetadataSubsystem
Expand Down Expand Up @@ -242,6 +246,8 @@
'atexit',
'balog',
'Call',
'CallPartial',
'CallStrict',
'fullscreen_control_available',
'fullscreen_control_get',
'fullscreen_control_key_shortcut',
Expand Down Expand Up @@ -391,6 +397,8 @@
'vec3validate',
'verify_object_death',
'WeakCall',
'WeakCallPartial',
'WeakCallStrict',
'WidgetNotFoundError',
'workspaces_in_use',
'WorkspaceSubsystem',
Expand Down
6 changes: 5 additions & 1 deletion src/assets/ba_data/python/babase/_app.py
Original file line number Diff line number Diff line change
Expand Up @@ -1059,8 +1059,12 @@ async def _run_shutdown_task(
task = asyncio.create_task(coro)
try:
await asyncio.wait_for(task, self.SHUTDOWN_TASK_TIMEOUT_SECONDS)
except TimeoutError:
# Log simple error message if it times out.
logging.error('Timed out waiting for shutdown task %s.', coro)
except Exception:
logging.exception('Error in shutdown task (%s).', coro)
# Go with full ugly stack trace for anything unexpected.
logging.exception('Error in shutdown task %s.', coro)

def _on_suspend(self) -> None:
"""Called when the app goes to a suspended state."""
Expand Down
Loading
Loading