mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-27 17:33:13 +08:00
disabled mypy implicit optionals
This commit is contained in:
parent
5c601a36df
commit
bbd17fe791
@ -420,7 +420,7 @@
|
||||
"assets/build/ba_data/audio/zoeOw.ogg": "https://files.ballistica.net/cache/ba1/dc/d2/160fc27fcaff10793327ac2c70fd",
|
||||
"assets/build/ba_data/audio/zoePickup01.ogg": "https://files.ballistica.net/cache/ba1/11/7a/87d6bca0acfb877fd4fd8fe3a598",
|
||||
"assets/build/ba_data/audio/zoeScream01.ogg": "https://files.ballistica.net/cache/ba1/44/f5/c943c9075abb3e1835d2408a1ef8",
|
||||
"assets/build/ba_data/data/langdata.json": "https://files.ballistica.net/cache/ba1/d9/7a/82db6c8a2513ebd2a2db9f2b25f7",
|
||||
"assets/build/ba_data/data/langdata.json": "https://files.ballistica.net/cache/ba1/08/f4/15b670652c536067374b14a0097c",
|
||||
"assets/build/ba_data/data/languages/arabic.json": "https://files.ballistica.net/cache/ba1/4c/fd/67a9dcdecb85dbaf549a8fbbdc78",
|
||||
"assets/build/ba_data/data/languages/belarussian.json": "https://files.ballistica.net/cache/ba1/61/03/89070ca765e06da3a419a579f503",
|
||||
"assets/build/ba_data/data/languages/chinese.json": "https://files.ballistica.net/cache/ba1/32/a7/b9208ab804dfe2d1c3960256e9f8",
|
||||
@ -444,7 +444,7 @@
|
||||
"assets/build/ba_data/data/languages/persian.json": "https://files.ballistica.net/cache/ba1/02/ab/e310f81582b6dc2ae93348d45166",
|
||||
"assets/build/ba_data/data/languages/polish.json": "https://files.ballistica.net/cache/ba1/76/be/84e567de0aabd9f9145b62179c2c",
|
||||
"assets/build/ba_data/data/languages/portuguese.json": "https://files.ballistica.net/cache/ba1/26/41/f1246ab56c6b7853f605c3a95889",
|
||||
"assets/build/ba_data/data/languages/romanian.json": "https://files.ballistica.net/cache/ba1/f4/74/a9e2f85b531061703d08a4118bed",
|
||||
"assets/build/ba_data/data/languages/romanian.json": "https://files.ballistica.net/cache/ba1/c9/5c/ccbae41f2baa11599563b4aabe00",
|
||||
"assets/build/ba_data/data/languages/russian.json": "https://files.ballistica.net/cache/ba1/8c/a7/1dea3643720ced9fa40a0b3d1add",
|
||||
"assets/build/ba_data/data/languages/serbian.json": "https://files.ballistica.net/cache/ba1/13/19/828be486951be254445263f36c6e",
|
||||
"assets/build/ba_data/data/languages/slovak.json": "https://files.ballistica.net/cache/ba1/f9/4b/d9f01814224066856695452ef57c",
|
||||
@ -3992,50 +3992,50 @@
|
||||
"assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e",
|
||||
"assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/b2/e5/0ee0561e16257a32830645239f34",
|
||||
"ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a",
|
||||
"build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/8e/62/a0b2c36ae4c9946ff6d2bbe60536",
|
||||
"build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/9c/6d/1958ddd5d36372cd05984f3f1491",
|
||||
"build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/06/b0/3383daecf55590156851be31ddca",
|
||||
"build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/10/2d/73f8d6e8d15b5d8e613768eab9fe",
|
||||
"build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/74/bf/2493e50c4a6211c05d46e61ee690",
|
||||
"build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/af/be/a8c7f280bb5c0eb70feacc95cb70",
|
||||
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/f4/14/f16305c17e826ba5304e3560b37b",
|
||||
"build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2e/ee/5cc95994525b837afd6b0a344e07",
|
||||
"build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/6e/25/2eb19336aa18f243c3818f3d684e",
|
||||
"build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/63/3d/52c08aceafbba0ec1ee22929e233",
|
||||
"build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/3b/76/2651de6a14dfac76523954383768",
|
||||
"build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/97/11/8c34021257c1717d12e02755e361",
|
||||
"build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/5e/35/16f3aa9f5dddfae1e8a8f44bd288",
|
||||
"build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/ed/68/61d55a826b44c31804e53fe9f2f8",
|
||||
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/27/da/ae61a120f83942040698e3c62795",
|
||||
"build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/21/a5/7dfb46884bf50c97a1b170161de5",
|
||||
"build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/bc/b3/d41ad33e7a27bb687126b59f6a63",
|
||||
"build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/73/d0/9ea990d6c6a22eafe5e39b7c9bf0",
|
||||
"build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/89/35/af5225fb6248d580ce4a62c0dff7",
|
||||
"build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/1b/ea/24741222a48bf6b0ae2b33c345ee",
|
||||
"build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/36/63/4eea616b1c44d1fc80881d583063",
|
||||
"build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/78/eb/361435ad4449473fcc8e79b2d253",
|
||||
"build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/80/16/8ebbc8bdb0447272ad4a7322e15c",
|
||||
"build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/19/be/351a09a6c93b0292ff6da126d235",
|
||||
"build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/9c/1b/9bdd35fc65ef082610332b01a022",
|
||||
"build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/6c/eb/95720079e16a95041f84237aecfc",
|
||||
"build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/23/55/28f16c8fe69a5bb4fa04f623d24e",
|
||||
"build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/6e/c0/b576e08d61b99805b78a85e443d8",
|
||||
"build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7b/d0/f2187807f1a355fd5daf06ba9a89",
|
||||
"build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/32/1b/b420610ac31a1cc159e5bfedbf90",
|
||||
"build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/44/42/217f4f3ae262675236d95b4f041a",
|
||||
"build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3b/75/a9bf8aa210df3295631b8ef64fe0",
|
||||
"build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/c9/61/d337eb64ba80d29129b3baaaefb2",
|
||||
"build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a4/73/03ba13813ed884e063bc070cb3a3",
|
||||
"build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/53/53/66b919b922f258938548e46bdce3",
|
||||
"build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/fb/51/05b095fe3c094e9709d68fc69cda",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/80/9f/a4168a2e1ff84f84f753321171b8",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/60/bb/dbea49521034f0f31e8af2d52472",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/31/90/95e999162f9ad805643b4b9db8d4",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/7a/8f/1a82c5c7bdc2d684428d7670e712",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/87/39/769a4deb741ad42185e05c3bfc85",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/9c/16/c967168be6fa2dd864724d4ac69c",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/a6/09/908ad0fda6281e0c07b5f84c89cc",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/80/4d/03fb2d4ffb5543f78c4f25795bc9",
|
||||
"build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/15/d2/1a406b0b7e999e8aa662b52d04e9",
|
||||
"build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/2d/dc/cc6582bcb2eb248dc475c7d4494d",
|
||||
"build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/3b/1d/6f9bbaaf443e222b479ab5b8a591",
|
||||
"build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/22/88/b04e74dbc00d435e3a8267c7f602",
|
||||
"build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/14/31/a8d35d1b4a1cfe687e959e8b5d73",
|
||||
"build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/f4/5a/d79e44ef4b78c0fd259fd8b145aa",
|
||||
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/0c/51/926b9b9ca55b84db740be8dd811f",
|
||||
"build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/35/e7/1d06c3c41c7fac2f19d8ddbfb260",
|
||||
"build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/4e/8e/9fd62508758abc41804ea7483534",
|
||||
"build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/32/8e/d55d91a23defc5f3dcc9308afc6a",
|
||||
"build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ab/92/d7e8c5cdda5c6434c7d78a7c725c",
|
||||
"build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/fc/44/28f780d39db0cd0eaaecdb9c74c8",
|
||||
"build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/25/89/b1c5f1dffd8e15d1a0dfe34e05e6",
|
||||
"build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/13/e7/2c15ca0d38d3e6dcf730d3df3073",
|
||||
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/11/8e/da14bd06757a23c8e0839c33925a",
|
||||
"build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9f/a5/38b0fc67536dda40901ac518a92a",
|
||||
"build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/e8/16/88ebb15d93868a5060c77d98c693",
|
||||
"build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/88/1b/0b5e22fc847f71005add59642d27",
|
||||
"build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/71/15/68af3e30dfc3a5f24551c0562bb4",
|
||||
"build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/95/1e/15388f9638f7ceedb2950f8ee48b",
|
||||
"build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3f/60/5fb1cb5bd1ee656517914df2eb26",
|
||||
"build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/95/92/1bac3bcac3e1f71417b7ff053b52",
|
||||
"build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/54/55/b16bb20de7c3ab30311e73707e17",
|
||||
"build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/6d/79/9b588be3e8d74c8c8bd761899be5",
|
||||
"build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e2/17/168f29b83ee04a412c0fa402258b",
|
||||
"build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a5/60/8d865d088dbc8d34d739b2c16fee",
|
||||
"build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/38/4d/101a78df34eada8ffa73636cd178",
|
||||
"build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/54/4b/4f8648af8ea56398da8b56babffa",
|
||||
"build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/3a/08/e5955806784ca0dbc2e9e679136a",
|
||||
"build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e2/7c/6d600a764587eb8d74b9701fe73f",
|
||||
"build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/96/4f/a761ffd6cbcc9d19015e8a2ebbd2",
|
||||
"build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4a/18/c94f7cf05127e82cd71f46dc7dd6",
|
||||
"build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/39/d1/0bd6a2cf0f447642d8e58b538243",
|
||||
"build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/bc/c0/1230a5a3ff3786fc335b57800324",
|
||||
"build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/b5/7f/0e2c1cf8683876727192587148ac",
|
||||
"build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/fe/04/375a70cb1510e2ec904a8d413a84",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/95/fd/76e14f54aa05b9893d7e51a9b72f",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/5f/2a/3f294394d9b3cac746e72d12371a",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/18/12/6ce38decdc15438730d6599e1205",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/cf/1e/cfc52166831c2845b52c3fdfe97e",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/8a/1e/496af892e73099ad8d019f48c0d6",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/94/be/26c915da46e21c50c266e5067fab",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/a4/e4/58fbe24e57b0cd7ccfc89b728c9a",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/83/20/3576abd41776af09082ebc4e798c",
|
||||
"src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/6e/6f/004b696e9a13b083069374e4bb6a",
|
||||
"src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/d3/db/e73d4dcf1280d5f677c3cf8b47c3"
|
||||
}
|
||||
@ -1,4 +1,4 @@
|
||||
### 1.7.2 (20617, 2022-06-24)
|
||||
### 1.7.2 (20620, 2022-06-25)
|
||||
- Minor fixes in some minigames (Thanks Droopy!)
|
||||
- Fixed a bug preventing 'clients' arg from working in _ba.chatmessage (Thanks imayushsaini!)
|
||||
- Fixed a bug where ba.Player.getdelegate(doraise=True) could return None instead of raising a ba.DelegateNotFoundError (thanks Dliwk!)
|
||||
|
||||
@ -1 +1 @@
|
||||
44699636502161276713676076818512618612
|
||||
82822179102970206444201557696312438222
|
||||
@ -325,7 +325,7 @@ class Material:
|
||||
ba.Material.add_actions() method to define what the material does.
|
||||
"""
|
||||
|
||||
def __init__(self, label: str = None):
|
||||
def __init__(self, label: str | None = None):
|
||||
pass
|
||||
|
||||
label: str
|
||||
@ -838,7 +838,7 @@ class SessionPlayer:
|
||||
|
||||
def setname(self,
|
||||
name: str,
|
||||
full_name: str = None,
|
||||
full_name: str | None = None,
|
||||
real: bool = True) -> None:
|
||||
"""Set the player's name to the provided string.
|
||||
A number will automatically be appended if the name is not unique from
|
||||
@ -1108,7 +1108,8 @@ def add_clean_frame_callback(call: Callable) -> None:
|
||||
return None
|
||||
|
||||
|
||||
def add_transaction(transaction: dict, callback: Callable = None) -> None:
|
||||
def add_transaction(transaction: dict,
|
||||
callback: Callable | None = None) -> None:
|
||||
"""(internal)"""
|
||||
return None
|
||||
|
||||
@ -1165,43 +1166,43 @@ def bless() -> None:
|
||||
return None
|
||||
|
||||
|
||||
def buttonwidget(edit: ba.Widget = None,
|
||||
parent: ba.Widget = None,
|
||||
size: Sequence[float] = None,
|
||||
position: Sequence[float] = None,
|
||||
on_activate_call: Callable = None,
|
||||
def buttonwidget(edit: ba.Widget | None = None,
|
||||
parent: ba.Widget | None = None,
|
||||
size: Sequence[float] | None = None,
|
||||
position: Sequence[float] | None = None,
|
||||
on_activate_call: Callable | None = None,
|
||||
label: str | ba.Lstr | None = None,
|
||||
color: Sequence[float] = None,
|
||||
down_widget: ba.Widget = None,
|
||||
up_widget: ba.Widget = None,
|
||||
left_widget: ba.Widget = None,
|
||||
right_widget: ba.Widget = None,
|
||||
texture: ba.Texture = None,
|
||||
text_scale: float = None,
|
||||
textcolor: Sequence[float] = None,
|
||||
enable_sound: bool = None,
|
||||
model_transparent: ba.Model = None,
|
||||
model_opaque: ba.Model = None,
|
||||
repeat: bool = None,
|
||||
scale: float = None,
|
||||
transition_delay: float = None,
|
||||
on_select_call: Callable = None,
|
||||
button_type: str = None,
|
||||
extra_touch_border_scale: float = None,
|
||||
selectable: bool = None,
|
||||
show_buffer_top: float = None,
|
||||
icon: ba.Texture = None,
|
||||
iconscale: float = None,
|
||||
icon_tint: float = None,
|
||||
icon_color: Sequence[float] = None,
|
||||
autoselect: bool = None,
|
||||
mask_texture: ba.Texture = None,
|
||||
tint_texture: ba.Texture = None,
|
||||
tint_color: Sequence[float] = None,
|
||||
tint2_color: Sequence[float] = None,
|
||||
text_flatness: float = None,
|
||||
text_res_scale: float = None,
|
||||
enabled: bool = None) -> ba.Widget:
|
||||
color: Sequence[float] | None = None,
|
||||
down_widget: ba.Widget | None = None,
|
||||
up_widget: ba.Widget | None = None,
|
||||
left_widget: ba.Widget | None = None,
|
||||
right_widget: ba.Widget | None = None,
|
||||
texture: ba.Texture | None = None,
|
||||
text_scale: float | None = None,
|
||||
textcolor: Sequence[float] | None = None,
|
||||
enable_sound: bool | None = None,
|
||||
model_transparent: ba.Model | None = None,
|
||||
model_opaque: ba.Model | None = None,
|
||||
repeat: bool | None = None,
|
||||
scale: float | None = None,
|
||||
transition_delay: float | None = None,
|
||||
on_select_call: Callable | None = None,
|
||||
button_type: str | None = None,
|
||||
extra_touch_border_scale: float | None = None,
|
||||
selectable: bool | None = None,
|
||||
show_buffer_top: float | None = None,
|
||||
icon: ba.Texture | None = None,
|
||||
iconscale: float | None = None,
|
||||
icon_tint: float | None = None,
|
||||
icon_color: Sequence[float] | None = None,
|
||||
autoselect: bool | None = None,
|
||||
mask_texture: ba.Texture | None = None,
|
||||
tint_texture: ba.Texture | None = None,
|
||||
tint_color: Sequence[float] | None = None,
|
||||
tint2_color: Sequence[float] | None = None,
|
||||
text_flatness: float | None = None,
|
||||
text_res_scale: float | None = None,
|
||||
enabled: bool | None = None) -> ba.Widget:
|
||||
"""Create or edit a button widget.
|
||||
|
||||
Category: **User Interface Functions**
|
||||
@ -1269,27 +1270,27 @@ def charstr(char_id: ba.SpecialChar) -> str:
|
||||
|
||||
|
||||
def chatmessage(message: str | ba.Lstr,
|
||||
clients: Sequence[int] = None,
|
||||
sender_override: str = None) -> None:
|
||||
clients: Sequence[int] | None = None,
|
||||
sender_override: str | None = None) -> None:
|
||||
"""(internal)"""
|
||||
return None
|
||||
|
||||
|
||||
def checkboxwidget(edit: ba.Widget = None,
|
||||
parent: ba.Widget = None,
|
||||
size: Sequence[float] = None,
|
||||
position: Sequence[float] = None,
|
||||
def checkboxwidget(edit: ba.Widget | None = None,
|
||||
parent: ba.Widget | None = None,
|
||||
size: Sequence[float] | None = None,
|
||||
position: Sequence[float] | None = None,
|
||||
text: str | ba.Lstr | None = None,
|
||||
value: bool = None,
|
||||
on_value_change_call: Callable[[bool], None] = None,
|
||||
on_select_call: Callable[[], None] = None,
|
||||
text_scale: float = None,
|
||||
textcolor: Sequence[float] = None,
|
||||
scale: float = None,
|
||||
is_radio_button: bool = None,
|
||||
maxwidth: float = None,
|
||||
autoselect: bool = None,
|
||||
color: Sequence[float] = None) -> ba.Widget:
|
||||
value: bool | None = None,
|
||||
on_value_change_call: Callable[[bool], None] | None = None,
|
||||
on_select_call: Callable[[], None] | None = None,
|
||||
text_scale: float | None = None,
|
||||
textcolor: Sequence[float] | None = None,
|
||||
scale: float | None = None,
|
||||
is_radio_button: bool | None = None,
|
||||
maxwidth: float | None = None,
|
||||
autoselect: bool | None = None,
|
||||
color: Sequence[float] | None = None) -> ba.Widget:
|
||||
"""Create or edit a check-box widget.
|
||||
|
||||
Category: **User Interface Functions**
|
||||
@ -1351,23 +1352,23 @@ def clipboard_set_text(value: str) -> None:
|
||||
return None
|
||||
|
||||
|
||||
def columnwidget(edit: ba.Widget = None,
|
||||
parent: ba.Widget = None,
|
||||
size: Sequence[float] = None,
|
||||
position: Sequence[float] = None,
|
||||
background: bool = None,
|
||||
selected_child: ba.Widget = None,
|
||||
visible_child: ba.Widget = None,
|
||||
single_depth: bool = None,
|
||||
print_list_exit_instructions: bool = None,
|
||||
left_border: float = None,
|
||||
top_border: float = None,
|
||||
bottom_border: float = None,
|
||||
selection_loops_to_parent: bool = None,
|
||||
border: float = None,
|
||||
margin: float = None,
|
||||
claims_left_right: bool = None,
|
||||
claims_tab: bool = None) -> ba.Widget:
|
||||
def columnwidget(edit: ba.Widget | None = None,
|
||||
parent: ba.Widget | None = None,
|
||||
size: Sequence[float] | None = None,
|
||||
position: Sequence[float] | None = None,
|
||||
background: bool | None = None,
|
||||
selected_child: ba.Widget | None = None,
|
||||
visible_child: ba.Widget | None = None,
|
||||
single_depth: bool | None = None,
|
||||
print_list_exit_instructions: bool | None = None,
|
||||
left_border: float | None = None,
|
||||
top_border: float | None = None,
|
||||
bottom_border: float | None = None,
|
||||
selection_loops_to_parent: bool | None = None,
|
||||
border: float | None = None,
|
||||
margin: float | None = None,
|
||||
claims_left_right: bool | None = None,
|
||||
claims_tab: bool | None = None) -> ba.Widget:
|
||||
"""Create or edit a column widget.
|
||||
|
||||
Category: **User Interface Functions**
|
||||
@ -1386,7 +1387,7 @@ def commit_config(config: str) -> None:
|
||||
|
||||
|
||||
def connect_to_party(address: str,
|
||||
port: int = None,
|
||||
port: int | None = None,
|
||||
print_progress: bool = True) -> None:
|
||||
"""(internal)"""
|
||||
return None
|
||||
@ -1402,37 +1403,37 @@ def console_print(*args: Any) -> None:
|
||||
return None
|
||||
|
||||
|
||||
def containerwidget(edit: ba.Widget = None,
|
||||
parent: ba.Widget = None,
|
||||
size: Sequence[float] = None,
|
||||
position: Sequence[float] = None,
|
||||
background: bool = None,
|
||||
selected_child: ba.Widget = None,
|
||||
transition: str = None,
|
||||
cancel_button: ba.Widget = None,
|
||||
start_button: ba.Widget = None,
|
||||
root_selectable: bool = None,
|
||||
on_activate_call: Callable[[], None] = None,
|
||||
claims_left_right: bool = None,
|
||||
claims_tab: bool = None,
|
||||
selection_loops: bool = None,
|
||||
selection_loops_to_parent: bool = None,
|
||||
scale: float = None,
|
||||
on_outside_click_call: Callable[[], None] = None,
|
||||
single_depth: bool = None,
|
||||
visible_child: ba.Widget = None,
|
||||
stack_offset: Sequence[float] = None,
|
||||
color: Sequence[float] = None,
|
||||
on_cancel_call: Callable[[], None] = None,
|
||||
print_list_exit_instructions: bool = None,
|
||||
click_activate: bool = None,
|
||||
always_highlight: bool = None,
|
||||
selectable: bool = None,
|
||||
scale_origin_stack_offset: Sequence[float] = None,
|
||||
toolbar_visibility: str = None,
|
||||
on_select_call: Callable[[], None] = None,
|
||||
claim_outside_clicks: bool = None,
|
||||
claims_up_down: bool = None) -> ba.Widget:
|
||||
def containerwidget(edit: ba.Widget | None = None,
|
||||
parent: ba.Widget | None = None,
|
||||
size: Sequence[float] | None = None,
|
||||
position: Sequence[float] | None = None,
|
||||
background: bool | None = None,
|
||||
selected_child: ba.Widget | None = None,
|
||||
transition: str | None = None,
|
||||
cancel_button: ba.Widget | None = None,
|
||||
start_button: ba.Widget | None = None,
|
||||
root_selectable: bool | None = None,
|
||||
on_activate_call: Callable[[], None] | None = None,
|
||||
claims_left_right: bool | None = None,
|
||||
claims_tab: bool | None = None,
|
||||
selection_loops: bool | None = None,
|
||||
selection_loops_to_parent: bool | None = None,
|
||||
scale: float | None = None,
|
||||
on_outside_click_call: Callable[[], None] | None = None,
|
||||
single_depth: bool | None = None,
|
||||
visible_child: ba.Widget | None = None,
|
||||
stack_offset: Sequence[float] | None = None,
|
||||
color: Sequence[float] | None = None,
|
||||
on_cancel_call: Callable[[], None] | None = None,
|
||||
print_list_exit_instructions: bool | None = None,
|
||||
click_activate: bool | None = None,
|
||||
always_highlight: bool | None = None,
|
||||
selectable: bool | None = None,
|
||||
scale_origin_stack_offset: Sequence[float] | None = None,
|
||||
toolbar_visibility: str | None = None,
|
||||
on_select_call: Callable[[], None] | None = None,
|
||||
claim_outside_clicks: bool | None = None,
|
||||
claims_up_down: bool | None = None) -> ba.Widget:
|
||||
"""Create or edit a container widget.
|
||||
|
||||
Category: **User Interface Functions**
|
||||
@ -2160,22 +2161,22 @@ def host_scan_cycle() -> list:
|
||||
return list()
|
||||
|
||||
|
||||
def hscrollwidget(edit: ba.Widget = None,
|
||||
parent: ba.Widget = None,
|
||||
size: Sequence[float] = None,
|
||||
position: Sequence[float] = None,
|
||||
background: bool = None,
|
||||
selected_child: ba.Widget = None,
|
||||
capture_arrows: bool = None,
|
||||
on_select_call: Callable[[], None] = None,
|
||||
center_small_content: bool = None,
|
||||
color: Sequence[float] = None,
|
||||
highlight: bool = None,
|
||||
border_opacity: float = None,
|
||||
simple_culling_h: float = None,
|
||||
claims_left_right: bool = None,
|
||||
claims_up_down: bool = None,
|
||||
claims_tab: bool = None) -> ba.Widget:
|
||||
def hscrollwidget(edit: ba.Widget | None = None,
|
||||
parent: ba.Widget | None = None,
|
||||
size: Sequence[float] | None = None,
|
||||
position: Sequence[float] | None = None,
|
||||
background: bool | None = None,
|
||||
selected_child: ba.Widget | None = None,
|
||||
capture_arrows: bool | None = None,
|
||||
on_select_call: Callable[[], None] | None = None,
|
||||
center_small_content: bool | None = None,
|
||||
color: Sequence[float] | None = None,
|
||||
highlight: bool | None = None,
|
||||
border_opacity: float | None = None,
|
||||
simple_culling_h: float | None = None,
|
||||
claims_left_right: bool | None = None,
|
||||
claims_up_down: bool | None = None,
|
||||
claims_tab: bool | None = None) -> ba.Widget:
|
||||
"""Create or edit a horizontal scroll widget.
|
||||
|
||||
Category: **User Interface Functions**
|
||||
@ -2188,24 +2189,24 @@ def hscrollwidget(edit: ba.Widget = None,
|
||||
return ba.Widget()
|
||||
|
||||
|
||||
def imagewidget(edit: ba.Widget = None,
|
||||
parent: ba.Widget = None,
|
||||
size: Sequence[float] = None,
|
||||
position: Sequence[float] = None,
|
||||
color: Sequence[float] = None,
|
||||
texture: ba.Texture = None,
|
||||
opacity: float = None,
|
||||
model_transparent: ba.Model = None,
|
||||
model_opaque: ba.Model = None,
|
||||
def imagewidget(edit: ba.Widget | None = None,
|
||||
parent: ba.Widget | None = None,
|
||||
size: Sequence[float] | None = None,
|
||||
position: Sequence[float] | None = None,
|
||||
color: Sequence[float] | None = None,
|
||||
texture: ba.Texture | None = None,
|
||||
opacity: float | None = None,
|
||||
model_transparent: ba.Model | None = None,
|
||||
model_opaque: ba.Model | None = None,
|
||||
has_alpha_channel: bool = True,
|
||||
tint_texture: ba.Texture = None,
|
||||
tint_color: Sequence[float] = None,
|
||||
transition_delay: float = None,
|
||||
draw_controller: ba.Widget = None,
|
||||
tint2_color: Sequence[float] = None,
|
||||
tilt_scale: float = None,
|
||||
mask_texture: ba.Texture = None,
|
||||
radial_amount: float = None) -> ba.Widget:
|
||||
tint_texture: ba.Texture | None = None,
|
||||
tint_color: Sequence[float] | None = None,
|
||||
transition_delay: float | None = None,
|
||||
draw_controller: ba.Widget | None = None,
|
||||
tint2_color: Sequence[float] | None = None,
|
||||
tilt_scale: float | None = None,
|
||||
mask_texture: ba.Texture | None = None,
|
||||
radial_amount: float | None = None) -> ba.Widget:
|
||||
"""Create or edit an image widget.
|
||||
|
||||
Category: **User Interface Functions**
|
||||
@ -2406,7 +2407,7 @@ def music_player_stop() -> None:
|
||||
|
||||
|
||||
def new_host_session(sessiontype: type[ba.Session],
|
||||
benchmark_type: str = None) -> None:
|
||||
benchmark_type: str | None = None) -> None:
|
||||
"""(internal)"""
|
||||
return None
|
||||
|
||||
@ -2417,7 +2418,7 @@ def new_replay_session(file_name: str) -> None:
|
||||
|
||||
|
||||
def newactivity(activity_type: type[ba.Activity],
|
||||
settings: dict = None) -> ba.Activity:
|
||||
settings: dict | None = None) -> ba.Activity:
|
||||
"""Instantiates a ba.Activity given a type object.
|
||||
|
||||
Category: **General Utility Functions**
|
||||
@ -2430,9 +2431,9 @@ def newactivity(activity_type: type[ba.Activity],
|
||||
|
||||
|
||||
def newnode(type: str,
|
||||
owner: ba.Node = None,
|
||||
attrs: dict = None,
|
||||
name: str = None,
|
||||
owner: ba.Node | None = None,
|
||||
attrs: dict | None = None,
|
||||
name: str | None = None,
|
||||
delegate: Any = None) -> Node:
|
||||
"""Add a node of the given type to the game.
|
||||
|
||||
@ -2484,7 +2485,7 @@ def open_url(address: str) -> None:
|
||||
|
||||
def playsound(sound: Sound,
|
||||
volume: float = 1.0,
|
||||
position: Sequence[float] = None,
|
||||
position: Sequence[float] | None = None,
|
||||
host_only: bool = False) -> None:
|
||||
"""Play a ba.Sound a single time.
|
||||
|
||||
@ -2652,16 +2653,16 @@ def restore_purchases() -> None:
|
||||
return None
|
||||
|
||||
|
||||
def rowwidget(edit: ba.Widget = None,
|
||||
parent: ba.Widget = None,
|
||||
size: Sequence[float] = None,
|
||||
position: Sequence[float] = None,
|
||||
background: bool = None,
|
||||
selected_child: ba.Widget = None,
|
||||
visible_child: ba.Widget = None,
|
||||
claims_left_right: bool = None,
|
||||
claims_tab: bool = None,
|
||||
selection_loops_to_parent: bool = None) -> ba.Widget:
|
||||
def rowwidget(edit: ba.Widget | None = None,
|
||||
parent: ba.Widget | None = None,
|
||||
size: Sequence[float] | None = None,
|
||||
position: Sequence[float] | None = None,
|
||||
background: bool | None = None,
|
||||
selected_child: ba.Widget | None = None,
|
||||
visible_child: ba.Widget | None = None,
|
||||
claims_left_right: bool | None = None,
|
||||
claims_tab: bool | None = None,
|
||||
selection_loops_to_parent: bool | None = None) -> ba.Widget:
|
||||
"""Create or edit a row widget.
|
||||
|
||||
Category: **User Interface Functions**
|
||||
@ -2692,11 +2693,11 @@ def safecolor(color: Sequence[float],
|
||||
|
||||
|
||||
def screenmessage(message: str | ba.Lstr,
|
||||
color: Sequence[float] = None,
|
||||
color: Sequence[float] | None = None,
|
||||
top: bool = False,
|
||||
image: dict[str, Any] = None,
|
||||
image: dict[str, Any] | None = None,
|
||||
log: bool = False,
|
||||
clients: Sequence[int] = None,
|
||||
clients: Sequence[int] | None = None,
|
||||
transient: bool = False) -> None:
|
||||
"""Print a message to the local client's screen, in a given color.
|
||||
|
||||
@ -2715,24 +2716,24 @@ def screenmessage(message: str | ba.Lstr,
|
||||
return None
|
||||
|
||||
|
||||
def scrollwidget(edit: ba.Widget = None,
|
||||
parent: ba.Widget = None,
|
||||
size: Sequence[float] = None,
|
||||
position: Sequence[float] = None,
|
||||
background: bool = None,
|
||||
selected_child: ba.Widget = None,
|
||||
def scrollwidget(edit: ba.Widget | None = None,
|
||||
parent: ba.Widget | None = None,
|
||||
size: Sequence[float] | None = None,
|
||||
position: Sequence[float] | None = None,
|
||||
background: bool | None = None,
|
||||
selected_child: ba.Widget | None = None,
|
||||
capture_arrows: bool = False,
|
||||
on_select_call: Callable = None,
|
||||
center_small_content: bool = None,
|
||||
color: Sequence[float] = None,
|
||||
highlight: bool = None,
|
||||
border_opacity: float = None,
|
||||
simple_culling_v: float = None,
|
||||
selection_loops_to_parent: bool = None,
|
||||
claims_left_right: bool = None,
|
||||
claims_up_down: bool = None,
|
||||
claims_tab: bool = None,
|
||||
autoselect: bool = None) -> ba.Widget:
|
||||
on_select_call: Callable | None = None,
|
||||
center_small_content: bool | None = None,
|
||||
color: Sequence[float] | None = None,
|
||||
highlight: bool | None = None,
|
||||
border_opacity: float | None = None,
|
||||
simple_culling_v: float | None = None,
|
||||
selection_loops_to_parent: bool | None = None,
|
||||
claims_left_right: bool | None = None,
|
||||
claims_up_down: bool | None = None,
|
||||
claims_tab: bool | None = None,
|
||||
autoselect: bool | None = None) -> ba.Widget:
|
||||
"""Create or edit a scroll widget.
|
||||
|
||||
Category: **User Interface Functions**
|
||||
@ -2923,13 +2924,14 @@ def setup_sigint() -> None:
|
||||
|
||||
|
||||
def show_ad(purpose: str,
|
||||
on_completion_call: Callable[[], None] = None) -> None:
|
||||
on_completion_call: Callable[[], None] | None = None) -> None:
|
||||
"""(internal)"""
|
||||
return None
|
||||
|
||||
|
||||
def show_ad_2(purpose: str,
|
||||
on_completion_call: Callable[[bool], None] = None) -> None:
|
||||
def show_ad_2(
|
||||
purpose: str,
|
||||
on_completion_call: Callable[[bool], None] | None = None) -> None:
|
||||
"""(internal)"""
|
||||
return None
|
||||
|
||||
@ -2944,8 +2946,8 @@ def show_app_invite(title: str | ba.Lstr, message: str | ba.Lstr,
|
||||
|
||||
|
||||
def show_online_score_ui(show: str = 'general',
|
||||
game: str = None,
|
||||
game_version: str = None) -> None:
|
||||
game: str | None = None,
|
||||
game_version: str | None = None) -> None:
|
||||
"""(internal)"""
|
||||
return None
|
||||
|
||||
@ -3000,41 +3002,41 @@ def submit_score(game: str,
|
||||
return None
|
||||
|
||||
|
||||
def textwidget(edit: ba.Widget = None,
|
||||
parent: ba.Widget = None,
|
||||
size: Sequence[float] = None,
|
||||
position: Sequence[float] = None,
|
||||
def textwidget(edit: ba.Widget | None = None,
|
||||
parent: ba.Widget | None = None,
|
||||
size: Sequence[float] | None = None,
|
||||
position: Sequence[float] | None = None,
|
||||
text: str | ba.Lstr | None = None,
|
||||
v_align: str = None,
|
||||
h_align: str = None,
|
||||
editable: bool = None,
|
||||
padding: float = None,
|
||||
on_return_press_call: Callable[[], None] = None,
|
||||
on_activate_call: Callable[[], None] = None,
|
||||
selectable: bool = None,
|
||||
query: ba.Widget = None,
|
||||
max_chars: int = None,
|
||||
color: Sequence[float] = None,
|
||||
click_activate: bool = None,
|
||||
on_select_call: Callable[[], None] = None,
|
||||
always_highlight: bool = None,
|
||||
draw_controller: ba.Widget = None,
|
||||
scale: float = None,
|
||||
corner_scale: float = None,
|
||||
v_align: str | None = None,
|
||||
h_align: str | None = None,
|
||||
editable: bool | None = None,
|
||||
padding: float | None = None,
|
||||
on_return_press_call: Callable[[], None] | None = None,
|
||||
on_activate_call: Callable[[], None] | None = None,
|
||||
selectable: bool | None = None,
|
||||
query: ba.Widget | None = None,
|
||||
max_chars: int | None = None,
|
||||
color: Sequence[float] | None = None,
|
||||
click_activate: bool | None = None,
|
||||
on_select_call: Callable[[], None] | None = None,
|
||||
always_highlight: bool | None = None,
|
||||
draw_controller: ba.Widget | None = None,
|
||||
scale: float | None = None,
|
||||
corner_scale: float | None = None,
|
||||
description: str | ba.Lstr | None = None,
|
||||
transition_delay: float = None,
|
||||
maxwidth: float = None,
|
||||
max_height: float = None,
|
||||
flatness: float = None,
|
||||
shadow: float = None,
|
||||
autoselect: bool = None,
|
||||
rotate: float = None,
|
||||
enabled: bool = None,
|
||||
force_internal_editing: bool = None,
|
||||
always_show_carat: bool = None,
|
||||
big: bool = None,
|
||||
extra_touch_border_scale: float = None,
|
||||
res_scale: float = None) -> Widget:
|
||||
transition_delay: float | None = None,
|
||||
maxwidth: float | None = None,
|
||||
max_height: float | None = None,
|
||||
flatness: float | None = None,
|
||||
shadow: float | None = None,
|
||||
autoselect: bool | None = None,
|
||||
rotate: float | None = None,
|
||||
enabled: bool | None = None,
|
||||
force_internal_editing: bool | None = None,
|
||||
always_show_carat: bool | None = None,
|
||||
big: bool | None = None,
|
||||
extra_touch_border_scale: float | None = None,
|
||||
res_scale: float | None = None) -> Widget:
|
||||
"""Create or edit a text widget.
|
||||
|
||||
Category: **User Interface Functions**
|
||||
@ -3204,22 +3206,22 @@ def unlock_all_input() -> None:
|
||||
|
||||
|
||||
def value_test(arg: str,
|
||||
change: float = None,
|
||||
absolute: float = None) -> float:
|
||||
change: float | None = None,
|
||||
absolute: float | None = None) -> float:
|
||||
"""(internal)"""
|
||||
return float()
|
||||
|
||||
|
||||
def widget(edit: ba.Widget = None,
|
||||
up_widget: ba.Widget = None,
|
||||
down_widget: ba.Widget = None,
|
||||
left_widget: ba.Widget = None,
|
||||
right_widget: ba.Widget = None,
|
||||
show_buffer_top: float = None,
|
||||
show_buffer_bottom: float = None,
|
||||
show_buffer_left: float = None,
|
||||
show_buffer_right: float = None,
|
||||
autoselect: bool = None) -> None:
|
||||
def widget(edit: ba.Widget | None = None,
|
||||
up_widget: ba.Widget | None = None,
|
||||
down_widget: ba.Widget | None = None,
|
||||
left_widget: ba.Widget | None = None,
|
||||
right_widget: ba.Widget | None = None,
|
||||
show_buffer_top: float | None = None,
|
||||
show_buffer_bottom: float | None = None,
|
||||
show_buffer_left: float | None = None,
|
||||
show_buffer_right: float | None = None,
|
||||
autoselect: bool | None = None) -> None:
|
||||
"""Edit common attributes of any widget.
|
||||
|
||||
Category: **User Interface Functions**
|
||||
|
||||
@ -74,7 +74,7 @@ class AccountV1Subsystem:
|
||||
|
||||
def get_league_rank_points(self,
|
||||
data: dict[str, Any] | None,
|
||||
subset: str = None) -> int:
|
||||
subset: str | None = None) -> int:
|
||||
"""(internal)"""
|
||||
if data is None:
|
||||
return 0
|
||||
|
||||
@ -610,8 +610,8 @@ class Achievement:
|
||||
x: float,
|
||||
y: float,
|
||||
delay: float,
|
||||
outdelay: float = None,
|
||||
color: Sequence[float] = None,
|
||||
outdelay: float | None = None,
|
||||
color: Sequence[float] | None = None,
|
||||
style: str = 'post_game') -> list[ba.Actor]:
|
||||
"""Create a display for the Achievement.
|
||||
|
||||
|
||||
@ -53,14 +53,15 @@ class AdsSubsystem:
|
||||
|
||||
def show_ad(self,
|
||||
purpose: str,
|
||||
on_completion_call: Callable[[], Any] = None) -> None:
|
||||
on_completion_call: Callable[[], Any] | None = None) -> None:
|
||||
"""(internal)"""
|
||||
self.last_ad_purpose = purpose
|
||||
_ba.show_ad(purpose, on_completion_call)
|
||||
|
||||
def show_ad_2(self,
|
||||
purpose: str,
|
||||
on_completion_call: Callable[[bool], Any] = None) -> None:
|
||||
def show_ad_2(
|
||||
self,
|
||||
purpose: str,
|
||||
on_completion_call: Callable[[bool], Any] | None = None) -> None:
|
||||
"""(internal)"""
|
||||
self.last_ad_purpose = purpose
|
||||
_ba.show_ad_2(purpose, on_completion_call)
|
||||
|
||||
@ -577,7 +577,7 @@ class App:
|
||||
def launch_coop_game(self,
|
||||
game: str,
|
||||
force: bool = False,
|
||||
args: dict = None) -> bool:
|
||||
args: dict | None = None) -> bool:
|
||||
"""High level way to launch a local co-op session."""
|
||||
# pylint: disable=cyclic-import
|
||||
from ba._campaign import getcampaign
|
||||
|
||||
@ -177,9 +177,10 @@ def garbage_collect() -> None:
|
||||
gc.collect()
|
||||
|
||||
|
||||
def print_live_object_warnings(when: Any,
|
||||
ignore_session: ba.Session = None,
|
||||
ignore_activity: ba.Activity = None) -> None:
|
||||
def print_live_object_warnings(
|
||||
when: Any,
|
||||
ignore_session: ba.Session | None = None,
|
||||
ignore_activity: ba.Activity | None = None) -> None:
|
||||
"""Print warnings for remaining objects in the current context."""
|
||||
# pylint: disable=cyclic-import
|
||||
from ba._session import Session
|
||||
|
||||
@ -177,7 +177,7 @@ class CoopGameActivity(GameActivity[PlayerType, TeamType]):
|
||||
def spawn_player_spaz(self,
|
||||
player: PlayerType,
|
||||
position: Sequence[float] = (0.0, 0.0, 0.0),
|
||||
angle: float = None) -> PlayerSpaz:
|
||||
angle: float | None = None) -> PlayerSpaz:
|
||||
"""Spawn and wire up a standard player spaz."""
|
||||
spaz = super().spawn_player_spaz(player, position, angle)
|
||||
|
||||
|
||||
@ -841,7 +841,7 @@ class GameActivity(Activity[PlayerType, TeamType]):
|
||||
def spawn_player_spaz(self,
|
||||
player: PlayerType,
|
||||
position: Sequence[float] = (0, 0, 0),
|
||||
angle: float = None) -> PlayerSpaz:
|
||||
angle: float | None = None) -> PlayerSpaz:
|
||||
"""Create and wire up a ba.PlayerSpaz for the provided ba.Player."""
|
||||
# pylint: disable=too-many-locals
|
||||
# pylint: disable=cyclic-import
|
||||
|
||||
@ -360,7 +360,7 @@ def _verify_object_death(wref: weakref.ref) -> None:
|
||||
print_active_refs(obj)
|
||||
|
||||
|
||||
def storagename(suffix: str = None) -> str:
|
||||
def storagename(suffix: str | None = None) -> str:
|
||||
"""Generate a unique name for storing class data in shared places.
|
||||
|
||||
Category: **General Utility Functions**
|
||||
|
||||
@ -240,7 +240,7 @@ class LanguageSubsystem:
|
||||
|
||||
def get_resource(self,
|
||||
resource: str,
|
||||
fallback_resource: str = None,
|
||||
fallback_resource: str | None = None,
|
||||
fallback_value: Any = None) -> Any:
|
||||
"""Return a translation resource by name.
|
||||
|
||||
|
||||
@ -25,7 +25,7 @@ class Level:
|
||||
gametype: type[ba.GameActivity],
|
||||
settings: dict,
|
||||
preview_texture_name: str,
|
||||
displayname: str = None):
|
||||
displayname: str | None = None):
|
||||
self._name = name
|
||||
self._gametype = gametype
|
||||
self._settings = settings
|
||||
|
||||
@ -384,7 +384,8 @@ class Map(Actor):
|
||||
assert farthestpt is not None
|
||||
return tuple(farthestpt)
|
||||
|
||||
def get_flag_position(self, team_index: int = None) -> Sequence[float]:
|
||||
def get_flag_position(self,
|
||||
team_index: int | None = None) -> Sequence[float]:
|
||||
"""Return a flag position on the map for the given team index.
|
||||
|
||||
Pass None to get the default flag point.
|
||||
|
||||
@ -236,17 +236,17 @@ class HitMessage:
|
||||
"""
|
||||
|
||||
def __init__(self,
|
||||
srcnode: ba.Node = None,
|
||||
pos: Sequence[float] = None,
|
||||
velocity: Sequence[float] = None,
|
||||
srcnode: ba.Node | None = None,
|
||||
pos: Sequence[float] | None = None,
|
||||
velocity: Sequence[float] | None = None,
|
||||
magnitude: float = 1.0,
|
||||
velocity_magnitude: float = 0.0,
|
||||
radius: float = 1.0,
|
||||
source_player: ba.Player = None,
|
||||
source_player: ba.Player | None = None,
|
||||
kick_back: float = 1.0,
|
||||
flat_damage: float = None,
|
||||
flat_damage: float | None = None,
|
||||
hit_type: str = 'generic',
|
||||
force_direction: Sequence[float] = None,
|
||||
force_direction: Sequence[float] | None = None,
|
||||
hit_subtype: str = 'default'):
|
||||
"""Instantiate a message with given values."""
|
||||
|
||||
|
||||
@ -273,7 +273,7 @@ class MusicSubsystem:
|
||||
musictype: MusicType | str | None,
|
||||
continuous: bool = False,
|
||||
mode: MusicPlayMode = MusicPlayMode.REGULAR,
|
||||
testsoundtrack: dict[str, Any] = None) -> None:
|
||||
testsoundtrack: dict[str, Any] | None = None) -> None:
|
||||
"""Plays the requested music type/mode.
|
||||
|
||||
For most cases, setmusic() is the proper call to use, which itself
|
||||
|
||||
@ -50,7 +50,7 @@ def get_player_profile_icon(profilename: str) -> str:
|
||||
|
||||
def get_player_profile_colors(
|
||||
profilename: str | None,
|
||||
profiles: dict[str, dict[str, Any]] = None
|
||||
profiles: dict[str, dict[str, Any]] | None = None
|
||||
) -> tuple[tuple[float, float, float], tuple[float, float, float]]:
|
||||
"""Given a profile, return colors for them."""
|
||||
appconfig = _ba.app.config
|
||||
|
||||
@ -72,8 +72,8 @@ class Session:
|
||||
|
||||
def __init__(self,
|
||||
depsets: Sequence[ba.DependencySet],
|
||||
team_names: Sequence[str] = None,
|
||||
team_colors: Sequence[Sequence[float]] = None,
|
||||
team_names: Sequence[str] | None = None,
|
||||
team_colors: Sequence[Sequence[float]] | None = None,
|
||||
min_players: int = 1,
|
||||
max_players: int = 8):
|
||||
"""Instantiate a session.
|
||||
|
||||
@ -314,11 +314,11 @@ class Stats:
|
||||
def player_scored(self,
|
||||
player: ba.Player,
|
||||
base_points: int = 1,
|
||||
target: Sequence[float] = None,
|
||||
target: Sequence[float] | None = None,
|
||||
kill: bool = False,
|
||||
victim_player: ba.Player = None,
|
||||
victim_player: ba.Player | None = None,
|
||||
scale: float = 1.0,
|
||||
color: Sequence[float] = None,
|
||||
color: Sequence[float] | None = None,
|
||||
title: str | ba.Lstr | None = None,
|
||||
screenmessage: bool = True,
|
||||
display: bool = True,
|
||||
@ -422,7 +422,7 @@ class Stats:
|
||||
def player_was_killed(self,
|
||||
player: ba.Player,
|
||||
killed: bool = False,
|
||||
killer: ba.Player = None) -> None:
|
||||
killer: ba.Player | None = None) -> None:
|
||||
"""Should be called when a player is killed."""
|
||||
from ba._language import Lstr
|
||||
name = player.getname()
|
||||
|
||||
@ -398,7 +398,7 @@ def get_clean_price(price_string: str) -> str:
|
||||
return psubs.get(price_string, price_string)
|
||||
|
||||
|
||||
def get_available_purchase_count(tab: str = None) -> int:
|
||||
def get_available_purchase_count(tab: str | None = None) -> int:
|
||||
"""(internal)"""
|
||||
try:
|
||||
if _ba.get_v1_account_state() != 'signed_in':
|
||||
|
||||
@ -91,8 +91,8 @@ class TeamGameActivity(GameActivity[PlayerType, TeamType]):
|
||||
|
||||
def spawn_player_spaz(self,
|
||||
player: PlayerType,
|
||||
position: Sequence[float] = None,
|
||||
angle: float = None) -> PlayerSpaz:
|
||||
position: Sequence[float] | None = None,
|
||||
angle: float | None = None) -> PlayerSpaz:
|
||||
"""
|
||||
Method override; spawns and wires up a standard ba.PlayerSpaz for
|
||||
a ba.Player.
|
||||
|
||||
@ -144,7 +144,7 @@ class UISubsystem:
|
||||
_ba.timer(1.0, _delay_kill, timetype=TimeType.REAL)
|
||||
self._main_menu_window = window
|
||||
|
||||
def clear_main_menu_window(self, transition: str = None) -> None:
|
||||
def clear_main_menu_window(self, transition: str | None = None) -> None:
|
||||
"""Clear any existing 'main' window with the provided transition."""
|
||||
if self._main_menu_window:
|
||||
if transition is not None:
|
||||
|
||||
@ -327,7 +327,7 @@ class Blast(ba.Actor):
|
||||
velocity: Sequence[float] = (0.0, 0.0, 0.0),
|
||||
blast_radius: float = 2.0,
|
||||
blast_type: str = 'normal',
|
||||
source_player: ba.Player = None,
|
||||
source_player: ba.Player | None = None,
|
||||
hit_type: str = 'explosion',
|
||||
hit_subtype: str = 'normal'):
|
||||
"""Instantiate with given values."""
|
||||
@ -657,8 +657,8 @@ class Bomb(ba.Actor):
|
||||
bomb_type: str = 'normal',
|
||||
blast_radius: float = 2.0,
|
||||
bomb_scale: float = 1.0,
|
||||
source_player: ba.Player = None,
|
||||
owner: ba.Node = None):
|
||||
source_player: ba.Player | None = None,
|
||||
owner: ba.Node | None = None):
|
||||
"""Create a new Bomb.
|
||||
|
||||
bomb_type can be 'ice','impact','land_mine','normal','sticky', or
|
||||
|
||||
@ -27,7 +27,7 @@ class ControlsGuide(ba.Actor):
|
||||
position: tuple[float, float] = (390.0, 120.0),
|
||||
scale: float = 1.0,
|
||||
delay: float = 0.0,
|
||||
lifespan: float = None,
|
||||
lifespan: float | None = None,
|
||||
bright: bool = False):
|
||||
"""Instantiate an overlay.
|
||||
|
||||
|
||||
@ -167,9 +167,9 @@ class Flag(ba.Actor):
|
||||
def __init__(self,
|
||||
position: Sequence[float] = (0.0, 1.0, 0.0),
|
||||
color: Sequence[float] = (1.0, 1.0, 1.0),
|
||||
materials: Sequence[ba.Material] = None,
|
||||
materials: Sequence[ba.Material] | None = None,
|
||||
touchable: bool = True,
|
||||
dropped_timeout: int = None):
|
||||
dropped_timeout: int | None = None):
|
||||
"""Instantiate a flag.
|
||||
|
||||
If 'touchable' is False, the flag will only touch terrain;
|
||||
|
||||
@ -40,9 +40,9 @@ class Image(ba.Actor):
|
||||
attach: Attach = Attach.CENTER,
|
||||
color: Sequence[float] = (1.0, 1.0, 1.0, 1.0),
|
||||
scale: tuple[float, float] = (100.0, 100.0),
|
||||
transition_out_delay: float = None,
|
||||
model_opaque: ba.Model = None,
|
||||
model_transparent: ba.Model = None,
|
||||
transition_out_delay: float | None = None,
|
||||
model_opaque: ba.Model | None = None,
|
||||
model_transparent: ba.Model | None = None,
|
||||
vr_depth: float = 0.0,
|
||||
host_only: bool = False,
|
||||
front: bool = False):
|
||||
|
||||
@ -20,7 +20,9 @@ class OnScreenCountdown(ba.Actor):
|
||||
Useful for time-based games that count down to zero.
|
||||
"""
|
||||
|
||||
def __init__(self, duration: int, endcall: Callable[[], Any] = None):
|
||||
def __init__(self,
|
||||
duration: int,
|
||||
endcall: Callable[[], Any] | None = None):
|
||||
"""Duration is provided in seconds."""
|
||||
super().__init__()
|
||||
self._timeremaining = duration
|
||||
@ -73,7 +75,7 @@ class OnScreenCountdown(ba.Actor):
|
||||
# Release callbacks/refs.
|
||||
self._endcall = None
|
||||
|
||||
def _update(self, forcevalue: int = None) -> None:
|
||||
def _update(self, forcevalue: int | None = None) -> None:
|
||||
if forcevalue is not None:
|
||||
tval = forcevalue
|
||||
else:
|
||||
|
||||
@ -137,8 +137,8 @@ class PowerupBoxFactory:
|
||||
self._powerupdist.append(powerup)
|
||||
|
||||
def get_random_powerup_type(self,
|
||||
forcetype: str = None,
|
||||
excludetypes: list[str] = None) -> str:
|
||||
forcetype: str | None = None,
|
||||
excludetypes: list[str] | None = None) -> str:
|
||||
"""Returns a random powerup type (string).
|
||||
|
||||
See ba.Powerup.poweruptype for available type values.
|
||||
|
||||
@ -241,7 +241,7 @@ class _Entry:
|
||||
|
||||
def set_value(self,
|
||||
score: float,
|
||||
max_score: float = None,
|
||||
max_score: float | None = None,
|
||||
countdown: bool = False,
|
||||
flash: bool = True,
|
||||
show_value: bool = True) -> None:
|
||||
@ -327,7 +327,7 @@ class Scoreboard:
|
||||
|
||||
_ENTRYSTORENAME = ba.storagename('entry')
|
||||
|
||||
def __init__(self, label: ba.Lstr = None, score_split: float = 0.7):
|
||||
def __init__(self, label: ba.Lstr | None = None, score_split: float = 0.7):
|
||||
"""Instantiate a scoreboard.
|
||||
|
||||
Label can be something like 'points' and will
|
||||
@ -356,7 +356,7 @@ class Scoreboard:
|
||||
def set_team_value(self,
|
||||
team: ba.Team,
|
||||
score: float,
|
||||
max_score: float = None,
|
||||
max_score: float | None = None,
|
||||
countdown: bool = False,
|
||||
flash: bool = True,
|
||||
show_value: bool = True) -> None:
|
||||
|
||||
@ -54,7 +54,7 @@ class Spawner:
|
||||
pt: Sequence[float] = (0, 0, 0), # pylint: disable=invalid-name
|
||||
spawn_time: float = 1.0,
|
||||
send_spawn_message: bool = True,
|
||||
spawn_callback: Callable[[], Any] = None):
|
||||
spawn_callback: Callable[[], Any] | None = None):
|
||||
"""Instantiate a Spawner.
|
||||
|
||||
Requires some custom data, a position,
|
||||
|
||||
@ -67,7 +67,7 @@ class Spaz(ba.Actor):
|
||||
color: Sequence[float] = (1.0, 1.0, 1.0),
|
||||
highlight: Sequence[float] = (0.5, 0.5, 0.5),
|
||||
character: str = 'Spaz',
|
||||
source_player: ba.Player = None,
|
||||
source_player: ba.Player | None = None,
|
||||
start_invincible: bool = True,
|
||||
can_accept_powerups: bool = True,
|
||||
powerups_expire: bool = False,
|
||||
@ -1266,7 +1266,7 @@ class Spaz(ba.Actor):
|
||||
else:
|
||||
self.node.counter_text = ''
|
||||
|
||||
def curse_explode(self, source_player: ba.Player = None) -> None:
|
||||
def curse_explode(self, source_player: ba.Player | None = None) -> None:
|
||||
"""Explode the poor spaz spectacularly."""
|
||||
if self._cursed and self.node:
|
||||
self.shatter(extreme=True)
|
||||
|
||||
@ -888,11 +888,12 @@ class SpazBotSet:
|
||||
def __del__(self) -> None:
|
||||
self.clear()
|
||||
|
||||
def spawn_bot(self,
|
||||
bot_type: type[SpazBot],
|
||||
pos: Sequence[float],
|
||||
spawn_time: float = 3.0,
|
||||
on_spawn_call: Callable[[SpazBot], Any] = None) -> None:
|
||||
def spawn_bot(
|
||||
self,
|
||||
bot_type: type[SpazBot],
|
||||
pos: Sequence[float],
|
||||
spawn_time: float = 3.0,
|
||||
on_spawn_call: Callable[[SpazBot], Any] | None = None) -> None:
|
||||
"""Spawn a bot from this set."""
|
||||
from bastd.actor import spawner
|
||||
spawner.Spawner(pt=pos,
|
||||
|
||||
@ -60,8 +60,8 @@ class Text(ba.Actor):
|
||||
v_attach: VAttach = VAttach.CENTER,
|
||||
h_attach: HAttach = HAttach.CENTER,
|
||||
scale: float = 1.0,
|
||||
transition_out_delay: float = None,
|
||||
maxwidth: float = None,
|
||||
transition_out_delay: float | None = None,
|
||||
maxwidth: float | None = None,
|
||||
shadow: float = 0.5,
|
||||
flatness: float = 0.0,
|
||||
vr_depth: float = 0.0,
|
||||
|
||||
@ -24,9 +24,9 @@ class ZoomText(ba.Actor):
|
||||
def __init__(self,
|
||||
text: str | ba.Lstr,
|
||||
position: tuple[float, float] = (0.0, 0.0),
|
||||
shiftposition: tuple[float, float] = None,
|
||||
shiftdelay: float = None,
|
||||
lifespan: float = None,
|
||||
shiftposition: tuple[float, float] | None = None,
|
||||
shiftdelay: float | None = None,
|
||||
lifespan: float | None = None,
|
||||
flash: bool = True,
|
||||
trail: bool = True,
|
||||
h_align: str = 'center',
|
||||
@ -36,7 +36,7 @@ class ZoomText(ba.Actor):
|
||||
scale: float = 1.0,
|
||||
project_scale: float = 1.0,
|
||||
tilt_translate: float = 0.0,
|
||||
maxwidth: float = None):
|
||||
maxwidth: float | None = None):
|
||||
# pylint: disable=too-many-locals
|
||||
super().__init__()
|
||||
self._dying = False
|
||||
|
||||
@ -492,8 +492,8 @@ class CaptureTheFlagGame(ba.TeamGameActivity[Player, Team]):
|
||||
|
||||
def spawn_player_spaz(self,
|
||||
player: Player,
|
||||
position: Sequence[float] = None,
|
||||
angle: float = None) -> PlayerSpaz:
|
||||
position: Sequence[float] | None = None,
|
||||
angle: float | None = None) -> PlayerSpaz:
|
||||
"""Intercept new spazzes and add our team material for them."""
|
||||
spaz = super().spawn_player_spaz(player, position, angle)
|
||||
player = spaz.getplayer(Player, True)
|
||||
|
||||
@ -596,7 +596,9 @@ class FootballCoopGame(ba.CoopGameActivity[Player, Team]):
|
||||
if closest_bot is not None:
|
||||
closest_bot.target_flag = self._flag
|
||||
|
||||
def _drop_powerup(self, index: int, poweruptype: str = None) -> None:
|
||||
def _drop_powerup(self,
|
||||
index: int,
|
||||
poweruptype: str | None = None) -> None:
|
||||
if poweruptype is None:
|
||||
poweruptype = (PowerupBoxFactory.get().get_random_powerup_type(
|
||||
excludetypes=self._exclude_powerups))
|
||||
@ -610,7 +612,7 @@ class FootballCoopGame(ba.CoopGameActivity[Player, Team]):
|
||||
|
||||
def _drop_powerups(self,
|
||||
standard_points: bool = False,
|
||||
poweruptype: str = None) -> None:
|
||||
poweruptype: str | None = None) -> None:
|
||||
"""Generic powerup drop."""
|
||||
if standard_points:
|
||||
spawnpoints = self.map.powerup_spawn_points
|
||||
|
||||
@ -690,7 +690,9 @@ class OnslaughtGame(ba.CoopGameActivity[Player, Team]):
|
||||
del player, bomb # Unused.
|
||||
self._player_has_dropped_bomb = True
|
||||
|
||||
def _drop_powerup(self, index: int, poweruptype: str = None) -> None:
|
||||
def _drop_powerup(self,
|
||||
index: int,
|
||||
poweruptype: str | None = None) -> None:
|
||||
poweruptype = (PowerupBoxFactory.get().get_random_powerup_type(
|
||||
forcetype=poweruptype, excludetypes=self._excluded_powerups))
|
||||
PowerupBox(position=self.map.powerup_spawn_points[index],
|
||||
@ -703,7 +705,7 @@ class OnslaughtGame(ba.CoopGameActivity[Player, Team]):
|
||||
|
||||
def _drop_powerups(self,
|
||||
standard_points: bool = False,
|
||||
poweruptype: str = None) -> None:
|
||||
poweruptype: str | None = None) -> None:
|
||||
"""Generic powerup drop."""
|
||||
if standard_points:
|
||||
points = self.map.powerup_spawn_points
|
||||
|
||||
@ -497,7 +497,9 @@ class RunaroundGame(ba.CoopGameActivity[Player, Team]):
|
||||
del player # Unused.
|
||||
self._player_has_picked_up_powerup = True
|
||||
|
||||
def _drop_powerup(self, index: int, poweruptype: str = None) -> None:
|
||||
def _drop_powerup(self,
|
||||
index: int,
|
||||
poweruptype: str | None = None) -> None:
|
||||
if poweruptype is None:
|
||||
poweruptype = (PowerupBoxFactory.get().get_random_powerup_type(
|
||||
excludetypes=self._exclude_powerups))
|
||||
@ -509,7 +511,7 @@ class RunaroundGame(ba.CoopGameActivity[Player, Team]):
|
||||
|
||||
def _drop_powerups(self,
|
||||
standard_points: bool = False,
|
||||
force_first: str = None) -> None:
|
||||
force_first: str | None = None) -> None:
|
||||
"""Generic powerup drop."""
|
||||
|
||||
# If its been a minute since our last wave finished emerging, stop
|
||||
|
||||
@ -132,7 +132,9 @@ class TheLastStandGame(ba.CoopGameActivity[Player, Team]):
|
||||
self._bot_update_timer = ba.Timer(self._bot_update_interval,
|
||||
ba.WeakCall(self._update_bots))
|
||||
|
||||
def _drop_powerup(self, index: int, poweruptype: str = None) -> None:
|
||||
def _drop_powerup(self,
|
||||
index: int,
|
||||
poweruptype: str | None = None) -> None:
|
||||
if poweruptype is None:
|
||||
poweruptype = (PowerupBoxFactory.get().get_random_powerup_type(
|
||||
excludetypes=self._excludepowerups))
|
||||
@ -146,7 +148,7 @@ class TheLastStandGame(ba.CoopGameActivity[Player, Team]):
|
||||
|
||||
def _drop_powerups(self,
|
||||
standard_points: bool = False,
|
||||
force_first: str = None) -> None:
|
||||
force_first: str | None = None) -> None:
|
||||
"""Generic powerup drop."""
|
||||
from bastd.actor import powerupbox
|
||||
if standard_points:
|
||||
|
||||
@ -767,7 +767,7 @@ class MainMenuActivity(ba.Activity[ba.Player, ba.Team]):
|
||||
y: float,
|
||||
scale: float,
|
||||
delay: float,
|
||||
custom_texture: str = None,
|
||||
custom_texture: str | None = None,
|
||||
jitter_scale: float = 1.0,
|
||||
rotate: float = 0.0,
|
||||
vr_depth_offset: float = 0.0) -> None:
|
||||
|
||||
@ -178,7 +178,7 @@ class Team(ba.Team[Player]):
|
||||
|
||||
class TutorialActivity(ba.Activity[Player, Team]):
|
||||
|
||||
def __init__(self, settings: dict = None):
|
||||
def __init__(self, settings: dict | None = None):
|
||||
from bastd.maps import Rampage
|
||||
if settings is None:
|
||||
settings = {}
|
||||
@ -492,7 +492,7 @@ class TutorialActivity(ba.Activity[Player, Team]):
|
||||
position: Sequence[float],
|
||||
color: Sequence[float] = (1.0, 1.0, 1.0),
|
||||
make_current: bool = False,
|
||||
relative_to: int = None,
|
||||
relative_to: int | None = None,
|
||||
name: str | ba.Lstr = '',
|
||||
flash: bool = True,
|
||||
angle: float = 0.0):
|
||||
@ -550,7 +550,7 @@ class TutorialActivity(ba.Activity[Player, Team]):
|
||||
position: Sequence[float],
|
||||
color: Sequence[float] = (1.0, 1.0, 1.0),
|
||||
make_current: bool = False,
|
||||
relative_to: int = None):
|
||||
relative_to: int | None = None):
|
||||
self._position = position
|
||||
self._relative_to = relative_to
|
||||
|
||||
@ -761,7 +761,7 @@ class TutorialActivity(ba.Activity[Player, Team]):
|
||||
|
||||
class PrintPos:
|
||||
|
||||
def __init__(self, spaz_num: int = None):
|
||||
def __init__(self, spaz_num: int | None = None):
|
||||
self._spaz_num = spaz_num
|
||||
|
||||
def run(self, a: TutorialActivity) -> None:
|
||||
@ -787,7 +787,7 @@ class TutorialActivity(ba.Activity[Player, Team]):
|
||||
|
||||
def __init__(self,
|
||||
celebrate_type: str = 'both',
|
||||
spaz_num: int = None,
|
||||
spaz_num: int | None = None,
|
||||
duration: int = 1000):
|
||||
self._spaz_num = spaz_num
|
||||
self._celebrate_type = celebrate_type
|
||||
|
||||
@ -8,7 +8,7 @@ import _ba
|
||||
import ba
|
||||
|
||||
|
||||
def show_sign_in_prompt(account_type: str = None) -> None:
|
||||
def show_sign_in_prompt(account_type: str | None = None) -> None:
|
||||
"""Bring up a prompt telling the user they must sign in."""
|
||||
from bastd.ui.confirm import ConfirmWindow
|
||||
from bastd.ui.account import settings
|
||||
|
||||
@ -18,7 +18,7 @@ if TYPE_CHECKING:
|
||||
class AccountLinkWindow(ba.Window):
|
||||
"""Window for linking accounts."""
|
||||
|
||||
def __init__(self, origin_widget: ba.Widget = None):
|
||||
def __init__(self, origin_widget: ba.Widget | None = None):
|
||||
scale_origin: tuple[float, float] | None
|
||||
if origin_widget is not None:
|
||||
self._transition_out = 'out_scale'
|
||||
|
||||
@ -21,7 +21,7 @@ class AccountSettingsWindow(ba.Window):
|
||||
def __init__(self,
|
||||
transition: str = 'in_right',
|
||||
modal: bool = False,
|
||||
origin_widget: ba.Widget = None,
|
||||
origin_widget: ba.Widget | None = None,
|
||||
close_once_signed_in: bool = False):
|
||||
# pylint: disable=too-many-statements
|
||||
|
||||
|
||||
@ -17,7 +17,7 @@ if TYPE_CHECKING:
|
||||
class AccountUnlinkWindow(ba.Window):
|
||||
"""A window to kick off account unlinks."""
|
||||
|
||||
def __init__(self, origin_widget: ba.Widget = None):
|
||||
def __init__(self, origin_widget: ba.Widget | None = None):
|
||||
scale_origin: tuple[float, float] | None
|
||||
if origin_widget is not None:
|
||||
self._transition_out = 'out_scale'
|
||||
|
||||
@ -19,9 +19,9 @@ class AccountViewerWindow(popup.PopupWindow):
|
||||
|
||||
def __init__(self,
|
||||
account_id: str,
|
||||
profile_id: str = None,
|
||||
profile_id: str | None = None,
|
||||
position: tuple[float, float] = (0.0, 0.0),
|
||||
scale: float = None,
|
||||
scale: float | None = None,
|
||||
offset: tuple[float, float] = (0.0, 0.0)):
|
||||
from ba.internal import is_browser_likely_available, master_server_get
|
||||
|
||||
|
||||
@ -16,7 +16,9 @@ if TYPE_CHECKING:
|
||||
class AchievementsWindow(popup.PopupWindow):
|
||||
"""Popup window to view achievements."""
|
||||
|
||||
def __init__(self, position: tuple[float, float], scale: float = None):
|
||||
def __init__(self,
|
||||
position: tuple[float, float],
|
||||
scale: float | None = None):
|
||||
# pylint: disable=too-many-locals
|
||||
uiscale = ba.app.ui.uiscale
|
||||
if scale is None:
|
||||
|
||||
@ -22,11 +22,11 @@ class CharacterPicker(popup.PopupWindow):
|
||||
parent: ba.Widget,
|
||||
position: tuple[float, float] = (0.0, 0.0),
|
||||
delegate: Any = None,
|
||||
scale: float = None,
|
||||
scale: float | None = None,
|
||||
offset: tuple[float, float] = (0.0, 0.0),
|
||||
tint_color: Sequence[float] = (1.0, 1.0, 1.0),
|
||||
tint2_color: Sequence[float] = (1.0, 1.0, 1.0),
|
||||
selected_character: str = None):
|
||||
selected_character: str | None = None):
|
||||
# pylint: disable=too-many-locals
|
||||
from bastd.actor import spazappearance
|
||||
del parent # unused here
|
||||
|
||||
@ -24,7 +24,7 @@ class ColorPicker(PopupWindow):
|
||||
position: tuple[float, float],
|
||||
initial_color: Sequence[float] = (1.0, 1.0, 1.0),
|
||||
delegate: Any = None,
|
||||
scale: float = None,
|
||||
scale: float | None = None,
|
||||
offset: tuple[float, float] = (0.0, 0.0),
|
||||
tag: Any = ''):
|
||||
# pylint: disable=too-many-locals
|
||||
@ -162,7 +162,7 @@ class ColorPickerExact(PopupWindow):
|
||||
position: tuple[float, float],
|
||||
initial_color: Sequence[float] = (1.0, 1.0, 1.0),
|
||||
delegate: Any = None,
|
||||
scale: float = None,
|
||||
scale: float | None = None,
|
||||
offset: tuple[float, float] = (0.0, 0.0),
|
||||
tag: Any = ''):
|
||||
# pylint: disable=too-many-locals
|
||||
|
||||
@ -28,10 +28,10 @@ class ConfigCheckBox:
|
||||
position: tuple[float, float],
|
||||
size: tuple[float, float],
|
||||
displayname: str | ba.Lstr | None = None,
|
||||
scale: float = None,
|
||||
maxwidth: float = None,
|
||||
scale: float | None = None,
|
||||
maxwidth: float | None = None,
|
||||
autoselect: bool = True,
|
||||
value_change_call: Callable[[Any], Any] = None):
|
||||
value_change_call: Callable[[Any], Any] | None = None):
|
||||
if displayname is None:
|
||||
displayname = configkey
|
||||
self._value_change_call = value_change_call
|
||||
@ -84,7 +84,7 @@ class ConfigNumberEdit:
|
||||
minval: float = 0.0,
|
||||
maxval: float = 100.0,
|
||||
increment: float = 1.0,
|
||||
callback: Callable[[float], Any] = None,
|
||||
callback: Callable[[float], Any] | None = None,
|
||||
xoffset: float = 0.0,
|
||||
displayname: str | ba.Lstr | None = None,
|
||||
changesound: bool = True,
|
||||
|
||||
@ -18,7 +18,7 @@ class ConfirmWindow:
|
||||
|
||||
def __init__(self,
|
||||
text: str | ba.Lstr = 'Are you sure?',
|
||||
action: Callable[[], Any] = None,
|
||||
action: Callable[[], Any] | None = None,
|
||||
width: float = 360.0,
|
||||
height: float = 100.0,
|
||||
cancel_button: bool = True,
|
||||
@ -27,7 +27,7 @@ class ConfirmWindow:
|
||||
text_scale: float = 1.0,
|
||||
ok_text: str | ba.Lstr | None = None,
|
||||
cancel_text: str | ba.Lstr | None = None,
|
||||
origin_widget: ba.Widget = None):
|
||||
origin_widget: ba.Widget | None = None):
|
||||
# pylint: disable=too-many-locals
|
||||
if ok_text is None:
|
||||
ok_text = ba.Lstr(resource='okText')
|
||||
@ -127,7 +127,7 @@ class QuitWindow:
|
||||
def __init__(self,
|
||||
swish: bool = False,
|
||||
back: bool = False,
|
||||
origin_widget: ba.Widget = None):
|
||||
origin_widget: ba.Widget | None = None):
|
||||
ui = ba.app.ui
|
||||
app = ba.app
|
||||
self._back = back
|
||||
|
||||
@ -37,7 +37,7 @@ class CoopBrowserWindow(ba.Window):
|
||||
|
||||
def __init__(self,
|
||||
transition: str | None = 'in_right',
|
||||
origin_widget: ba.Widget = None):
|
||||
origin_widget: ba.Widget | None = None):
|
||||
# pylint: disable=too-many-statements
|
||||
# pylint: disable=cyclic-import
|
||||
import threading
|
||||
@ -1415,7 +1415,7 @@ class CoopBrowserWindow(ba.Window):
|
||||
|
||||
def run(self,
|
||||
game: str | None,
|
||||
tournament_button: dict[str, Any] = None) -> None:
|
||||
tournament_button: dict[str, Any] | None = None) -> None:
|
||||
"""Run the provided game."""
|
||||
# pylint: disable=too-many-branches
|
||||
# pylint: disable=too-many-statements
|
||||
|
||||
@ -16,7 +16,7 @@ if TYPE_CHECKING:
|
||||
class CreditsListWindow(ba.Window):
|
||||
"""Window for displaying game credits."""
|
||||
|
||||
def __init__(self, origin_widget: ba.Widget = None):
|
||||
def __init__(self, origin_widget: ba.Widget | None = None):
|
||||
# pylint: disable=too-many-locals
|
||||
# pylint: disable=too-many-statements
|
||||
import json
|
||||
|
||||
@ -21,9 +21,9 @@ class FileSelectorWindow(ba.Window):
|
||||
|
||||
def __init__(self,
|
||||
path: str,
|
||||
callback: Callable[[str | None], Any] = None,
|
||||
callback: Callable[[str | None], Any] | None = None,
|
||||
show_base_path: bool = True,
|
||||
valid_file_extensions: Sequence[str] = None,
|
||||
valid_file_extensions: Sequence[str] | None = None,
|
||||
allow_folders: bool = False):
|
||||
if valid_file_extensions is None:
|
||||
valid_file_extensions = []
|
||||
|
||||
@ -68,7 +68,7 @@ class GatherWindow(ba.Window):
|
||||
|
||||
def __init__(self,
|
||||
transition: str | None = 'in_right',
|
||||
origin_widget: ba.Widget = None):
|
||||
origin_widget: ba.Widget | None = None):
|
||||
# pylint: disable=too-many-statements
|
||||
# pylint: disable=too-many-locals
|
||||
# pylint: disable=cyclic-import
|
||||
|
||||
@ -20,8 +20,8 @@ class GetCurrencyWindow(ba.Window):
|
||||
transition: str = 'in_right',
|
||||
from_modal_store: bool = False,
|
||||
modal: bool = False,
|
||||
origin_widget: ba.Widget = None,
|
||||
store_back_location: str = None):
|
||||
origin_widget: ba.Widget | None = None,
|
||||
store_back_location: str | None = None):
|
||||
# pylint: disable=too-many-statements
|
||||
# pylint: disable=too-many-locals
|
||||
|
||||
@ -105,8 +105,8 @@ class GetCurrencyWindow(ba.Window):
|
||||
position: tuple[float, float],
|
||||
size: tuple[float, float],
|
||||
label: ba.Lstr,
|
||||
price: str = None,
|
||||
tex_name: str = None,
|
||||
price: str | None = None,
|
||||
tex_name: str | None = None,
|
||||
tex_opacity: float = 1.0,
|
||||
tex_scale: float = 1.0,
|
||||
enabled: bool = True,
|
||||
|
||||
@ -18,7 +18,7 @@ class HelpWindow(ba.Window):
|
||||
|
||||
def __init__(self,
|
||||
main_menu: bool = False,
|
||||
origin_widget: ba.Widget = None):
|
||||
origin_widget: ba.Widget | None = None):
|
||||
# pylint: disable=too-many-statements
|
||||
# pylint: disable=too-many-locals
|
||||
from ba.internal import get_remote_app_name
|
||||
|
||||
@ -22,11 +22,11 @@ class IconPicker(popup.PopupWindow):
|
||||
parent: ba.Widget,
|
||||
position: tuple[float, float] = (0.0, 0.0),
|
||||
delegate: Any = None,
|
||||
scale: float = None,
|
||||
scale: float | None = None,
|
||||
offset: tuple[float, float] = (0.0, 0.0),
|
||||
tint_color: Sequence[float] = (1.0, 1.0, 1.0),
|
||||
tint2_color: Sequence[float] = (1.0, 1.0, 1.0),
|
||||
selected_icon: str = None):
|
||||
selected_icon: str | None = None):
|
||||
# pylint: disable=too-many-locals
|
||||
del parent # unused here
|
||||
del tint_color # unused_here
|
||||
|
||||
@ -21,11 +21,11 @@ class LeagueRankButton:
|
||||
position: tuple[float, float],
|
||||
size: tuple[float, float],
|
||||
scale: float,
|
||||
on_activate_call: Callable[[], Any] = None,
|
||||
transition_delay: float = None,
|
||||
color: tuple[float, float, float] = None,
|
||||
textcolor: tuple[float, float, float] = None,
|
||||
smooth_update_delay: float = None):
|
||||
on_activate_call: Callable[[], Any] | None = None,
|
||||
transition_delay: float | None = None,
|
||||
color: tuple[float, float, float] | None = None,
|
||||
textcolor: tuple[float, float, float] | None = None,
|
||||
smooth_update_delay: float | None = None):
|
||||
if on_activate_call is None:
|
||||
on_activate_call = ba.WeakCall(self._default_on_activate_call)
|
||||
self._on_activate_call = on_activate_call
|
||||
|
||||
@ -21,7 +21,7 @@ class LeagueRankWindow(ba.Window):
|
||||
def __init__(self,
|
||||
transition: str = 'in_right',
|
||||
modal: bool = False,
|
||||
origin_widget: ba.Widget = None):
|
||||
origin_widget: ba.Widget | None = None):
|
||||
ba.set_analytics_screen('League Rank Window')
|
||||
|
||||
self._league_rank_data: dict[str, Any] | None = None
|
||||
|
||||
@ -18,7 +18,7 @@ class PlayWindow(ba.Window):
|
||||
|
||||
def __init__(self,
|
||||
transition: str = 'in_right',
|
||||
origin_widget: ba.Widget = None):
|
||||
origin_widget: ba.Widget | None = None):
|
||||
# pylint: disable=too-many-statements
|
||||
# pylint: disable=too-many-locals
|
||||
import threading
|
||||
|
||||
@ -21,7 +21,7 @@ class PlaylistBrowserWindow(ba.Window):
|
||||
def __init__(self,
|
||||
sessiontype: type[ba.Session],
|
||||
transition: str | None = 'in_right',
|
||||
origin_widget: ba.Widget = None):
|
||||
origin_widget: ba.Widget | None = None):
|
||||
# pylint: disable=too-many-statements
|
||||
# pylint: disable=cyclic-import
|
||||
from bastd.ui.playlist import PlaylistTypeVars
|
||||
|
||||
@ -21,8 +21,8 @@ class PlaylistCustomizeBrowserWindow(ba.Window):
|
||||
def __init__(self,
|
||||
sessiontype: type[ba.Session],
|
||||
transition: str = 'in_right',
|
||||
select_playlist: str = None,
|
||||
origin_widget: ba.Widget = None):
|
||||
select_playlist: str | None = None,
|
||||
origin_widget: ba.Widget | None = None):
|
||||
# Yes this needs tidying.
|
||||
# pylint: disable=too-many-locals
|
||||
# pylint: disable=too-many-statements
|
||||
@ -297,7 +297,7 @@ class PlaylistCustomizeBrowserWindow(ba.Window):
|
||||
_ba.fade_screen(False, endcall=self._run_selected_playlist)
|
||||
_ba.lock_all_input()
|
||||
|
||||
def _refresh(self, select_playlist: str = None) -> None:
|
||||
def _refresh(self, select_playlist: str | None = None) -> None:
|
||||
from efro.util import asserttype
|
||||
old_selection = self._selected_playlist_name
|
||||
|
||||
|
||||
@ -18,10 +18,10 @@ class PlaylistEditController:
|
||||
|
||||
def __init__(self,
|
||||
sessiontype: type[ba.Session],
|
||||
existing_playlist_name: str = None,
|
||||
existing_playlist_name: str | None = None,
|
||||
transition: str = 'in_right',
|
||||
playlist: list[dict[str, Any]] = None,
|
||||
playlist_name: str = None):
|
||||
playlist: list[dict[str, Any]] | None = None,
|
||||
playlist_name: str | None = None):
|
||||
from ba.internal import preload_map_preview_media, filter_playlist
|
||||
from bastd.ui.playlist import PlaylistTypeVars
|
||||
from bastd.ui.playlist.edit import PlaylistEditWindow
|
||||
|
||||
@ -23,9 +23,9 @@ class PlaylistEditGameWindow(ba.Window):
|
||||
sessiontype: type[ba.Session],
|
||||
config: dict[str, Any] | None,
|
||||
completion_call: Callable[[dict[str, Any] | None], Any],
|
||||
default_selection: str = None,
|
||||
default_selection: str | None = None,
|
||||
transition: str = 'in_right',
|
||||
edit_info: dict[str, Any] = None):
|
||||
edit_info: dict[str, Any] | None = None):
|
||||
# pylint: disable=too-many-branches
|
||||
# pylint: disable=too-many-statements
|
||||
# pylint: disable=too-many-locals
|
||||
|
||||
@ -19,8 +19,8 @@ class SharePlaylistImportWindow(promocode.PromoCodeWindow):
|
||||
"""Window for importing a shared playlist."""
|
||||
|
||||
def __init__(self,
|
||||
origin_widget: ba.Widget = None,
|
||||
on_success_callback: Callable[[], Any] = None):
|
||||
origin_widget: ba.Widget | None = None,
|
||||
on_success_callback: Callable[[], Any] | None = None):
|
||||
promocode.PromoCodeWindow.__init__(self,
|
||||
modal=True,
|
||||
origin_widget=origin_widget)
|
||||
|
||||
@ -26,7 +26,7 @@ class PopupWindow:
|
||||
offset: tuple[float, float] = (0, 0),
|
||||
bg_color: tuple[float, float, float] = (0.35, 0.55, 0.15),
|
||||
focus_position: tuple[float, float] = (0, 0),
|
||||
focus_size: tuple[float, float] = None,
|
||||
focus_size: tuple[float, float] | None = None,
|
||||
toolbar_visibility: str = 'menu_minimal_no_back'):
|
||||
# pylint: disable=too-many-locals
|
||||
if focus_size is None:
|
||||
@ -108,10 +108,10 @@ class PopupMenuWindow(PopupWindow):
|
||||
current_choice: str,
|
||||
delegate: Any = None,
|
||||
width: float = 230.0,
|
||||
maxwidth: float = None,
|
||||
maxwidth: float | None = None,
|
||||
scale: float = 1.0,
|
||||
choices_disabled: Sequence[str] = None,
|
||||
choices_display: Sequence[ba.Lstr] = None):
|
||||
choices_disabled: Sequence[str] | None = None,
|
||||
choices_display: Sequence[ba.Lstr] | None = None):
|
||||
# FIXME: Clean up a bit.
|
||||
# pylint: disable=too-many-branches
|
||||
# pylint: disable=too-many-locals
|
||||
@ -268,15 +268,15 @@ class PopupMenu:
|
||||
parent: ba.Widget,
|
||||
position: tuple[float, float],
|
||||
choices: Sequence[str],
|
||||
current_choice: str = None,
|
||||
on_value_change_call: Callable[[str], Any] = None,
|
||||
opening_call: Callable[[], Any] = None,
|
||||
closing_call: Callable[[], Any] = None,
|
||||
current_choice: str | None = None,
|
||||
on_value_change_call: Callable[[str], Any] | None = None,
|
||||
opening_call: Callable[[], Any] | None = None,
|
||||
closing_call: Callable[[], Any] | None = None,
|
||||
width: float = 230.0,
|
||||
maxwidth: float = None,
|
||||
scale: float = None,
|
||||
choices_disabled: Sequence[str] = None,
|
||||
choices_display: Sequence[ba.Lstr] = None,
|
||||
maxwidth: float | None = None,
|
||||
scale: float | None = None,
|
||||
choices_disabled: Sequence[str] | None = None,
|
||||
choices_display: Sequence[ba.Lstr] | None = None,
|
||||
button_size: tuple[float, float] = (160.0, 50.0),
|
||||
autoselect: bool = True):
|
||||
# pylint: disable=too-many-locals
|
||||
|
||||
@ -19,8 +19,8 @@ class ProfileBrowserWindow(ba.Window):
|
||||
def __init__(self,
|
||||
transition: str = 'in_right',
|
||||
in_main_menu: bool = True,
|
||||
selected_profile: str = None,
|
||||
origin_widget: ba.Widget = None):
|
||||
selected_profile: str | None = None,
|
||||
origin_widget: ba.Widget | None = None):
|
||||
# pylint: disable=too-many-statements
|
||||
# pylint: disable=too-many-locals
|
||||
self._in_main_menu = in_main_menu
|
||||
|
||||
@ -17,7 +17,9 @@ if TYPE_CHECKING:
|
||||
class PromoCodeWindow(ba.Window):
|
||||
"""Window for entering promo codes."""
|
||||
|
||||
def __init__(self, modal: bool = False, origin_widget: ba.Widget = None):
|
||||
def __init__(self,
|
||||
modal: bool = False,
|
||||
origin_widget: ba.Widget | None = None):
|
||||
|
||||
scale_origin: tuple[float, float] | None
|
||||
if origin_widget is not None:
|
||||
|
||||
@ -19,7 +19,7 @@ class PurchaseWindow(ba.Window):
|
||||
def __init__(self,
|
||||
items: list[str],
|
||||
transition: str = 'in_right',
|
||||
header_text: ba.Lstr = None):
|
||||
header_text: ba.Lstr | None = None):
|
||||
from ba.internal import get_store_item_display_size
|
||||
from bastd.ui.store import item as storeitemui
|
||||
if header_text is None:
|
||||
|
||||
@ -19,7 +19,7 @@ class AdvancedSettingsWindow(ba.Window):
|
||||
|
||||
def __init__(self,
|
||||
transition: str = 'in_right',
|
||||
origin_widget: ba.Widget = None):
|
||||
origin_widget: ba.Widget | None = None):
|
||||
# pylint: disable=too-many-statements
|
||||
from ba.internal import master_server_get
|
||||
import threading
|
||||
|
||||
@ -18,7 +18,7 @@ class AllSettingsWindow(ba.Window):
|
||||
|
||||
def __init__(self,
|
||||
transition: str = 'in_right',
|
||||
origin_widget: ba.Widget = None):
|
||||
origin_widget: ba.Widget | None = None):
|
||||
# pylint: disable=too-many-statements
|
||||
# pylint: disable=too-many-locals
|
||||
import threading
|
||||
|
||||
@ -18,7 +18,7 @@ class AudioSettingsWindow(ba.Window):
|
||||
|
||||
def __init__(self,
|
||||
transition: str = 'in_right',
|
||||
origin_widget: ba.Widget = None):
|
||||
origin_widget: ba.Widget | None = None):
|
||||
# pylint: disable=too-many-statements
|
||||
# pylint: disable=too-many-locals
|
||||
# pylint: disable=cyclic-import
|
||||
|
||||
@ -18,7 +18,7 @@ class ControlsSettingsWindow(ba.Window):
|
||||
|
||||
def __init__(self,
|
||||
transition: str = 'in_right',
|
||||
origin_widget: ba.Widget = None):
|
||||
origin_widget: ba.Widget | None = None):
|
||||
# FIXME: should tidy up here.
|
||||
# pylint: disable=too-many-statements
|
||||
# pylint: disable=too-many-branches
|
||||
|
||||
@ -21,7 +21,7 @@ class GamepadSettingsWindow(ba.Window):
|
||||
is_main_menu: bool = True,
|
||||
transition: str = 'in_right',
|
||||
transition_out: str = 'out_right',
|
||||
settings: dict = None):
|
||||
settings: dict | None = None):
|
||||
self._input = gamepad
|
||||
|
||||
# If our input-device went away, just return an empty zombie.
|
||||
@ -652,8 +652,8 @@ class GamepadSettingsWindow(ba.Window):
|
||||
texture: ba.Texture,
|
||||
button: str,
|
||||
scale: float = 1.0,
|
||||
message: ba.Lstr = None,
|
||||
message2: ba.Lstr = None,
|
||||
message: ba.Lstr | None = None,
|
||||
message2: ba.Lstr | None = None,
|
||||
maxwidth: float = 80.0) -> ba.Widget:
|
||||
if message is None:
|
||||
message = ba.Lstr(resource=self._r + '.pressAnyButtonText')
|
||||
@ -754,8 +754,8 @@ class AwaitGamepadInputWindow(ba.Window):
|
||||
button: str,
|
||||
callback: Callable[[str, dict[str, Any], AwaitGamepadInputWindow],
|
||||
Any],
|
||||
message: ba.Lstr = None,
|
||||
message2: ba.Lstr = None):
|
||||
message: ba.Lstr | None = None,
|
||||
message2: ba.Lstr | None = None):
|
||||
if message is None:
|
||||
print('AwaitGamepadInputWindow message is None!')
|
||||
# Shouldn't get here.
|
||||
|
||||
@ -404,7 +404,7 @@ class GamepadAdvancedSettingsWindow(ba.Window):
|
||||
increment: float = 1.0,
|
||||
change_sound: bool = True,
|
||||
x_offset: float = 0.0,
|
||||
displayname: ba.Lstr = None) -> tuple[ba.Widget, ba.Widget]:
|
||||
displayname: ba.Lstr | None = None) -> tuple[ba.Widget, ba.Widget]:
|
||||
|
||||
if displayname is None:
|
||||
displayname = name
|
||||
|
||||
@ -18,7 +18,7 @@ class GraphicsSettingsWindow(ba.Window):
|
||||
|
||||
def __init__(self,
|
||||
transition: str = 'in_right',
|
||||
origin_widget: ba.Widget = None):
|
||||
origin_widget: ba.Widget | None = None):
|
||||
# pylint: disable=too-many-locals
|
||||
# pylint: disable=too-many-branches
|
||||
# pylint: disable=too-many-statements
|
||||
|
||||
@ -131,7 +131,8 @@ def _run_diagnostics(weakwin: weakref.ref[NetTestingWindow]) -> None:
|
||||
|
||||
# We're running in a background thread but UI stuff needs to run
|
||||
# in the logic thread; give ourself a way to pass stuff to it.
|
||||
def _print(text: str, color: tuple[float, float, float] = None) -> None:
|
||||
def _print(text: str,
|
||||
color: tuple[float, float, float] | None = None) -> None:
|
||||
|
||||
def _print_in_logic_thread() -> None:
|
||||
win = weakwin()
|
||||
|
||||
@ -17,7 +17,7 @@ class PluginSettingsWindow(ba.Window):
|
||||
|
||||
def __init__(self,
|
||||
transition: str = 'in_right',
|
||||
origin_widget: ba.Widget = None):
|
||||
origin_widget: ba.Widget | None = None):
|
||||
# pylint: disable=too-many-locals
|
||||
app = ba.app
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ class SoundtrackBrowserWindow(ba.Window):
|
||||
|
||||
def __init__(self,
|
||||
transition: str = 'in_right',
|
||||
origin_widget: ba.Widget = None):
|
||||
origin_widget: ba.Widget | None = None):
|
||||
# pylint: disable=too-many-locals
|
||||
# pylint: disable=too-many-statements
|
||||
|
||||
@ -355,7 +355,7 @@ class SoundtrackBrowserWindow(ba.Window):
|
||||
return ba.Lstr(resource=self._r + '.defaultSoundtrackNameText')
|
||||
return ba.Lstr(value=soundtrack)
|
||||
|
||||
def _refresh(self, select_soundtrack: str = None) -> None:
|
||||
def _refresh(self, select_soundtrack: str | None = None) -> None:
|
||||
from efro.util import asserttype
|
||||
self._allow_changing_soundtracks = False
|
||||
old_selection = self._selected_soundtrack
|
||||
|
||||
@ -31,10 +31,10 @@ class StoreBrowserWindow(ba.Window):
|
||||
def __init__(self,
|
||||
transition: str = 'in_right',
|
||||
modal: bool = False,
|
||||
show_tab: StoreBrowserWindow.TabID = None,
|
||||
on_close_call: Callable[[], Any] = None,
|
||||
back_location: str = None,
|
||||
origin_widget: ba.Widget = None):
|
||||
show_tab: StoreBrowserWindow.TabID | None = None,
|
||||
on_close_call: Callable[[], Any] | None = None,
|
||||
back_location: str | None = None,
|
||||
origin_widget: ba.Widget | None = None):
|
||||
# pylint: disable=too-many-statements
|
||||
# pylint: disable=too-many-locals
|
||||
from bastd.ui.tabs import TabRow
|
||||
|
||||
@ -20,12 +20,12 @@ class StoreButton:
|
||||
position: Sequence[float],
|
||||
size: Sequence[float],
|
||||
scale: float,
|
||||
on_activate_call: Callable[[], Any] = None,
|
||||
transition_delay: float = None,
|
||||
color: Sequence[float] = None,
|
||||
textcolor: Sequence[float] = None,
|
||||
on_activate_call: Callable[[], Any] | None = None,
|
||||
transition_delay: float | None = None,
|
||||
color: Sequence[float] | None = None,
|
||||
textcolor: Sequence[float] | None = None,
|
||||
show_tickets: bool = False,
|
||||
button_type: str = None,
|
||||
button_type: str | None = None,
|
||||
sale_scale: float = 1.0):
|
||||
self._position = position
|
||||
self._size = size
|
||||
|
||||
@ -35,7 +35,7 @@ class TabRow(Generic[T]):
|
||||
tabdefs: list[tuple[T, ba.Lstr]],
|
||||
pos: tuple[float, float],
|
||||
size: tuple[float, float],
|
||||
on_select_call: Callable[[T], None] = None) -> None:
|
||||
on_select_call: Callable[[T], None] | None = None) -> None:
|
||||
if not tabdefs:
|
||||
raise ValueError('At least one tab def is required')
|
||||
self.tabs: dict[T, Tab] = {}
|
||||
|
||||
@ -19,12 +19,12 @@ class TournamentEntryWindow(popup.PopupWindow):
|
||||
|
||||
def __init__(self,
|
||||
tournament_id: str,
|
||||
tournament_activity: ba.Activity = None,
|
||||
tournament_activity: ba.Activity | None = None,
|
||||
position: tuple[float, float] = (0.0, 0.0),
|
||||
delegate: Any = None,
|
||||
scale: float = None,
|
||||
scale: float | None = None,
|
||||
offset: tuple[float, float] = (0.0, 0.0),
|
||||
on_close_call: Callable[[], Any] = None):
|
||||
on_close_call: Callable[[], Any] | None = None):
|
||||
# Needs some tidying.
|
||||
# pylint: disable=too-many-branches
|
||||
# pylint: disable=too-many-statements
|
||||
|
||||
@ -19,14 +19,14 @@ class TournamentScoresWindow(popup_ui.PopupWindow):
|
||||
|
||||
def __init__(self,
|
||||
tournament_id: str,
|
||||
tournament_activity: ba.GameActivity = None,
|
||||
tournament_activity: ba.GameActivity | None = None,
|
||||
position: tuple[float, float] = (0.0, 0.0),
|
||||
scale: float = None,
|
||||
scale: float | None = None,
|
||||
offset: tuple[float, float] = (0.0, 0.0),
|
||||
tint_color: Sequence[float] = (1.0, 1.0, 1.0),
|
||||
tint2_color: Sequence[float] = (1.0, 1.0, 1.0),
|
||||
selected_character: str = None,
|
||||
on_close_call: Callable[[], Any] = None):
|
||||
selected_character: str | None = None,
|
||||
on_close_call: Callable[[], Any] | None = None):
|
||||
|
||||
del tournament_activity # unused arg
|
||||
del tint_color # unused arg
|
||||
|
||||
@ -19,7 +19,7 @@ class TrophiesWindow(popup.PopupWindow):
|
||||
def __init__(self,
|
||||
position: tuple[float, float],
|
||||
data: dict[str, Any],
|
||||
scale: float = None):
|
||||
scale: float | None = None):
|
||||
self._data = data
|
||||
uiscale = ba.app.ui.uiscale
|
||||
if scale is None:
|
||||
|
||||
@ -25,7 +25,7 @@ class WatchWindow(ba.Window):
|
||||
|
||||
def __init__(self,
|
||||
transition: str | None = 'in_right',
|
||||
origin_widget: ba.Widget = None):
|
||||
origin_widget: ba.Widget | None = None):
|
||||
# pylint: disable=too-many-locals
|
||||
# pylint: disable=too-many-statements
|
||||
from bastd.ui.tabs import TabRow
|
||||
|
||||
@ -21,7 +21,7 @@
|
||||
namespace ballistica {
|
||||
|
||||
// These are set automatically via script; don't modify them here.
|
||||
const int kAppBuildNumber = 20617;
|
||||
const int kAppBuildNumber = 20620;
|
||||
const char* kAppVersion = "1.7.2";
|
||||
|
||||
// Our standalone globals.
|
||||
|
||||
@ -47,7 +47,7 @@ void PythonClassMaterial::SetupType(PyTypeObject* obj) {
|
||||
|
||||
// clang-format off
|
||||
obj->tp_doc =
|
||||
"Material(label: str = None)\n"
|
||||
"Material(label: str | None = None)\n"
|
||||
"\n"
|
||||
"An entity applied to game objects to modify collision behavior.\n"
|
||||
"\n"
|
||||
|
||||
@ -680,7 +680,7 @@ PyMethodDef PythonClassSessionPlayer::tp_methods[] = {
|
||||
"Returns the player's name. If icon is True, the long version of the\n"
|
||||
"name may include an icon."},
|
||||
{"setname", (PyCFunction)SetName, METH_VARARGS | METH_KEYWORDS,
|
||||
"setname(name: str, full_name: str = None, real: bool = True)\n"
|
||||
"setname(name: str, full_name: str | None = None, real: bool = True)\n"
|
||||
" -> None\n"
|
||||
"\n"
|
||||
"Set the player's name to the provided string.\n"
|
||||
|
||||
@ -996,9 +996,13 @@ auto PythonMethodsApp::GetMethods() -> std::vector<PyMethodDef> {
|
||||
{"screenmessage", (PyCFunction)PyScreenMessage,
|
||||
METH_VARARGS | METH_KEYWORDS,
|
||||
"screenmessage(message: str | ba.Lstr,\n"
|
||||
" color: Sequence[float] = None, top: bool = False,\n"
|
||||
" image: dict[str, Any] = None, log: bool = False,\n"
|
||||
" clients: Sequence[int] = None, transient: bool = False) -> None\n"
|
||||
" color: Sequence[float] | None = None,\n"
|
||||
" top: bool = False,\n"
|
||||
" image: dict[str, Any] | None = None,\n"
|
||||
" log: bool = False,\n"
|
||||
" clients: Sequence[int] | None = None,\n"
|
||||
" transient: bool = False)"
|
||||
" -> None\n"
|
||||
"\n"
|
||||
"Print a message to the local client's screen, in a given color.\n"
|
||||
"\n"
|
||||
@ -1157,7 +1161,7 @@ auto PythonMethodsApp::GetMethods() -> std::vector<PyMethodDef> {
|
||||
{"newactivity", (PyCFunction)PyNewActivity,
|
||||
METH_VARARGS | METH_KEYWORDS,
|
||||
"newactivity(activity_type: type[ba.Activity],\n"
|
||||
" settings: dict = None) -> ba.Activity\n"
|
||||
" settings: dict | None = None) -> ba.Activity\n"
|
||||
"\n"
|
||||
"Instantiates a ba.Activity given a type object.\n"
|
||||
"\n"
|
||||
@ -1203,7 +1207,7 @@ auto PythonMethodsApp::GetMethods() -> std::vector<PyMethodDef> {
|
||||
{"new_host_session", (PyCFunction)PyNewHostSession,
|
||||
METH_VARARGS | METH_KEYWORDS,
|
||||
"new_host_session(sessiontype: type[ba.Session],\n"
|
||||
" benchmark_type: str = None) -> None\n"
|
||||
" benchmark_type: str | None = None) -> None\n"
|
||||
"\n"
|
||||
"(internal)"},
|
||||
|
||||
|
||||
@ -693,8 +693,10 @@ auto PythonMethodsGameplay::GetMethods() -> std::vector<PyMethodDef> {
|
||||
"settings, exiting element counts, or other factors."},
|
||||
|
||||
{"playsound", (PyCFunction)PyPlaySound, METH_VARARGS | METH_KEYWORDS,
|
||||
"playsound(sound: Sound, volume: float = 1.0,\n"
|
||||
" position: Sequence[float] = None, host_only: bool = False) -> None\n"
|
||||
"playsound(sound: Sound,\n"
|
||||
" volume: float = 1.0,\n"
|
||||
" position: Sequence[float] | None = None,\n"
|
||||
" host_only: bool = False) -> None\n"
|
||||
"\n"
|
||||
"Play a ba.Sound a single time.\n"
|
||||
"\n"
|
||||
@ -740,9 +742,10 @@ auto PythonMethodsGameplay::GetMethods() -> std::vector<PyMethodDef> {
|
||||
"Category: **Gameplay Functions**"},
|
||||
|
||||
{"newnode", (PyCFunction)PyNewNode, METH_VARARGS | METH_KEYWORDS,
|
||||
"newnode(type: str, owner: ba.Node = None,\n"
|
||||
"attrs: dict = None, name: str = None, delegate: Any = None)\n"
|
||||
" -> Node\n"
|
||||
"newnode(type: str, owner: ba.Node | None = None,\n"
|
||||
" attrs: dict | None = None,\n"
|
||||
" name: str | None = None,\n"
|
||||
" delegate: Any = None) -> Node\n"
|
||||
"\n"
|
||||
"Add a node of the given type to the game.\n"
|
||||
"\n"
|
||||
|
||||
@ -493,7 +493,7 @@ auto PythonMethodsNetworking::GetMethods() -> std::vector<PyMethodDef> {
|
||||
|
||||
{"connect_to_party", (PyCFunction)PyConnectToParty,
|
||||
METH_VARARGS | METH_KEYWORDS,
|
||||
"connect_to_party(address: str, port: int = None,\n"
|
||||
"connect_to_party(address: str, port: int | None = None,\n"
|
||||
" print_progress: bool = True) -> None\n"
|
||||
"\n"
|
||||
"(internal)"},
|
||||
|
||||
@ -1048,8 +1048,8 @@ auto PythonMethodsSystem::GetMethods() -> std::vector<PyMethodDef> {
|
||||
"Debugging func for tracking leaked Python errors in the C++ layer.."},
|
||||
|
||||
{"value_test", (PyCFunction)PyValueTest, METH_VARARGS | METH_KEYWORDS,
|
||||
"value_test(arg: str, change: float = None, absolute: float = None)\n"
|
||||
" -> float\n"
|
||||
"value_test(arg: str, change: float | None = None,\n"
|
||||
" absolute: float | None = None) -> float\n"
|
||||
"\n"
|
||||
"(internal)"},
|
||||
|
||||
|
||||
@ -2366,8 +2366,8 @@ auto PythonMethodsUI::GetMethods() -> std::vector<PyMethodDef> {
|
||||
|
||||
{"chatmessage", (PyCFunction)PyChatMessage, METH_VARARGS | METH_KEYWORDS,
|
||||
"chatmessage(message: str | ba.Lstr,\n"
|
||||
" clients: Sequence[int] = None,\n"
|
||||
" sender_override: str = None) -> None\n"
|
||||
" clients: Sequence[int] | None = None,\n"
|
||||
" sender_override: str | None = None) -> None\n"
|
||||
"\n"
|
||||
"(internal)"},
|
||||
|
||||
@ -2396,14 +2396,15 @@ auto PythonMethodsUI::GetMethods() -> std::vector<PyMethodDef> {
|
||||
"Category: **General Utility Functions**"},
|
||||
|
||||
{"show_ad", (PyCFunction)PyShowAd, METH_VARARGS | METH_KEYWORDS,
|
||||
"show_ad(purpose: str, on_completion_call: Callable[[], None] = None)\n"
|
||||
"show_ad(purpose: str,\n"
|
||||
" on_completion_call: Callable[[], None] | None = None)\n"
|
||||
" -> None\n"
|
||||
"\n"
|
||||
"(internal)"},
|
||||
|
||||
{"show_ad_2", (PyCFunction)PyShowAd2, METH_VARARGS | METH_KEYWORDS,
|
||||
"show_ad_2(purpose: str,\n"
|
||||
" on_completion_call: Callable[[bool], None] = None)\n"
|
||||
" on_completion_call: Callable[[bool], None] | None = None)\n"
|
||||
" -> None\n"
|
||||
"\n"
|
||||
"(internal)"},
|
||||
@ -2423,8 +2424,8 @@ auto PythonMethodsUI::GetMethods() -> std::vector<PyMethodDef> {
|
||||
|
||||
{"show_online_score_ui", (PyCFunction)PyShowOnlineScoreUI,
|
||||
METH_VARARGS | METH_KEYWORDS,
|
||||
"show_online_score_ui(show: str = 'general', game: str = None,\n"
|
||||
" game_version: str = None) -> None\n"
|
||||
"show_online_score_ui(show: str = 'general', game: str | None = None,\n"
|
||||
" game_version: str | None = None) -> None\n"
|
||||
"\n"
|
||||
"(internal)"},
|
||||
|
||||
@ -2448,43 +2449,43 @@ auto PythonMethodsUI::GetMethods() -> std::vector<PyMethodDef> {
|
||||
|
||||
{"buttonwidget", (PyCFunction)PyButtonWidget,
|
||||
METH_VARARGS | METH_KEYWORDS,
|
||||
"buttonwidget(edit: ba.Widget = None,\n"
|
||||
" parent: ba.Widget = None,\n"
|
||||
" size: Sequence[float] = None,\n"
|
||||
" position: Sequence[float] = None,\n"
|
||||
" on_activate_call: Callable = None,\n"
|
||||
"buttonwidget(edit: ba.Widget | None = None,\n"
|
||||
" parent: ba.Widget | None = None,\n"
|
||||
" size: Sequence[float] | None = None,\n"
|
||||
" position: Sequence[float] | None = None,\n"
|
||||
" on_activate_call: Callable | None = None,\n"
|
||||
" label: str | ba.Lstr | None = None,\n"
|
||||
" color: Sequence[float] = None,\n"
|
||||
" down_widget: ba.Widget = None,\n"
|
||||
" up_widget: ba.Widget = None,\n"
|
||||
" left_widget: ba.Widget = None,\n"
|
||||
" right_widget: ba.Widget = None,\n"
|
||||
" texture: ba.Texture = None,\n"
|
||||
" text_scale: float = None,\n"
|
||||
" textcolor: Sequence[float] = None,\n"
|
||||
" enable_sound: bool = None,\n"
|
||||
" model_transparent: ba.Model = None,\n"
|
||||
" model_opaque: ba.Model = None,\n"
|
||||
" repeat: bool = None,\n"
|
||||
" scale: float = None,\n"
|
||||
" transition_delay: float = None,\n"
|
||||
" on_select_call: Callable = None,\n"
|
||||
" button_type: str = None,\n"
|
||||
" extra_touch_border_scale: float = None,\n"
|
||||
" selectable: bool = None,\n"
|
||||
" show_buffer_top: float = None,\n"
|
||||
" icon: ba.Texture = None,\n"
|
||||
" iconscale: float = None,\n"
|
||||
" icon_tint: float = None,\n"
|
||||
" icon_color: Sequence[float] = None,\n"
|
||||
" autoselect: bool = None,\n"
|
||||
" mask_texture: ba.Texture = None,\n"
|
||||
" tint_texture: ba.Texture = None,\n"
|
||||
" tint_color: Sequence[float] = None,\n"
|
||||
" tint2_color: Sequence[float] = None,\n"
|
||||
" text_flatness: float = None,\n"
|
||||
" text_res_scale: float = None,\n"
|
||||
" enabled: bool = None) -> ba.Widget\n"
|
||||
" color: Sequence[float] | None = None,\n"
|
||||
" down_widget: ba.Widget | None = None,\n"
|
||||
" up_widget: ba.Widget | None = None,\n"
|
||||
" left_widget: ba.Widget | None = None,\n"
|
||||
" right_widget: ba.Widget | None = None,\n"
|
||||
" texture: ba.Texture | None = None,\n"
|
||||
" text_scale: float | None = None,\n"
|
||||
" textcolor: Sequence[float] | None = None,\n"
|
||||
" enable_sound: bool | None = None,\n"
|
||||
" model_transparent: ba.Model | None = None,\n"
|
||||
" model_opaque: ba.Model | None = None,\n"
|
||||
" repeat: bool | None = None,\n"
|
||||
" scale: float | None = None,\n"
|
||||
" transition_delay: float | None = None,\n"
|
||||
" on_select_call: Callable | None = None,\n"
|
||||
" button_type: str | None = None,\n"
|
||||
" extra_touch_border_scale: float | None = None,\n"
|
||||
" selectable: bool | None = None,\n"
|
||||
" show_buffer_top: float | None = None,\n"
|
||||
" icon: ba.Texture | None = None,\n"
|
||||
" iconscale: float | None = None,\n"
|
||||
" icon_tint: float | None = None,\n"
|
||||
" icon_color: Sequence[float] | None = None,\n"
|
||||
" autoselect: bool | None = None,\n"
|
||||
" mask_texture: ba.Texture | None = None,\n"
|
||||
" tint_texture: ba.Texture | None = None,\n"
|
||||
" tint_color: Sequence[float] | None = None,\n"
|
||||
" tint2_color: Sequence[float] | None = None,\n"
|
||||
" text_flatness: float | None = None,\n"
|
||||
" text_res_scale: float | None = None,\n"
|
||||
" enabled: bool | None = None) -> ba.Widget\n"
|
||||
"\n"
|
||||
"Create or edit a button widget.\n"
|
||||
"\n"
|
||||
@ -2496,21 +2497,21 @@ auto PythonMethodsUI::GetMethods() -> std::vector<PyMethodDef> {
|
||||
|
||||
{"checkboxwidget", (PyCFunction)PyCheckBoxWidget,
|
||||
METH_VARARGS | METH_KEYWORDS,
|
||||
"checkboxwidget(edit: ba.Widget = None,\n"
|
||||
" parent: ba.Widget = None,\n"
|
||||
" size: Sequence[float] = None,\n"
|
||||
" position: Sequence[float] = None,\n"
|
||||
"checkboxwidget(edit: ba.Widget | None = None,\n"
|
||||
" parent: ba.Widget | None = None,\n"
|
||||
" size: Sequence[float] | None = None,\n"
|
||||
" position: Sequence[float] | None = None,\n"
|
||||
" text: str | ba.Lstr | None = None,\n"
|
||||
" value: bool = None,\n"
|
||||
" on_value_change_call: Callable[[bool], None] = None,\n"
|
||||
" on_select_call: Callable[[], None] = None,\n"
|
||||
" text_scale: float = None,\n"
|
||||
" textcolor: Sequence[float] = None,\n"
|
||||
" scale: float = None,\n"
|
||||
" is_radio_button: bool = None,\n"
|
||||
" maxwidth: float = None,\n"
|
||||
" autoselect: bool = None,\n"
|
||||
" color: Sequence[float] = None) -> ba.Widget\n"
|
||||
" value: bool | None = None,\n"
|
||||
" on_value_change_call: Callable[[bool], None] | None = None,\n"
|
||||
" on_select_call: Callable[[], None] | None = None,\n"
|
||||
" text_scale: float | None = None,\n"
|
||||
" textcolor: Sequence[float] | None = None,\n"
|
||||
" scale: float | None = None,\n"
|
||||
" is_radio_button: bool | None = None,\n"
|
||||
" maxwidth: float | None = None,\n"
|
||||
" autoselect: bool | None = None,\n"
|
||||
" color: Sequence[float] | None = None) -> ba.Widget\n"
|
||||
"\n"
|
||||
"Create or edit a check-box widget.\n"
|
||||
"\n"
|
||||
@ -2521,16 +2522,24 @@ auto PythonMethodsUI::GetMethods() -> std::vector<PyMethodDef> {
|
||||
"are applied to the Widget."},
|
||||
|
||||
{"imagewidget", (PyCFunction)PyImageWidget, METH_VARARGS | METH_KEYWORDS,
|
||||
"imagewidget(edit: ba.Widget = None, parent: ba.Widget = None,\n"
|
||||
" size: Sequence[float] = None, position: Sequence[float] = None,\n"
|
||||
" color: Sequence[float] = None, texture: ba.Texture = None,\n"
|
||||
" opacity: float = None, model_transparent: ba.Model = None,\n"
|
||||
" model_opaque: ba.Model = None, has_alpha_channel: bool = True,\n"
|
||||
" tint_texture: ba.Texture = None, tint_color: Sequence[float] = "
|
||||
"None,\n"
|
||||
" transition_delay: float = None, draw_controller: ba.Widget = None,\n"
|
||||
" tint2_color: Sequence[float] = None, tilt_scale: float = None,\n"
|
||||
" mask_texture: ba.Texture = None, radial_amount: float = None)\n"
|
||||
"imagewidget(edit: ba.Widget | None = None,\n"
|
||||
" parent: ba.Widget | None = None,\n"
|
||||
" size: Sequence[float] | None = None,\n"
|
||||
" position: Sequence[float] | None = None,\n"
|
||||
" color: Sequence[float] | None = None,\n"
|
||||
" texture: ba.Texture | None = None,\n"
|
||||
" opacity: float | None = None,\n"
|
||||
" model_transparent: ba.Model | None = None,\n"
|
||||
" model_opaque: ba.Model | None = None,\n"
|
||||
" has_alpha_channel: bool = True,\n"
|
||||
" tint_texture: ba.Texture | None = None,\n"
|
||||
" tint_color: Sequence[float] | None = None,\n"
|
||||
" transition_delay: float | None = None,\n"
|
||||
" draw_controller: ba.Widget | None = None,\n"
|
||||
" tint2_color: Sequence[float] | None = None,\n"
|
||||
" tilt_scale: float | None = None,\n"
|
||||
" mask_texture: ba.Texture | None = None,\n"
|
||||
" radial_amount: float | None = None)\n"
|
||||
" -> ba.Widget\n"
|
||||
"\n"
|
||||
"Create or edit an image widget.\n"
|
||||
@ -2543,23 +2552,23 @@ auto PythonMethodsUI::GetMethods() -> std::vector<PyMethodDef> {
|
||||
|
||||
{"columnwidget", (PyCFunction)PyColumnWidget,
|
||||
METH_VARARGS | METH_KEYWORDS,
|
||||
"columnwidget(edit: ba.Widget = None,\n"
|
||||
" parent: ba.Widget = None,\n"
|
||||
" size: Sequence[float] = None,\n"
|
||||
" position: Sequence[float] = None,\n"
|
||||
" background: bool = None,\n"
|
||||
" selected_child: ba.Widget = None,\n"
|
||||
" visible_child: ba.Widget = None,\n"
|
||||
" single_depth: bool = None,\n"
|
||||
" print_list_exit_instructions: bool = None,\n"
|
||||
" left_border: float = None,\n"
|
||||
" top_border: float = None,\n"
|
||||
" bottom_border: float = None,\n"
|
||||
" selection_loops_to_parent: bool = None,\n"
|
||||
" border: float = None,\n"
|
||||
" margin: float = None,\n"
|
||||
" claims_left_right: bool = None,\n"
|
||||
" claims_tab: bool = None) -> ba.Widget\n"
|
||||
"columnwidget(edit: ba.Widget | None = None,\n"
|
||||
" parent: ba.Widget | None = None,\n"
|
||||
" size: Sequence[float] | None = None,\n"
|
||||
" position: Sequence[float] | None = None,\n"
|
||||
" background: bool | None = None,\n"
|
||||
" selected_child: ba.Widget | None = None,\n"
|
||||
" visible_child: ba.Widget | None = None,\n"
|
||||
" single_depth: bool | None = None,\n"
|
||||
" print_list_exit_instructions: bool | None = None,\n"
|
||||
" left_border: float | None = None,\n"
|
||||
" top_border: float | None = None,\n"
|
||||
" bottom_border: float | None = None,\n"
|
||||
" selection_loops_to_parent: bool | None = None,\n"
|
||||
" border: float | None = None,\n"
|
||||
" margin: float | None = None,\n"
|
||||
" claims_left_right: bool | None = None,\n"
|
||||
" claims_tab: bool | None = None) -> ba.Widget\n"
|
||||
"\n"
|
||||
"Create or edit a column widget.\n"
|
||||
"\n"
|
||||
@ -2571,37 +2580,37 @@ auto PythonMethodsUI::GetMethods() -> std::vector<PyMethodDef> {
|
||||
|
||||
{"containerwidget", (PyCFunction)PyContainerWidget,
|
||||
METH_VARARGS | METH_KEYWORDS,
|
||||
"containerwidget(edit: ba.Widget = None,\n"
|
||||
" parent: ba.Widget = None,\n"
|
||||
" size: Sequence[float] = None,\n"
|
||||
" position: Sequence[float] = None,\n"
|
||||
" background: bool = None,\n"
|
||||
" selected_child: ba.Widget = None,\n"
|
||||
" transition: str = None,\n"
|
||||
" cancel_button: ba.Widget = None,\n"
|
||||
" start_button: ba.Widget = None,\n"
|
||||
" root_selectable: bool = None,\n"
|
||||
" on_activate_call: Callable[[], None] = None,\n"
|
||||
" claims_left_right: bool = None,\n"
|
||||
" claims_tab: bool = None,\n"
|
||||
" selection_loops: bool = None,\n"
|
||||
" selection_loops_to_parent: bool = None,\n"
|
||||
" scale: float = None,\n"
|
||||
" on_outside_click_call: Callable[[], None] = None,\n"
|
||||
" single_depth: bool = None,\n"
|
||||
" visible_child: ba.Widget = None,\n"
|
||||
" stack_offset: Sequence[float] = None,\n"
|
||||
" color: Sequence[float] = None,\n"
|
||||
" on_cancel_call: Callable[[], None] = None,\n"
|
||||
" print_list_exit_instructions: bool = None,\n"
|
||||
" click_activate: bool = None,\n"
|
||||
" always_highlight: bool = None,\n"
|
||||
" selectable: bool = None,\n"
|
||||
" scale_origin_stack_offset: Sequence[float] = None,\n"
|
||||
" toolbar_visibility: str = None,\n"
|
||||
" on_select_call: Callable[[], None] = None,\n"
|
||||
" claim_outside_clicks: bool = None,\n"
|
||||
" claims_up_down: bool = None) -> ba.Widget\n"
|
||||
"containerwidget(edit: ba.Widget | None = None,\n"
|
||||
" parent: ba.Widget | None = None,\n"
|
||||
" size: Sequence[float] | None = None,\n"
|
||||
" position: Sequence[float] | None = None,\n"
|
||||
" background: bool | None = None,\n"
|
||||
" selected_child: ba.Widget | None = None,\n"
|
||||
" transition: str | None = None,\n"
|
||||
" cancel_button: ba.Widget | None = None,\n"
|
||||
" start_button: ba.Widget | None = None,\n"
|
||||
" root_selectable: bool | None = None,\n"
|
||||
" on_activate_call: Callable[[], None] | None = None,\n"
|
||||
" claims_left_right: bool | None = None,\n"
|
||||
" claims_tab: bool | None = None,\n"
|
||||
" selection_loops: bool | None = None,\n"
|
||||
" selection_loops_to_parent: bool | None = None,\n"
|
||||
" scale: float | None = None,\n"
|
||||
" on_outside_click_call: Callable[[], None] | None = None,\n"
|
||||
" single_depth: bool | None = None,\n"
|
||||
" visible_child: ba.Widget | None = None,\n"
|
||||
" stack_offset: Sequence[float] | None = None,\n"
|
||||
" color: Sequence[float] | None = None,\n"
|
||||
" on_cancel_call: Callable[[], None] | None = None,\n"
|
||||
" print_list_exit_instructions: bool | None = None,\n"
|
||||
" click_activate: bool | None = None,\n"
|
||||
" always_highlight: bool | None = None,\n"
|
||||
" selectable: bool | None = None,\n"
|
||||
" scale_origin_stack_offset: Sequence[float] | None = None,\n"
|
||||
" toolbar_visibility: str | None = None,\n"
|
||||
" on_select_call: Callable[[], None] | None = None,\n"
|
||||
" claim_outside_clicks: bool | None = None,\n"
|
||||
" claims_up_down: bool | None = None) -> ba.Widget\n"
|
||||
"\n"
|
||||
"Create or edit a container widget.\n"
|
||||
"\n"
|
||||
@ -2612,14 +2621,16 @@ auto PythonMethodsUI::GetMethods() -> std::vector<PyMethodDef> {
|
||||
"are applied to the Widget."},
|
||||
|
||||
{"rowwidget", (PyCFunction)PyRowWidget, METH_VARARGS | METH_KEYWORDS,
|
||||
"rowwidget(edit: ba.Widget = None, parent: ba.Widget = None,\n"
|
||||
" size: Sequence[float] = None,\n"
|
||||
" position: Sequence[float] = None,\n"
|
||||
" background: bool = None, selected_child: ba.Widget = None,\n"
|
||||
" visible_child: ba.Widget = None,\n"
|
||||
" claims_left_right: bool = None,\n"
|
||||
" claims_tab: bool = None,\n"
|
||||
" selection_loops_to_parent: bool = None) -> ba.Widget\n"
|
||||
"rowwidget(edit: ba.Widget | None = None,\n"
|
||||
" parent: ba.Widget | None = None,\n"
|
||||
" size: Sequence[float] | None = None,\n"
|
||||
" position: Sequence[float] | None = None,\n"
|
||||
" background: bool | None = None,\n"
|
||||
" selected_child: ba.Widget | None = None,\n"
|
||||
" visible_child: ba.Widget | None = None,\n"
|
||||
" claims_left_right: bool | None = None,\n"
|
||||
" claims_tab: bool | None = None,\n"
|
||||
" selection_loops_to_parent: bool | None = None) -> ba.Widget\n"
|
||||
"\n"
|
||||
"Create or edit a row widget.\n"
|
||||
"\n"
|
||||
@ -2631,18 +2642,24 @@ auto PythonMethodsUI::GetMethods() -> std::vector<PyMethodDef> {
|
||||
|
||||
{"scrollwidget", (PyCFunction)PyScrollWidget,
|
||||
METH_VARARGS | METH_KEYWORDS,
|
||||
"scrollwidget(edit: ba.Widget = None, parent: ba.Widget = None,\n"
|
||||
" size: Sequence[float] = None, position: Sequence[float] = None,\n"
|
||||
" background: bool = None, selected_child: ba.Widget = None,\n"
|
||||
" capture_arrows: bool = False, on_select_call: Callable = None,\n"
|
||||
" center_small_content: bool = None, color: Sequence[float] = None,\n"
|
||||
" highlight: bool = None, border_opacity: float = None,\n"
|
||||
" simple_culling_v: float = None,\n"
|
||||
" selection_loops_to_parent: bool = None,\n"
|
||||
" claims_left_right: bool = None,\n"
|
||||
" claims_up_down: bool = None,\n"
|
||||
" claims_tab: bool = None,\n"
|
||||
" autoselect: bool = None) -> ba.Widget\n"
|
||||
"scrollwidget(edit: ba.Widget | None = None,\n"
|
||||
" parent: ba.Widget | None = None,\n"
|
||||
" size: Sequence[float] | None = None,\n"
|
||||
" position: Sequence[float] | None = None,\n"
|
||||
" background: bool | None = None,\n"
|
||||
" selected_child: ba.Widget | None = None,\n"
|
||||
" capture_arrows: bool = False,\n"
|
||||
" on_select_call: Callable | None = None,\n"
|
||||
" center_small_content: bool | None = None,\n"
|
||||
" color: Sequence[float] | None = None,\n"
|
||||
" highlight: bool | None = None,\n"
|
||||
" border_opacity: float | None = None,\n"
|
||||
" simple_culling_v: float | None = None,\n"
|
||||
" selection_loops_to_parent: bool | None = None,\n"
|
||||
" claims_left_right: bool | None = None,\n"
|
||||
" claims_up_down: bool | None = None,\n"
|
||||
" claims_tab: bool | None = None,\n"
|
||||
" autoselect: bool | None = None) -> ba.Widget\n"
|
||||
"\n"
|
||||
"Create or edit a scroll widget.\n"
|
||||
"\n"
|
||||
@ -2654,17 +2671,22 @@ auto PythonMethodsUI::GetMethods() -> std::vector<PyMethodDef> {
|
||||
|
||||
{"hscrollwidget", (PyCFunction)PyHScrollWidget,
|
||||
METH_VARARGS | METH_KEYWORDS,
|
||||
"hscrollwidget(edit: ba.Widget = None, parent: ba.Widget = None,\n"
|
||||
" size: Sequence[float] = None, position: Sequence[float] = None,\n"
|
||||
" background: bool = None, selected_child: ba.Widget = None,\n"
|
||||
" capture_arrows: bool = None,\n"
|
||||
" on_select_call: Callable[[], None] = None,\n"
|
||||
" center_small_content: bool = None, color: Sequence[float] = None,\n"
|
||||
" highlight: bool = None, border_opacity: float = None,\n"
|
||||
" simple_culling_h: float = None,\n"
|
||||
" claims_left_right: bool = None,\n"
|
||||
" claims_up_down: bool = None,\n"
|
||||
" claims_tab: bool = None) -> ba.Widget\n"
|
||||
"hscrollwidget(edit: ba.Widget | None = None,\n"
|
||||
" parent: ba.Widget | None = None,\n"
|
||||
" size: Sequence[float] | None = None,\n"
|
||||
" position: Sequence[float] | None = None,\n"
|
||||
" background: bool | None = None,\n"
|
||||
" selected_child: ba.Widget | None = None,\n"
|
||||
" capture_arrows: bool | None = None,\n"
|
||||
" on_select_call: Callable[[], None] | None = None,\n"
|
||||
" center_small_content: bool | None = None,\n"
|
||||
" color: Sequence[float] | None = None,\n"
|
||||
" highlight: bool | None = None,\n"
|
||||
" border_opacity: float | None = None,\n"
|
||||
" simple_culling_h: float | None = None,\n"
|
||||
" claims_left_right: bool | None = None,\n"
|
||||
" claims_up_down: bool | None = None,\n"
|
||||
" claims_tab: bool | None = None) -> ba.Widget\n"
|
||||
"\n"
|
||||
"Create or edit a horizontal scroll widget.\n"
|
||||
"\n"
|
||||
@ -2675,26 +2697,41 @@ auto PythonMethodsUI::GetMethods() -> std::vector<PyMethodDef> {
|
||||
"are applied to the Widget."},
|
||||
|
||||
{"textwidget", (PyCFunction)PyTextWidget, METH_VARARGS | METH_KEYWORDS,
|
||||
"textwidget(edit: ba.Widget = None, parent: ba.Widget = None,\n"
|
||||
" size: Sequence[float] = None, position: Sequence[float] = None,\n"
|
||||
" text: str | ba.Lstr | None = None, v_align: str = None,\n"
|
||||
" h_align: str = None, editable: bool = None, padding: float = None,\n"
|
||||
" on_return_press_call: Callable[[], None] = None,\n"
|
||||
" on_activate_call: Callable[[], None] = None,\n"
|
||||
" selectable: bool = None, query: ba.Widget = None, max_chars: int = "
|
||||
"None,\n"
|
||||
" color: Sequence[float] = None, click_activate: bool = None,\n"
|
||||
" on_select_call: Callable[[], None] = None,\n"
|
||||
" always_highlight: bool = None, draw_controller: ba.Widget = None,\n"
|
||||
" scale: float = None, corner_scale: float = None,\n"
|
||||
"textwidget(edit: ba.Widget | None = None,\n"
|
||||
" parent: ba.Widget | None = None,\n"
|
||||
" size: Sequence[float] | None = None,\n"
|
||||
" position: Sequence[float] | None = None,\n"
|
||||
" text: str | ba.Lstr | None = None,\n"
|
||||
" v_align: str | None = None,\n"
|
||||
" h_align: str | None = None,\n"
|
||||
" editable: bool | None = None,\n"
|
||||
" padding: float | None = None,\n"
|
||||
" on_return_press_call: Callable[[], None] | None = None,\n"
|
||||
" on_activate_call: Callable[[], None] | None = None,\n"
|
||||
" selectable: bool | None = None,\n"
|
||||
" query: ba.Widget | None = None,\n"
|
||||
" max_chars: int | None = None,\n"
|
||||
" color: Sequence[float] | None = None,\n"
|
||||
" click_activate: bool | None = None,\n"
|
||||
" on_select_call: Callable[[], None] | None = None,\n"
|
||||
" always_highlight: bool | None = None,\n"
|
||||
" draw_controller: ba.Widget | None = None,\n"
|
||||
" scale: float | None = None,\n"
|
||||
" corner_scale: float | None = None,\n"
|
||||
" description: str | ba.Lstr | None = None,\n"
|
||||
" transition_delay: float = None, maxwidth: float = None,\n"
|
||||
" max_height: float = None, flatness: float = None,\n"
|
||||
" shadow: float = None, autoselect: bool = None, rotate: float = "
|
||||
"None,\n"
|
||||
" enabled: bool = None, force_internal_editing: bool = None,\n"
|
||||
" always_show_carat: bool = None, big: bool = None,\n"
|
||||
" extra_touch_border_scale: float = None, res_scale: float = None)\n"
|
||||
" transition_delay: float | None = None,\n"
|
||||
" maxwidth: float | None = None,\n"
|
||||
" max_height: float | None = None,\n"
|
||||
" flatness: float | None = None,\n"
|
||||
" shadow: float | None = None,\n"
|
||||
" autoselect: bool | None = None,\n"
|
||||
" rotate: float | None = None,\n"
|
||||
" enabled: bool | None = None,\n"
|
||||
" force_internal_editing: bool | None = None,\n"
|
||||
" always_show_carat: bool | None = None,\n"
|
||||
" big: bool | None = None,\n"
|
||||
" extra_touch_border_scale: float | None = None,\n"
|
||||
" res_scale: float | None = None)\n"
|
||||
" -> Widget\n"
|
||||
"\n"
|
||||
"Create or edit a text widget.\n"
|
||||
@ -2706,11 +2743,16 @@ auto PythonMethodsUI::GetMethods() -> std::vector<PyMethodDef> {
|
||||
"are applied to the Widget."},
|
||||
|
||||
{"widget", (PyCFunction)PyWidgetCall, METH_VARARGS | METH_KEYWORDS,
|
||||
"widget(edit: ba.Widget = None, up_widget: ba.Widget = None,\n"
|
||||
" down_widget: ba.Widget = None, left_widget: ba.Widget = None,\n"
|
||||
" right_widget: ba.Widget = None, show_buffer_top: float = None,\n"
|
||||
" show_buffer_bottom: float = None, show_buffer_left: float = None,\n"
|
||||
" show_buffer_right: float = None, autoselect: bool = None) -> None\n"
|
||||
"widget(edit: ba.Widget | None = None,\n"
|
||||
" up_widget: ba.Widget | None = None,\n"
|
||||
" down_widget: ba.Widget | None = None,\n"
|
||||
" left_widget: ba.Widget | None = None,\n"
|
||||
" right_widget: ba.Widget | None = None,\n"
|
||||
" show_buffer_top: float | None = None,\n"
|
||||
" show_buffer_bottom: float | None = None,\n"
|
||||
" show_buffer_left: float | None = None,\n"
|
||||
" show_buffer_right: float | None = None,\n"
|
||||
" autoselect: bool | None = None) -> None\n"
|
||||
"\n"
|
||||
"Edit common attributes of any widget.\n"
|
||||
"\n"
|
||||
|
||||
@ -119,7 +119,7 @@ class App:
|
||||
def _servercmd(self,
|
||||
cmd: str,
|
||||
payload: dict,
|
||||
files: dict[str, IO] = None) -> ResponseData:
|
||||
files: dict[str, IO] | None = None) -> ResponseData:
|
||||
"""Issue a command to the server and get a response."""
|
||||
|
||||
response_raw = requests.post(
|
||||
|
||||
@ -23,7 +23,7 @@ def _get_targets(varname: str,
|
||||
inext: str,
|
||||
outext: str,
|
||||
all_targets: set,
|
||||
limit_to_prefix: str = None) -> str:
|
||||
limit_to_prefix: str | None = None) -> str:
|
||||
"""Generic function to map source extension to dst files."""
|
||||
|
||||
src = 'assets/src'
|
||||
|
||||
@ -19,7 +19,7 @@ T = TypeVar('T')
|
||||
class _PathCapture:
|
||||
"""Utility for obtaining dataclass storage paths in a type safe way."""
|
||||
|
||||
def __init__(self, obj: Any, pathparts: list[str] = None):
|
||||
def __init__(self, obj: Any, pathparts: list[str] | None = None):
|
||||
self._is_dataclass = dataclasses.is_dataclass(obj)
|
||||
if pathparts is None:
|
||||
pathparts = []
|
||||
|
||||
@ -38,7 +38,7 @@ PREP_ATTR = '_DCIOPREP'
|
||||
PREP_SESSION_ATTR = '_DCIOPREPSESSION'
|
||||
|
||||
|
||||
def ioprep(cls: type, globalns: dict = None) -> None:
|
||||
def ioprep(cls: type, globalns: dict | None = None) -> None:
|
||||
"""Prep a dataclass type for use with this module's functionality.
|
||||
|
||||
Prepping ensures that all types contained in a data class as well as
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user