mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-31 11:46:58 +08:00
formatting and utils work
This commit is contained in:
parent
c2d88cab28
commit
53e7655a94
88
.efrocachemap
generated
88
.efrocachemap
generated
@ -4060,50 +4060,50 @@
|
|||||||
"build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1",
|
"build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1",
|
||||||
"build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae",
|
"build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae",
|
||||||
"build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599",
|
"build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599",
|
||||||
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "5db2ea1c6bacab3fe60eb948aaa4afdb",
|
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "b8ca5252d3d8f2865e486756bd460118",
|
||||||
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "2b476166b869112112d57f26833a8381",
|
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "005367a629683ecb9c54bc98fb7a94c6",
|
||||||
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "7b8d2cb654ab2c022584114ed9910c38",
|
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "6a90b3bdefbb2d55a5b9c454784e8b16",
|
||||||
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "846150203fe0611a71ff832176579ce5",
|
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "c3d831d36d5c81aa850872d33761c4be",
|
||||||
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "683c3d3b7ac3b052f3ecc3fef36fc13a",
|
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "5dfa9f0125be245e37d754981b28b8c0",
|
||||||
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "e41d6aeb7a2e335ebcc701a35d45df8c",
|
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "7c687fc514f115d6cc368468dd697a91",
|
||||||
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "f0a97f7c34a78bfd829f460a9f4ea81c",
|
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "6ed08dcb724be490cab50db9155e1120",
|
||||||
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "d1e697c045e3b4092ec35fb8f3b4bd25",
|
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "14b0f978f221664c531bfa72310def53",
|
||||||
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "952c02766cecd280af3e9b77c80e91e1",
|
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "7a2781e352cf7e6581f56ff99ec11edb",
|
||||||
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "bceae148212f47bfc9acf60ea52b1003",
|
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "94465074121d8a252fb13d16f5cc1bff",
|
||||||
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "e9ea0d09ba4af6253025cbe3aa8469cf",
|
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "5ceeac21ed1a08f4b7461d73affbc7aa",
|
||||||
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "d2cf18fbc6d815268790532bc38d2434",
|
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "740ede02d02dae029d17d8a109ee699b",
|
||||||
"build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "1134322221c0ccea4057e462d9fa5197",
|
"build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "a389b77ebb76d26ed2a8f9f6c86d4f12",
|
||||||
"build/prefab/full/mac_x86_64_gui/release/ballisticakit": "30d10d34fb0e14b8f7ceec1760b521d6",
|
"build/prefab/full/mac_x86_64_gui/release/ballisticakit": "62c118fd9da045125073ad121369901c",
|
||||||
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "d132bc58d9744941144244484bb005a6",
|
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "cb62e525bf417724951a4b2b4bb103fe",
|
||||||
"build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "5ae4aef6e0291175a3a9e3b77adcc0c0",
|
"build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "27d6ce4966f64b840b726093572c6f2f",
|
||||||
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "abb92db084cdc165d7c1ed500be919ba",
|
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "32da36c142f47dde0fcb5419f30078e7",
|
||||||
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "57bb6f6b5dadbc8f05fbab3271ef8abb",
|
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "35079c413dcaae069cfd91b94f8581fb",
|
||||||
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "c4a68563f1237c1679c870def5d91b1a",
|
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "7764a0b91ba45bfad66fe7f9af9b4c3a",
|
||||||
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "e2f338fd1d4d8ff9a079e2e9c492aabb",
|
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "a3a45ce22e22d5dd9b205b72b08886f9",
|
||||||
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "ee36a39fd0f524989cb68930c89c8868",
|
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9",
|
||||||
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "dbed9145e5db116d92aa47cb9e98da39",
|
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "56d6440f62c271c4ce9ef520400395a3",
|
||||||
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "ee36a39fd0f524989cb68930c89c8868",
|
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "d9865523059d8cf11b2bef4b9da9a8c9",
|
||||||
"build/prefab/lib/linux_arm64_server/release/libballisticaplus.a": "dbed9145e5db116d92aa47cb9e98da39",
|
"build/prefab/lib/linux_arm64_server/release/libballisticaplus.a": "56d6440f62c271c4ce9ef520400395a3",
|
||||||
"build/prefab/lib/linux_x86_64_gui/debug/libballisticaplus.a": "dc078f11a4e93062adc7d210fd4f08fb",
|
"build/prefab/lib/linux_x86_64_gui/debug/libballisticaplus.a": "390a90cf4af1c55662c61ec19f9481bb",
|
||||||
"build/prefab/lib/linux_x86_64_gui/release/libballisticaplus.a": "a74bea3380d0fb39f78ac7b7598c1a72",
|
"build/prefab/lib/linux_x86_64_gui/release/libballisticaplus.a": "e55895a55cc40f79be9e2e8095e8adf2",
|
||||||
"build/prefab/lib/linux_x86_64_server/debug/libballisticaplus.a": "dc078f11a4e93062adc7d210fd4f08fb",
|
"build/prefab/lib/linux_x86_64_server/debug/libballisticaplus.a": "390a90cf4af1c55662c61ec19f9481bb",
|
||||||
"build/prefab/lib/linux_x86_64_server/release/libballisticaplus.a": "a74bea3380d0fb39f78ac7b7598c1a72",
|
"build/prefab/lib/linux_x86_64_server/release/libballisticaplus.a": "e55895a55cc40f79be9e2e8095e8adf2",
|
||||||
"build/prefab/lib/mac_arm64_gui/debug/libballisticaplus.a": "b397e020f33132c4dd2280cb1222cd14",
|
"build/prefab/lib/mac_arm64_gui/debug/libballisticaplus.a": "9846a6a3dd3685417fe834b91be8ac74",
|
||||||
"build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "ff0cb4db976707d25bd401bce80a4882",
|
"build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "68087f1bac1513e92cabdb59c637e759",
|
||||||
"build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "b397e020f33132c4dd2280cb1222cd14",
|
"build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "9846a6a3dd3685417fe834b91be8ac74",
|
||||||
"build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "ff0cb4db976707d25bd401bce80a4882",
|
"build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "68087f1bac1513e92cabdb59c637e759",
|
||||||
"build/prefab/lib/mac_x86_64_gui/debug/libballisticaplus.a": "c464accef921df1325459bdd10c59b84",
|
"build/prefab/lib/mac_x86_64_gui/debug/libballisticaplus.a": "72a7370f23c76ed8018999b78d88a545",
|
||||||
"build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "0896e849885cef50bcf33ce863efa7d2",
|
"build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "c2cf0dc227e41a826c913d12e117c316",
|
||||||
"build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "e53c808357cc0a2f0da7b870be147083",
|
"build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "fbdc80e41c5883b4a893d2f0786e377f",
|
||||||
"build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "0896e849885cef50bcf33ce863efa7d2",
|
"build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "c2cf0dc227e41a826c913d12e117c316",
|
||||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "72901cf56d898442b6bcf4ecafd5cd65",
|
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "45c8b0bec696a73e506deefb3916fcfa",
|
||||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "c185b4f41dfc69c133a75260b95421d1",
|
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "0f12d8a899c3e640766904886099e283",
|
||||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "096880b9e8faac99a72d234a61ddd624",
|
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "daf235cf0962ad9ad43bd401802c3d63",
|
||||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "266f4e6a3d8b39c97ee7b5e766e8b207",
|
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "360f7a2a5765999b570e3ef0094d649d",
|
||||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "0927775fb993a977de90e4671a09e996",
|
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "bdea164136c6e9f2c30c9379af739ba4",
|
||||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "53fcf97128862b34771ca967f88641c8",
|
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "f3e7b1c218457af10ad100c89028562e",
|
||||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "160a2caaa393f9ddb40ffebc7546e6bb",
|
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "159e662082897a3f6488919b73fac491",
|
||||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "90716a0e1310a90247a9aee3a7a97a38",
|
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "1cc0c01a5263434ae9bcc2ea223652dd",
|
||||||
"src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c",
|
"src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c",
|
||||||
"src/assets/ba_data/python/babase/_mgen/enums.py": "b611c090513a21e2fe90e56582724e9d",
|
"src/assets/ba_data/python/babase/_mgen/enums.py": "b611c090513a21e2fe90e56582724e9d",
|
||||||
"src/ballistica/base/mgen/pyembed/binding_base.inc": "72bfed2cce8ff19741989dec28302f3f",
|
"src/ballistica/base/mgen/pyembed/binding_base.inc": "72bfed2cce8ff19741989dec28302f3f",
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
### 1.7.33 (build 21772, api 8, 2024-03-02)
|
### 1.7.33 (build 21775, api 8, 2024-03-12)
|
||||||
- Stress test input-devices are now a bit smarter; they won't press any buttons
|
- Stress test input-devices are now a bit smarter; they won't press any buttons
|
||||||
while UIs are up (this could cause lots of chaos if it happened).
|
while UIs are up (this could cause lots of chaos if it happened).
|
||||||
- Added a 'Show Demos When Idle' option in advanced settings. If enabled, the
|
- Added a 'Show Demos When Idle' option in advanced settings. If enabled, the
|
||||||
|
|||||||
@ -152,9 +152,9 @@ class AccountV1Subsystem:
|
|||||||
"""(internal)"""
|
"""(internal)"""
|
||||||
|
|
||||||
for entry in info:
|
for entry in info:
|
||||||
cache_entry = self.tournament_info[
|
cache_entry = self.tournament_info[entry['tournamentID']] = (
|
||||||
entry['tournamentID']
|
copy.deepcopy(entry)
|
||||||
] = copy.deepcopy(entry)
|
)
|
||||||
|
|
||||||
# Also store the time we received this, so we can adjust
|
# Also store the time we received this, so we can adjust
|
||||||
# time-remaining values/etc.
|
# time-remaining values/etc.
|
||||||
|
|||||||
@ -75,9 +75,9 @@ class AchievementSubsystem:
|
|||||||
|
|
||||||
def __init__(self) -> None:
|
def __init__(self) -> None:
|
||||||
self.achievements: list[Achievement] = []
|
self.achievements: list[Achievement] = []
|
||||||
self.achievements_to_display: (
|
self.achievements_to_display: list[
|
||||||
list[tuple[baclassic.Achievement, bool]]
|
tuple[baclassic.Achievement, bool]
|
||||||
) = []
|
] = []
|
||||||
self.achievement_display_timer: bascenev1.BaseTimer | None = None
|
self.achievement_display_timer: bascenev1.BaseTimer | None = None
|
||||||
self.last_achievement_display_time: float = 0.0
|
self.last_achievement_display_time: float = 0.0
|
||||||
self.achievement_completion_banner_slots: set[int] = set()
|
self.achievement_completion_banner_slots: set[int] = set()
|
||||||
|
|||||||
@ -35,9 +35,11 @@ def get_tournament_prize_strings(entry: dict[str, Any]) -> list[str]:
|
|||||||
prval = (
|
prval = (
|
||||||
''
|
''
|
||||||
if rng is None
|
if rng is None
|
||||||
else ('#' + str(rng[0]))
|
else (
|
||||||
if (rng[0] == rng[1])
|
('#' + str(rng[0]))
|
||||||
else ('#' + str(rng[0]) + '-' + str(rng[1]))
|
if (rng[0] == rng[1])
|
||||||
|
else ('#' + str(rng[0]) + '-' + str(rng[1]))
|
||||||
|
)
|
||||||
)
|
)
|
||||||
pvval = ''
|
pvval = ''
|
||||||
if trophy_type is not None:
|
if trophy_type is not None:
|
||||||
|
|||||||
@ -52,7 +52,7 @@ if TYPE_CHECKING:
|
|||||||
|
|
||||||
# Build number and version of the ballistica binary we expect to be
|
# Build number and version of the ballistica binary we expect to be
|
||||||
# using.
|
# using.
|
||||||
TARGET_BALLISTICA_BUILD = 21772
|
TARGET_BALLISTICA_BUILD = 21775
|
||||||
TARGET_BALLISTICA_VERSION = '1.7.33'
|
TARGET_BALLISTICA_VERSION = '1.7.33'
|
||||||
|
|
||||||
|
|
||||||
@ -264,6 +264,10 @@ def _calc_data_dir(data_dir: str | None) -> str:
|
|||||||
def _setup_logging() -> LogHandler:
|
def _setup_logging() -> LogHandler:
|
||||||
from efro.log import setup_logging, LogLevel
|
from efro.log import setup_logging, LogLevel
|
||||||
|
|
||||||
|
# TODO: should set this up with individual loggers under a top level
|
||||||
|
# 'ba' logger, and at that point we can kill off the
|
||||||
|
# suppress_non_root_debug option since we'll only ever need to set
|
||||||
|
# 'ba' to DEBUG at most.
|
||||||
log_handler = setup_logging(
|
log_handler = setup_logging(
|
||||||
log_path=None,
|
log_path=None,
|
||||||
level=LogLevel.DEBUG,
|
level=LogLevel.DEBUG,
|
||||||
|
|||||||
@ -57,8 +57,7 @@ class CloudSubsystem(babase.AppSubsystem):
|
|||||||
on_response: Callable[
|
on_response: Callable[
|
||||||
[bacommon.cloud.LoginProxyRequestResponse | Exception], None
|
[bacommon.cloud.LoginProxyRequestResponse | Exception], None
|
||||||
],
|
],
|
||||||
) -> None:
|
) -> None: ...
|
||||||
...
|
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
def send_message_cb(
|
def send_message_cb(
|
||||||
@ -67,24 +66,21 @@ class CloudSubsystem(babase.AppSubsystem):
|
|||||||
on_response: Callable[
|
on_response: Callable[
|
||||||
[bacommon.cloud.LoginProxyStateQueryResponse | Exception], None
|
[bacommon.cloud.LoginProxyStateQueryResponse | Exception], None
|
||||||
],
|
],
|
||||||
) -> None:
|
) -> None: ...
|
||||||
...
|
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
def send_message_cb(
|
def send_message_cb(
|
||||||
self,
|
self,
|
||||||
msg: bacommon.cloud.LoginProxyCompleteMessage,
|
msg: bacommon.cloud.LoginProxyCompleteMessage,
|
||||||
on_response: Callable[[None | Exception], None],
|
on_response: Callable[[None | Exception], None],
|
||||||
) -> None:
|
) -> None: ...
|
||||||
...
|
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
def send_message_cb(
|
def send_message_cb(
|
||||||
self,
|
self,
|
||||||
msg: bacommon.cloud.PingMessage,
|
msg: bacommon.cloud.PingMessage,
|
||||||
on_response: Callable[[bacommon.cloud.PingResponse | Exception], None],
|
on_response: Callable[[bacommon.cloud.PingResponse | Exception], None],
|
||||||
) -> None:
|
) -> None: ...
|
||||||
...
|
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
def send_message_cb(
|
def send_message_cb(
|
||||||
@ -93,8 +89,7 @@ class CloudSubsystem(babase.AppSubsystem):
|
|||||||
on_response: Callable[
|
on_response: Callable[
|
||||||
[bacommon.cloud.SignInResponse | Exception], None
|
[bacommon.cloud.SignInResponse | Exception], None
|
||||||
],
|
],
|
||||||
) -> None:
|
) -> None: ...
|
||||||
...
|
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
def send_message_cb(
|
def send_message_cb(
|
||||||
@ -103,8 +98,7 @@ class CloudSubsystem(babase.AppSubsystem):
|
|||||||
on_response: Callable[
|
on_response: Callable[
|
||||||
[bacommon.cloud.ManageAccountResponse | Exception], None
|
[bacommon.cloud.ManageAccountResponse | Exception], None
|
||||||
],
|
],
|
||||||
) -> None:
|
) -> None: ...
|
||||||
...
|
|
||||||
|
|
||||||
def send_message_cb(
|
def send_message_cb(
|
||||||
self,
|
self,
|
||||||
@ -129,20 +123,17 @@ class CloudSubsystem(babase.AppSubsystem):
|
|||||||
@overload
|
@overload
|
||||||
def send_message(
|
def send_message(
|
||||||
self, msg: bacommon.cloud.WorkspaceFetchMessage
|
self, msg: bacommon.cloud.WorkspaceFetchMessage
|
||||||
) -> bacommon.cloud.WorkspaceFetchResponse:
|
) -> bacommon.cloud.WorkspaceFetchResponse: ...
|
||||||
...
|
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
def send_message(
|
def send_message(
|
||||||
self, msg: bacommon.cloud.MerchAvailabilityMessage
|
self, msg: bacommon.cloud.MerchAvailabilityMessage
|
||||||
) -> bacommon.cloud.MerchAvailabilityResponse:
|
) -> bacommon.cloud.MerchAvailabilityResponse: ...
|
||||||
...
|
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
def send_message(
|
def send_message(
|
||||||
self, msg: bacommon.cloud.TestMessage
|
self, msg: bacommon.cloud.TestMessage
|
||||||
) -> bacommon.cloud.TestResponse:
|
) -> bacommon.cloud.TestResponse: ...
|
||||||
...
|
|
||||||
|
|
||||||
def send_message(self, msg: Message) -> Response | None:
|
def send_message(self, msg: Message) -> Response | None:
|
||||||
"""Synchronously send a message to the cloud.
|
"""Synchronously send a message to the cloud.
|
||||||
@ -154,14 +145,12 @@ class CloudSubsystem(babase.AppSubsystem):
|
|||||||
@overload
|
@overload
|
||||||
async def send_message_async(
|
async def send_message_async(
|
||||||
self, msg: bacommon.cloud.PromoCodeMessage
|
self, msg: bacommon.cloud.PromoCodeMessage
|
||||||
) -> bacommon.cloud.PromoCodeResponse:
|
) -> bacommon.cloud.PromoCodeResponse: ...
|
||||||
...
|
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
async def send_message_async(
|
async def send_message_async(
|
||||||
self, msg: bacommon.cloud.TestMessage
|
self, msg: bacommon.cloud.TestMessage
|
||||||
) -> bacommon.cloud.TestResponse:
|
) -> bacommon.cloud.TestResponse: ...
|
||||||
...
|
|
||||||
|
|
||||||
async def send_message_async(self, msg: Message) -> Response | None:
|
async def send_message_async(self, msg: Message) -> Response | None:
|
||||||
"""Synchronously send a message to the cloud.
|
"""Synchronously send a message to the cloud.
|
||||||
|
|||||||
@ -203,9 +203,11 @@ class ScoreScreenActivity(Activity[EmptyPlayer, EmptyTeam]):
|
|||||||
sval = babase.Lstr(resource='pressAnyButtonText')
|
sval = babase.Lstr(resource='pressAnyButtonText')
|
||||||
|
|
||||||
Text(
|
Text(
|
||||||
self._custom_continue_message
|
(
|
||||||
if self._custom_continue_message is not None
|
self._custom_continue_message
|
||||||
else sval,
|
if self._custom_continue_message is not None
|
||||||
|
else sval
|
||||||
|
),
|
||||||
v_attach=Text.VAttach.BOTTOM,
|
v_attach=Text.VAttach.BOTTOM,
|
||||||
h_align=Text.HAlign.CENTER,
|
h_align=Text.HAlign.CENTER,
|
||||||
flash=True,
|
flash=True,
|
||||||
|
|||||||
@ -198,12 +198,14 @@ class Actor:
|
|||||||
# Overloads to convey our exact return type depending on 'doraise' value.
|
# Overloads to convey our exact return type depending on 'doraise' value.
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
def getactivity(self, doraise: Literal[True] = True) -> bascenev1.Activity:
|
def getactivity(
|
||||||
...
|
self, doraise: Literal[True] = True
|
||||||
|
) -> bascenev1.Activity: ...
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
def getactivity(self, doraise: Literal[False]) -> bascenev1.Activity | None:
|
def getactivity(
|
||||||
...
|
self, doraise: Literal[False]
|
||||||
|
) -> bascenev1.Activity | None: ...
|
||||||
|
|
||||||
def getactivity(self, doraise: bool = True) -> bascenev1.Activity | None:
|
def getactivity(self, doraise: bool = True) -> bascenev1.Activity | None:
|
||||||
"""Return the bascenev1.Activity this Actor is associated with.
|
"""Return the bascenev1.Activity this Actor is associated with.
|
||||||
|
|||||||
@ -42,9 +42,9 @@ class GameResults:
|
|||||||
self._scores: dict[
|
self._scores: dict[
|
||||||
int, tuple[weakref.ref[bascenev1.SessionTeam], int | None]
|
int, tuple[weakref.ref[bascenev1.SessionTeam], int | None]
|
||||||
] = {}
|
] = {}
|
||||||
self._sessionteams: list[
|
self._sessionteams: list[weakref.ref[bascenev1.SessionTeam]] | None = (
|
||||||
weakref.ref[bascenev1.SessionTeam]
|
None
|
||||||
] | None = None
|
)
|
||||||
self._playerinfos: list[bascenev1.PlayerInfo] | None = None
|
self._playerinfos: list[bascenev1.PlayerInfo] | None = None
|
||||||
self._lower_is_better: bool | None = None
|
self._lower_is_better: bool | None = None
|
||||||
self._score_label: str | None = None
|
self._score_label: str | None = None
|
||||||
|
|||||||
@ -73,9 +73,11 @@ class Level:
|
|||||||
return babase.Lstr(
|
return babase.Lstr(
|
||||||
translate=(
|
translate=(
|
||||||
'coopLevelNames',
|
'coopLevelNames',
|
||||||
self._displayname
|
(
|
||||||
if self._displayname is not None
|
self._displayname
|
||||||
else self._name,
|
if self._displayname is not None
|
||||||
|
else self._name
|
||||||
|
),
|
||||||
),
|
),
|
||||||
subs=[
|
subs=[
|
||||||
('${GAME}', self._gametype.get_display_string(self._settings))
|
('${GAME}', self._gametype.get_display_string(self._settings))
|
||||||
|
|||||||
@ -89,18 +89,18 @@ def filter_playlist(
|
|||||||
'bs_king_of_the_hill.KingOfTheHillGame',
|
'bs_king_of_the_hill.KingOfTheHillGame',
|
||||||
'bastd.game.kingofthehill.KingOfTheHillGame',
|
'bastd.game.kingofthehill.KingOfTheHillGame',
|
||||||
):
|
):
|
||||||
entry[
|
entry['type'] = (
|
||||||
'type'
|
'bascenev1lib.game.kingofthehill.KingOfTheHillGame'
|
||||||
] = 'bascenev1lib.game.kingofthehill.KingOfTheHillGame'
|
)
|
||||||
if entry['type'] in (
|
if entry['type'] in (
|
||||||
'Capture_the_Flag.CTFGame',
|
'Capture_the_Flag.CTFGame',
|
||||||
'bsCaptureTheFlag.CTFGame',
|
'bsCaptureTheFlag.CTFGame',
|
||||||
'bs_capture_the_flag.CTFGame',
|
'bs_capture_the_flag.CTFGame',
|
||||||
'bastd.game.capturetheflag.CaptureTheFlagGame',
|
'bastd.game.capturetheflag.CaptureTheFlagGame',
|
||||||
):
|
):
|
||||||
entry[
|
entry['type'] = (
|
||||||
'type'
|
'bascenev1lib.game.capturetheflag.CaptureTheFlagGame'
|
||||||
] = 'bascenev1lib.game.capturetheflag.CaptureTheFlagGame'
|
)
|
||||||
if entry['type'] in (
|
if entry['type'] in (
|
||||||
'Death_Match.DeathMatchGame',
|
'Death_Match.DeathMatchGame',
|
||||||
'bsDeathMatch.DeathMatchGame',
|
'bsDeathMatch.DeathMatchGame',
|
||||||
@ -163,25 +163,25 @@ def filter_playlist(
|
|||||||
'bs_easter_egg_hunt.EasterEggHuntGame',
|
'bs_easter_egg_hunt.EasterEggHuntGame',
|
||||||
'bastd.game.easteregghunt.EasterEggHuntGame',
|
'bastd.game.easteregghunt.EasterEggHuntGame',
|
||||||
):
|
):
|
||||||
entry[
|
entry['type'] = (
|
||||||
'type'
|
'bascenev1lib.game.easteregghunt.EasterEggHuntGame'
|
||||||
] = 'bascenev1lib.game.easteregghunt.EasterEggHuntGame'
|
)
|
||||||
if entry['type'] in (
|
if entry['type'] in (
|
||||||
'bsMeteorShower.MeteorShowerGame',
|
'bsMeteorShower.MeteorShowerGame',
|
||||||
'bs_meteor_shower.MeteorShowerGame',
|
'bs_meteor_shower.MeteorShowerGame',
|
||||||
'bastd.game.meteorshower.MeteorShowerGame',
|
'bastd.game.meteorshower.MeteorShowerGame',
|
||||||
):
|
):
|
||||||
entry[
|
entry['type'] = (
|
||||||
'type'
|
'bascenev1lib.game.meteorshower.MeteorShowerGame'
|
||||||
] = 'bascenev1lib.game.meteorshower.MeteorShowerGame'
|
)
|
||||||
if entry['type'] in (
|
if entry['type'] in (
|
||||||
'bsTargetPractice.TargetPracticeGame',
|
'bsTargetPractice.TargetPracticeGame',
|
||||||
'bs_target_practice.TargetPracticeGame',
|
'bs_target_practice.TargetPracticeGame',
|
||||||
'bastd.game.targetpractice.TargetPracticeGame',
|
'bastd.game.targetpractice.TargetPracticeGame',
|
||||||
):
|
):
|
||||||
entry[
|
entry['type'] = (
|
||||||
'type'
|
'bascenev1lib.game.targetpractice.TargetPracticeGame'
|
||||||
] = 'bascenev1lib.game.targetpractice.TargetPracticeGame'
|
)
|
||||||
|
|
||||||
gameclass = babase.getclass(entry['type'], GameActivity)
|
gameclass = babase.getclass(entry['type'], GameActivity)
|
||||||
|
|
||||||
|
|||||||
@ -395,11 +395,15 @@ class CoopScoreScreen(bs.Activity[bs.Player, bs.Team]):
|
|||||||
color=(0.45, 0.4, 0.5),
|
color=(0.45, 0.4, 0.5),
|
||||||
position=(160, v_offs + 480),
|
position=(160, v_offs + 480),
|
||||||
size=(350, 62),
|
size=(350, 62),
|
||||||
label=bui.Lstr(resource='tournamentStandingsText')
|
label=(
|
||||||
if self.session.tournament_id is not None
|
bui.Lstr(resource='tournamentStandingsText')
|
||||||
else bui.Lstr(resource='worldsBestScoresText')
|
if self.session.tournament_id is not None
|
||||||
if self._score_type == 'points'
|
else (
|
||||||
else bui.Lstr(resource='worldsBestTimesText'),
|
bui.Lstr(resource='worldsBestScoresText')
|
||||||
|
if self._score_type == 'points'
|
||||||
|
else bui.Lstr(resource='worldsBestTimesText')
|
||||||
|
)
|
||||||
|
),
|
||||||
autoselect=True,
|
autoselect=True,
|
||||||
on_activate_call=bui.WeakCall(self._ui_worlds_best),
|
on_activate_call=bui.WeakCall(self._ui_worlds_best),
|
||||||
transition_delay=delay + 1.9,
|
transition_delay=delay + 1.9,
|
||||||
@ -515,9 +519,11 @@ class CoopScoreScreen(bs.Activity[bs.Player, bs.Team]):
|
|||||||
|
|
||||||
bui.containerwidget(
|
bui.containerwidget(
|
||||||
edit=rootc,
|
edit=rootc,
|
||||||
selected_child=next_button
|
selected_child=(
|
||||||
if (self._newly_complete and self._victory and show_next_button)
|
next_button
|
||||||
else restart_button,
|
if (self._newly_complete and self._victory and show_next_button)
|
||||||
|
else restart_button
|
||||||
|
),
|
||||||
on_cancel_call=menu_button.activate,
|
on_cancel_call=menu_button.activate,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -644,14 +650,16 @@ class CoopScoreScreen(bs.Activity[bs.Player, bs.Team]):
|
|||||||
and not (env.demo or env.arcade)
|
and not (env.demo or env.arcade)
|
||||||
):
|
):
|
||||||
Text(
|
Text(
|
||||||
bs.Lstr(
|
(
|
||||||
value='${A}:\n',
|
bs.Lstr(
|
||||||
subs=[('${A}', bs.Lstr(resource='levelUnlockedText'))],
|
value='${A}:\n',
|
||||||
)
|
subs=[('${A}', bs.Lstr(resource='levelUnlockedText'))],
|
||||||
if self._newly_complete
|
)
|
||||||
else bs.Lstr(
|
if self._newly_complete
|
||||||
value='${A}:\n',
|
else bs.Lstr(
|
||||||
subs=[('${A}', bs.Lstr(resource='nextLevelText'))],
|
value='${A}:\n',
|
||||||
|
subs=[('${A}', bs.Lstr(resource='nextLevelText'))],
|
||||||
|
)
|
||||||
),
|
),
|
||||||
transition=Text.Transition.IN_RIGHT,
|
transition=Text.Transition.IN_RIGHT,
|
||||||
transition_delay=5.2,
|
transition_delay=5.2,
|
||||||
@ -860,11 +868,15 @@ class CoopScoreScreen(bs.Activity[bs.Player, bs.Team]):
|
|||||||
ts_h_offs = 210
|
ts_h_offs = 210
|
||||||
v_offs = 40
|
v_offs = 40
|
||||||
txt = Text(
|
txt = Text(
|
||||||
bs.Lstr(resource='tournamentStandingsText')
|
(
|
||||||
if self.session.tournament_id is not None
|
bs.Lstr(resource='tournamentStandingsText')
|
||||||
else bs.Lstr(resource='worldsBestScoresText')
|
if self.session.tournament_id is not None
|
||||||
if self._score_type == 'points'
|
else (
|
||||||
else bs.Lstr(resource='worldsBestTimesText'),
|
bs.Lstr(resource='worldsBestScoresText')
|
||||||
|
if self._score_type == 'points'
|
||||||
|
else bs.Lstr(resource='worldsBestTimesText')
|
||||||
|
)
|
||||||
|
),
|
||||||
maxwidth=210,
|
maxwidth=210,
|
||||||
position=(ts_h_offs - 10, ts_height / 2 + 25 + v_offs + 20),
|
position=(ts_h_offs - 10, ts_height / 2 + 25 + v_offs + 20),
|
||||||
transition=Text.Transition.IN_LEFT,
|
transition=Text.Transition.IN_LEFT,
|
||||||
@ -882,9 +894,11 @@ class CoopScoreScreen(bs.Activity[bs.Player, bs.Team]):
|
|||||||
ts_h_offs = -480
|
ts_h_offs = -480
|
||||||
v_offs = 40
|
v_offs = 40
|
||||||
Text(
|
Text(
|
||||||
bs.Lstr(resource='yourBestScoresText')
|
(
|
||||||
if self._score_type == 'points'
|
bs.Lstr(resource='yourBestScoresText')
|
||||||
else bs.Lstr(resource='yourBestTimesText'),
|
if self._score_type == 'points'
|
||||||
|
else bs.Lstr(resource='yourBestTimesText')
|
||||||
|
),
|
||||||
maxwidth=210,
|
maxwidth=210,
|
||||||
position=(ts_h_offs - 10, ts_height / 2 + 25 + v_offs + 20),
|
position=(ts_h_offs - 10, ts_height / 2 + 25 + v_offs + 20),
|
||||||
transition=Text.Transition.IN_RIGHT,
|
transition=Text.Transition.IN_RIGHT,
|
||||||
@ -948,9 +962,11 @@ class CoopScoreScreen(bs.Activity[bs.Player, bs.Team]):
|
|||||||
tdelay1 = times[i][0]
|
tdelay1 = times[i][0]
|
||||||
tdelay2 = times[i][1]
|
tdelay2 = times[i][1]
|
||||||
Text(
|
Text(
|
||||||
str(display_scores[i][0])
|
(
|
||||||
if self._score_type == 'points'
|
str(display_scores[i][0])
|
||||||
else bs.timestring((display_scores[i][0] * 10) / 1000.0),
|
if self._score_type == 'points'
|
||||||
|
else bs.timestring((display_scores[i][0] * 10) / 1000.0)
|
||||||
|
),
|
||||||
position=(
|
position=(
|
||||||
ts_h_offs + 20 + h_offs_extra,
|
ts_h_offs + 20 + h_offs_extra,
|
||||||
v_offs_extra
|
v_offs_extra
|
||||||
@ -1127,9 +1143,11 @@ class CoopScoreScreen(bs.Activity[bs.Player, bs.Team]):
|
|||||||
tdelay2 = times[i][1]
|
tdelay2 = times[i][1]
|
||||||
if name_str != '-':
|
if name_str != '-':
|
||||||
Text(
|
Text(
|
||||||
str(score)
|
(
|
||||||
if self._score_type == 'points'
|
str(score)
|
||||||
else bs.timestring((score * 10) / 1000.0),
|
if self._score_type == 'points'
|
||||||
|
else bs.timestring((score * 10) / 1000.0)
|
||||||
|
),
|
||||||
position=(
|
position=(
|
||||||
ts_h_offs + 20 + h_offs_extra,
|
ts_h_offs + 20 + h_offs_extra,
|
||||||
v_offs_extra
|
v_offs_extra
|
||||||
@ -1313,9 +1331,11 @@ class CoopScoreScreen(bs.Activity[bs.Player, bs.Team]):
|
|||||||
|
|
||||||
if name_str != '-':
|
if name_str != '-':
|
||||||
Text(
|
Text(
|
||||||
str(score)
|
(
|
||||||
if self._score_type == 'points'
|
str(score)
|
||||||
else bs.timestring((score * 10) / 1000.0),
|
if self._score_type == 'points'
|
||||||
|
else bs.timestring((score * 10) / 1000.0)
|
||||||
|
),
|
||||||
position=(
|
position=(
|
||||||
ts_h_offs + 20 + h_offs_extra,
|
ts_h_offs + 20 + h_offs_extra,
|
||||||
ts_height / 2
|
ts_height / 2
|
||||||
@ -1689,17 +1709,22 @@ class CoopScoreScreen(bs.Activity[bs.Player, bs.Team]):
|
|||||||
)
|
)
|
||||||
if not self._newly_complete:
|
if not self._newly_complete:
|
||||||
Text(
|
Text(
|
||||||
bs.Lstr(
|
(
|
||||||
value='${A}${B}',
|
bs.Lstr(
|
||||||
subs=[
|
value='${A}${B}',
|
||||||
('${A}', bs.Lstr(resource='newPersonalBestText')),
|
subs=[
|
||||||
('${B}', was_string),
|
(
|
||||||
],
|
'${A}',
|
||||||
)
|
bs.Lstr(resource='newPersonalBestText'),
|
||||||
if new_best
|
),
|
||||||
else bs.Lstr(
|
('${B}', was_string),
|
||||||
resource='bestRatingText',
|
],
|
||||||
subs=[('${RATING}', str(best_rank))],
|
)
|
||||||
|
if new_best
|
||||||
|
else bs.Lstr(
|
||||||
|
resource='bestRatingText',
|
||||||
|
subs=[('${RATING}', str(best_rank))],
|
||||||
|
)
|
||||||
),
|
),
|
||||||
position=(0, -165),
|
position=(0, -165),
|
||||||
color=(1, 1, 1, 0.7),
|
color=(1, 1, 1, 0.7),
|
||||||
@ -1773,14 +1798,16 @@ class CoopScoreScreen(bs.Activity[bs.Player, bs.Team]):
|
|||||||
jitter=1.0,
|
jitter=1.0,
|
||||||
).autoretain()
|
).autoretain()
|
||||||
Text(
|
Text(
|
||||||
bs.Lstr(
|
(
|
||||||
value='${A}:',
|
bs.Lstr(
|
||||||
subs=[('${A}', bs.Lstr(resource='finalScoreText'))],
|
value='${A}:',
|
||||||
)
|
subs=[('${A}', bs.Lstr(resource='finalScoreText'))],
|
||||||
if self._score_type == 'points'
|
)
|
||||||
else bs.Lstr(
|
if self._score_type == 'points'
|
||||||
value='${A}:',
|
else bs.Lstr(
|
||||||
subs=[('${A}', bs.Lstr(resource='finalTimeText'))],
|
value='${A}:',
|
||||||
|
subs=[('${A}', bs.Lstr(resource='finalTimeText'))],
|
||||||
|
)
|
||||||
),
|
),
|
||||||
maxwidth=300,
|
maxwidth=300,
|
||||||
position=(0, 200),
|
position=(0, 200),
|
||||||
|
|||||||
@ -199,9 +199,9 @@ class MultiTeamScoreScreenActivity(bs.ScoreScreenActivity):
|
|||||||
ts_v_offset + (voffs + 15) * scale,
|
ts_v_offset + (voffs + 15) * scale,
|
||||||
),
|
),
|
||||||
scale=scale,
|
scale=scale,
|
||||||
color=(1.0, 0.9, 0.5, 1.0)
|
color=(
|
||||||
if highlight
|
(1.0, 0.9, 0.5, 1.0) if highlight else (0.5, 0.5, 0.6, 0.5)
|
||||||
else (0.5, 0.5, 0.6, 0.5),
|
),
|
||||||
h_align=Text.HAlign.RIGHT,
|
h_align=Text.HAlign.RIGHT,
|
||||||
v_align=Text.VAlign.CENTER,
|
v_align=Text.VAlign.CENTER,
|
||||||
maxwidth=maxwidth,
|
maxwidth=maxwidth,
|
||||||
|
|||||||
@ -374,9 +374,11 @@ class TeamSeriesVictoryScoreScreenActivity(MultiTeamScoreScreenActivity):
|
|||||||
tdelay -= 4 * t_incr
|
tdelay -= 4 * t_incr
|
||||||
v_offs -= 40
|
v_offs -= 40
|
||||||
Text(
|
Text(
|
||||||
str(prec.team.customdata['score'])
|
(
|
||||||
if self._is_ffa
|
str(prec.team.customdata['score'])
|
||||||
else str(prec.score),
|
if self._is_ffa
|
||||||
|
else str(prec.score)
|
||||||
|
),
|
||||||
color=(0.5, 0.5, 0.5, 1.0),
|
color=(0.5, 0.5, 0.5, 1.0),
|
||||||
position=(ts_h_offs + 230, ts_height / 2 + v_offs),
|
position=(ts_h_offs + 230, ts_height / 2 + v_offs),
|
||||||
h_align=Text.HAlign.RIGHT,
|
h_align=Text.HAlign.RIGHT,
|
||||||
|
|||||||
@ -456,9 +456,11 @@ class ControlsGuide(bs.Actor):
|
|||||||
(
|
(
|
||||||
'${B}',
|
'${B}',
|
||||||
bs.Lstr(
|
bs.Lstr(
|
||||||
resource='holdAnyKeyText'
|
resource=(
|
||||||
if all_keyboards
|
'holdAnyKeyText'
|
||||||
else 'holdAnyButtonText'
|
if all_keyboards
|
||||||
|
else 'holdAnyButtonText'
|
||||||
|
)
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|||||||
@ -79,14 +79,12 @@ class PlayerSpaz(Spaz):
|
|||||||
@overload
|
@overload
|
||||||
def getplayer(
|
def getplayer(
|
||||||
self, playertype: type[PlayerT], doraise: Literal[False] = False
|
self, playertype: type[PlayerT], doraise: Literal[False] = False
|
||||||
) -> PlayerT | None:
|
) -> PlayerT | None: ...
|
||||||
...
|
|
||||||
|
|
||||||
@overload
|
@overload
|
||||||
def getplayer(
|
def getplayer(
|
||||||
self, playertype: type[PlayerT], doraise: Literal[True]
|
self, playertype: type[PlayerT], doraise: Literal[True]
|
||||||
) -> PlayerT:
|
) -> PlayerT: ...
|
||||||
...
|
|
||||||
|
|
||||||
def getplayer(
|
def getplayer(
|
||||||
self, playertype: type[PlayerT], doraise: bool = False
|
self, playertype: type[PlayerT], doraise: bool = False
|
||||||
|
|||||||
@ -73,9 +73,11 @@ class TipsText(bs.Actor):
|
|||||||
next_tip = bs.Lstr(
|
next_tip = bs.Lstr(
|
||||||
translate=(
|
translate=(
|
||||||
'tips',
|
'tips',
|
||||||
bs.app.classic.get_next_tip()
|
(
|
||||||
if bs.app.classic is not None
|
bs.app.classic.get_next_tip()
|
||||||
else '',
|
if bs.app.classic is not None
|
||||||
|
else ''
|
||||||
|
),
|
||||||
),
|
),
|
||||||
subs=[('${REMOTE_APP_NAME}', get_remote_app_name())],
|
subs=[('${REMOTE_APP_NAME}', get_remote_app_name())],
|
||||||
)
|
)
|
||||||
|
|||||||
@ -334,29 +334,37 @@ class OnslaughtGame(bs.CoopGameActivity[Player, Team]):
|
|||||||
Wave(
|
Wave(
|
||||||
base_angle=130,
|
base_angle=130,
|
||||||
entries=[
|
entries=[
|
||||||
Spawn(BrawlerBotLite, spacing=5)
|
(
|
||||||
if player_count > 1
|
Spawn(BrawlerBotLite, spacing=5)
|
||||||
else None,
|
if player_count > 1
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spawn(BrawlerBotLite, spacing=5),
|
Spawn(BrawlerBotLite, spacing=5),
|
||||||
Spacing(30),
|
Spacing(30),
|
||||||
Spawn(BomberBotLite, spacing=5)
|
(
|
||||||
if player_count > 3
|
Spawn(BomberBotLite, spacing=5)
|
||||||
else None,
|
if player_count > 3
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spawn(BomberBotLite, spacing=5),
|
Spawn(BomberBotLite, spacing=5),
|
||||||
Spacing(30),
|
Spacing(30),
|
||||||
Spawn(BrawlerBotLite, spacing=5),
|
Spawn(BrawlerBotLite, spacing=5),
|
||||||
Spawn(BrawlerBotLite, spacing=5)
|
(
|
||||||
if player_count > 2
|
Spawn(BrawlerBotLite, spacing=5)
|
||||||
else None,
|
if player_count > 2
|
||||||
|
else None
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Wave(
|
Wave(
|
||||||
base_angle=195,
|
base_angle=195,
|
||||||
entries=[
|
entries=[
|
||||||
Spawn(TriggerBot, spacing=90),
|
Spawn(TriggerBot, spacing=90),
|
||||||
Spawn(TriggerBot, spacing=90)
|
(
|
||||||
if player_count > 1
|
Spawn(TriggerBot, spacing=90)
|
||||||
else None,
|
if player_count > 1
|
||||||
|
else None
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
@ -367,9 +375,11 @@ class OnslaughtGame(bs.CoopGameActivity[Player, Team]):
|
|||||||
self._waves = [
|
self._waves = [
|
||||||
Wave(
|
Wave(
|
||||||
entries=[
|
entries=[
|
||||||
Spawn(ChargerBot, Point.LEFT_UPPER_MORE)
|
(
|
||||||
if player_count > 2
|
Spawn(ChargerBot, Point.LEFT_UPPER_MORE)
|
||||||
else None,
|
if player_count > 2
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spawn(ChargerBot, Point.LEFT_UPPER),
|
Spawn(ChargerBot, Point.LEFT_UPPER),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
@ -377,36 +387,50 @@ class OnslaughtGame(bs.CoopGameActivity[Player, Team]):
|
|||||||
entries=[
|
entries=[
|
||||||
Spawn(BomberBotStaticLite, Point.TURRET_TOP_RIGHT),
|
Spawn(BomberBotStaticLite, Point.TURRET_TOP_RIGHT),
|
||||||
Spawn(BrawlerBotLite, Point.RIGHT_UPPER),
|
Spawn(BrawlerBotLite, Point.RIGHT_UPPER),
|
||||||
Spawn(BrawlerBotLite, Point.RIGHT_LOWER)
|
(
|
||||||
if player_count > 1
|
Spawn(BrawlerBotLite, Point.RIGHT_LOWER)
|
||||||
else None,
|
if player_count > 1
|
||||||
Spawn(BomberBotStaticLite, Point.TURRET_BOTTOM_RIGHT)
|
else None
|
||||||
if player_count > 2
|
),
|
||||||
else None,
|
(
|
||||||
|
Spawn(
|
||||||
|
BomberBotStaticLite, Point.TURRET_BOTTOM_RIGHT
|
||||||
|
)
|
||||||
|
if player_count > 2
|
||||||
|
else None
|
||||||
|
),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
Wave(
|
Wave(
|
||||||
entries=[
|
entries=[
|
||||||
Spawn(BomberBotStaticLite, Point.TURRET_BOTTOM_LEFT),
|
Spawn(BomberBotStaticLite, Point.TURRET_BOTTOM_LEFT),
|
||||||
Spawn(TriggerBot, Point.LEFT),
|
Spawn(TriggerBot, Point.LEFT),
|
||||||
Spawn(TriggerBot, Point.LEFT_LOWER)
|
(
|
||||||
if player_count > 1
|
Spawn(TriggerBot, Point.LEFT_LOWER)
|
||||||
else None,
|
if player_count > 1
|
||||||
Spawn(TriggerBot, Point.LEFT_UPPER)
|
else None
|
||||||
if player_count > 2
|
),
|
||||||
else None,
|
(
|
||||||
|
Spawn(TriggerBot, Point.LEFT_UPPER)
|
||||||
|
if player_count > 2
|
||||||
|
else None
|
||||||
|
),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
Wave(
|
Wave(
|
||||||
entries=[
|
entries=[
|
||||||
Spawn(BrawlerBotLite, Point.TOP_RIGHT),
|
Spawn(BrawlerBotLite, Point.TOP_RIGHT),
|
||||||
Spawn(BrawlerBot, Point.TOP_HALF_RIGHT)
|
(
|
||||||
if player_count > 1
|
Spawn(BrawlerBot, Point.TOP_HALF_RIGHT)
|
||||||
else None,
|
if player_count > 1
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spawn(BrawlerBotLite, Point.TOP_LEFT),
|
Spawn(BrawlerBotLite, Point.TOP_LEFT),
|
||||||
Spawn(BrawlerBotLite, Point.TOP_HALF_LEFT)
|
(
|
||||||
if player_count > 2
|
Spawn(BrawlerBotLite, Point.TOP_HALF_LEFT)
|
||||||
else None,
|
if player_count > 2
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spawn(BrawlerBot, Point.TOP),
|
Spawn(BrawlerBot, Point.TOP),
|
||||||
Spawn(BomberBotStaticLite, Point.TURRET_TOP_MIDDLE),
|
Spawn(BomberBotStaticLite, Point.TURRET_TOP_MIDDLE),
|
||||||
]
|
]
|
||||||
@ -416,12 +440,16 @@ class OnslaughtGame(bs.CoopGameActivity[Player, Team]):
|
|||||||
Spawn(TriggerBotStatic, Point.TURRET_BOTTOM_LEFT),
|
Spawn(TriggerBotStatic, Point.TURRET_BOTTOM_LEFT),
|
||||||
Spawn(TriggerBotStatic, Point.TURRET_BOTTOM_RIGHT),
|
Spawn(TriggerBotStatic, Point.TURRET_BOTTOM_RIGHT),
|
||||||
Spawn(TriggerBot, Point.BOTTOM),
|
Spawn(TriggerBot, Point.BOTTOM),
|
||||||
Spawn(TriggerBot, Point.BOTTOM_HALF_RIGHT)
|
(
|
||||||
if player_count > 1
|
Spawn(TriggerBot, Point.BOTTOM_HALF_RIGHT)
|
||||||
else None,
|
if player_count > 1
|
||||||
Spawn(TriggerBot, Point.BOTTOM_HALF_LEFT)
|
else None
|
||||||
if player_count > 2
|
),
|
||||||
else None,
|
(
|
||||||
|
Spawn(TriggerBot, Point.BOTTOM_HALF_LEFT)
|
||||||
|
if player_count > 2
|
||||||
|
else None
|
||||||
|
),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
Wave(
|
Wave(
|
||||||
@ -429,12 +457,16 @@ class OnslaughtGame(bs.CoopGameActivity[Player, Team]):
|
|||||||
Spawn(BomberBotStaticLite, Point.TURRET_TOP_LEFT),
|
Spawn(BomberBotStaticLite, Point.TURRET_TOP_LEFT),
|
||||||
Spawn(BomberBotStaticLite, Point.TURRET_TOP_RIGHT),
|
Spawn(BomberBotStaticLite, Point.TURRET_TOP_RIGHT),
|
||||||
Spawn(ChargerBot, Point.BOTTOM),
|
Spawn(ChargerBot, Point.BOTTOM),
|
||||||
Spawn(ChargerBot, Point.BOTTOM_HALF_LEFT)
|
(
|
||||||
if player_count > 1
|
Spawn(ChargerBot, Point.BOTTOM_HALF_LEFT)
|
||||||
else None,
|
if player_count > 1
|
||||||
Spawn(ChargerBot, Point.BOTTOM_HALF_RIGHT)
|
else None
|
||||||
if player_count > 2
|
),
|
||||||
else None,
|
(
|
||||||
|
Spawn(ChargerBot, Point.BOTTOM_HALF_RIGHT)
|
||||||
|
if player_count > 2
|
||||||
|
else None
|
||||||
|
),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
@ -446,44 +478,62 @@ class OnslaughtGame(bs.CoopGameActivity[Player, Team]):
|
|||||||
Wave(
|
Wave(
|
||||||
base_angle=-50,
|
base_angle=-50,
|
||||||
entries=[
|
entries=[
|
||||||
Spawn(BrawlerBot, spacing=12)
|
(
|
||||||
if player_count > 3
|
Spawn(BrawlerBot, spacing=12)
|
||||||
else None,
|
if player_count > 3
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spawn(BrawlerBot, spacing=12),
|
Spawn(BrawlerBot, spacing=12),
|
||||||
Spawn(BomberBot, spacing=6),
|
Spawn(BomberBot, spacing=6),
|
||||||
Spawn(BomberBot, spacing=6)
|
(
|
||||||
if self._preset is Preset.PRO
|
Spawn(BomberBot, spacing=6)
|
||||||
else None,
|
if self._preset is Preset.PRO
|
||||||
Spawn(BomberBot, spacing=6)
|
else None
|
||||||
if player_count > 1
|
),
|
||||||
else None,
|
(
|
||||||
|
Spawn(BomberBot, spacing=6)
|
||||||
|
if player_count > 1
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spawn(BrawlerBot, spacing=12),
|
Spawn(BrawlerBot, spacing=12),
|
||||||
Spawn(BrawlerBot, spacing=12)
|
(
|
||||||
if player_count > 2
|
Spawn(BrawlerBot, spacing=12)
|
||||||
else None,
|
if player_count > 2
|
||||||
|
else None
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Wave(
|
Wave(
|
||||||
base_angle=180,
|
base_angle=180,
|
||||||
entries=[
|
entries=[
|
||||||
Spawn(BrawlerBot, spacing=6)
|
(
|
||||||
if player_count > 3
|
Spawn(BrawlerBot, spacing=6)
|
||||||
else None,
|
if player_count > 3
|
||||||
Spawn(BrawlerBot, spacing=6)
|
else None
|
||||||
if self._preset is Preset.PRO
|
),
|
||||||
else None,
|
(
|
||||||
|
Spawn(BrawlerBot, spacing=6)
|
||||||
|
if self._preset is Preset.PRO
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spawn(BrawlerBot, spacing=6),
|
Spawn(BrawlerBot, spacing=6),
|
||||||
Spawn(ChargerBot, spacing=45),
|
Spawn(ChargerBot, spacing=45),
|
||||||
Spawn(ChargerBot, spacing=45)
|
(
|
||||||
if player_count > 1
|
Spawn(ChargerBot, spacing=45)
|
||||||
else None,
|
if player_count > 1
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spawn(BrawlerBot, spacing=6),
|
Spawn(BrawlerBot, spacing=6),
|
||||||
Spawn(BrawlerBot, spacing=6)
|
(
|
||||||
if self._preset is Preset.PRO
|
Spawn(BrawlerBot, spacing=6)
|
||||||
else None,
|
if self._preset is Preset.PRO
|
||||||
Spawn(BrawlerBot, spacing=6)
|
else None
|
||||||
if player_count > 2
|
),
|
||||||
else None,
|
(
|
||||||
|
Spawn(BrawlerBot, spacing=6)
|
||||||
|
if player_count > 2
|
||||||
|
else None
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Wave(
|
Wave(
|
||||||
@ -492,15 +542,21 @@ class OnslaughtGame(bs.CoopGameActivity[Player, Team]):
|
|||||||
Spawn(ChargerBot, spacing=30),
|
Spawn(ChargerBot, spacing=30),
|
||||||
Spawn(TriggerBot, spacing=30),
|
Spawn(TriggerBot, spacing=30),
|
||||||
Spawn(TriggerBot, spacing=30),
|
Spawn(TriggerBot, spacing=30),
|
||||||
Spawn(TriggerBot, spacing=30)
|
(
|
||||||
if self._preset is Preset.PRO
|
Spawn(TriggerBot, spacing=30)
|
||||||
else None,
|
if self._preset is Preset.PRO
|
||||||
Spawn(TriggerBot, spacing=30)
|
else None
|
||||||
if player_count > 1
|
),
|
||||||
else None,
|
(
|
||||||
Spawn(TriggerBot, spacing=30)
|
Spawn(TriggerBot, spacing=30)
|
||||||
if player_count > 3
|
if player_count > 1
|
||||||
else None,
|
else None
|
||||||
|
),
|
||||||
|
(
|
||||||
|
Spawn(TriggerBot, spacing=30)
|
||||||
|
if player_count > 3
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spawn(ChargerBot, spacing=30),
|
Spawn(ChargerBot, spacing=30),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
@ -508,16 +564,22 @@ class OnslaughtGame(bs.CoopGameActivity[Player, Team]):
|
|||||||
base_angle=90,
|
base_angle=90,
|
||||||
entries=[
|
entries=[
|
||||||
Spawn(StickyBot, spacing=50),
|
Spawn(StickyBot, spacing=50),
|
||||||
Spawn(StickyBot, spacing=50)
|
(
|
||||||
if self._preset is Preset.PRO
|
Spawn(StickyBot, spacing=50)
|
||||||
else None,
|
if self._preset is Preset.PRO
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spawn(StickyBot, spacing=50),
|
Spawn(StickyBot, spacing=50),
|
||||||
Spawn(StickyBot, spacing=50)
|
(
|
||||||
if player_count > 1
|
Spawn(StickyBot, spacing=50)
|
||||||
else None,
|
if player_count > 1
|
||||||
Spawn(StickyBot, spacing=50)
|
else None
|
||||||
if player_count > 3
|
),
|
||||||
else None,
|
(
|
||||||
|
Spawn(StickyBot, spacing=50)
|
||||||
|
if player_count > 3
|
||||||
|
else None
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Wave(
|
Wave(
|
||||||
@ -525,14 +587,18 @@ class OnslaughtGame(bs.CoopGameActivity[Player, Team]):
|
|||||||
entries=[
|
entries=[
|
||||||
Spawn(TriggerBot, spacing=72),
|
Spawn(TriggerBot, spacing=72),
|
||||||
Spawn(TriggerBot, spacing=72),
|
Spawn(TriggerBot, spacing=72),
|
||||||
Spawn(TriggerBot, spacing=72)
|
(
|
||||||
if self._preset is Preset.PRO
|
Spawn(TriggerBot, spacing=72)
|
||||||
else None,
|
if self._preset is Preset.PRO
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spawn(TriggerBot, spacing=72),
|
Spawn(TriggerBot, spacing=72),
|
||||||
Spawn(TriggerBot, spacing=72),
|
Spawn(TriggerBot, spacing=72),
|
||||||
Spawn(TriggerBot, spacing=36)
|
(
|
||||||
if player_count > 2
|
Spawn(TriggerBot, spacing=36)
|
||||||
else None,
|
if player_count > 2
|
||||||
|
else None
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
Wave(
|
Wave(
|
||||||
@ -540,15 +606,21 @@ class OnslaughtGame(bs.CoopGameActivity[Player, Team]):
|
|||||||
entries=[
|
entries=[
|
||||||
Spawn(ChargerBotProShielded, spacing=50),
|
Spawn(ChargerBotProShielded, spacing=50),
|
||||||
Spawn(ChargerBotProShielded, spacing=50),
|
Spawn(ChargerBotProShielded, spacing=50),
|
||||||
Spawn(ChargerBotProShielded, spacing=50)
|
(
|
||||||
if self._preset is Preset.PRO
|
Spawn(ChargerBotProShielded, spacing=50)
|
||||||
else None,
|
if self._preset is Preset.PRO
|
||||||
Spawn(ChargerBotProShielded, spacing=50)
|
else None
|
||||||
if player_count > 1
|
),
|
||||||
else None,
|
(
|
||||||
Spawn(ChargerBotProShielded, spacing=50)
|
Spawn(ChargerBotProShielded, spacing=50)
|
||||||
if player_count > 2
|
if player_count > 1
|
||||||
else None,
|
else None
|
||||||
|
),
|
||||||
|
(
|
||||||
|
Spawn(ChargerBotProShielded, spacing=50)
|
||||||
|
if player_count > 2
|
||||||
|
else None
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
@ -566,15 +638,21 @@ class OnslaughtGame(bs.CoopGameActivity[Player, Team]):
|
|||||||
self._waves = [
|
self._waves = [
|
||||||
Wave(
|
Wave(
|
||||||
entries=[
|
entries=[
|
||||||
Spawn(BomberBotProStatic, Point.TURRET_TOP_MIDDLE_LEFT)
|
(
|
||||||
if hard
|
Spawn(
|
||||||
else None,
|
BomberBotProStatic, Point.TURRET_TOP_MIDDLE_LEFT
|
||||||
|
)
|
||||||
|
if hard
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spawn(
|
Spawn(
|
||||||
BomberBotProStatic, Point.TURRET_TOP_MIDDLE_RIGHT
|
BomberBotProStatic, Point.TURRET_TOP_MIDDLE_RIGHT
|
||||||
),
|
),
|
||||||
Spawn(BomberBotProStatic, Point.TURRET_TOP_LEFT)
|
(
|
||||||
if player_count > 2
|
Spawn(BomberBotProStatic, Point.TURRET_TOP_LEFT)
|
||||||
else None,
|
if player_count > 2
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spawn(ExplodeyBot, Point.TOP_RIGHT),
|
Spawn(ExplodeyBot, Point.TOP_RIGHT),
|
||||||
Delay(4.0),
|
Delay(4.0),
|
||||||
Spawn(ExplodeyBot, Point.TOP_LEFT),
|
Spawn(ExplodeyBot, Point.TOP_LEFT),
|
||||||
@ -584,9 +662,11 @@ class OnslaughtGame(bs.CoopGameActivity[Player, Team]):
|
|||||||
entries=[
|
entries=[
|
||||||
Spawn(ChargerBot, Point.LEFT),
|
Spawn(ChargerBot, Point.LEFT),
|
||||||
Spawn(ChargerBot, Point.RIGHT),
|
Spawn(ChargerBot, Point.RIGHT),
|
||||||
Spawn(ChargerBot, Point.RIGHT_UPPER_MORE)
|
(
|
||||||
if player_count > 2
|
Spawn(ChargerBot, Point.RIGHT_UPPER_MORE)
|
||||||
else None,
|
if player_count > 2
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spawn(BomberBotProStatic, Point.TURRET_TOP_LEFT),
|
Spawn(BomberBotProStatic, Point.TURRET_TOP_LEFT),
|
||||||
Spawn(BomberBotProStatic, Point.TURRET_TOP_RIGHT),
|
Spawn(BomberBotProStatic, Point.TURRET_TOP_RIGHT),
|
||||||
]
|
]
|
||||||
@ -594,29 +674,39 @@ class OnslaughtGame(bs.CoopGameActivity[Player, Team]):
|
|||||||
Wave(
|
Wave(
|
||||||
entries=[
|
entries=[
|
||||||
Spawn(TriggerBotPro, Point.TOP_RIGHT),
|
Spawn(TriggerBotPro, Point.TOP_RIGHT),
|
||||||
Spawn(TriggerBotPro, Point.RIGHT_UPPER_MORE)
|
(
|
||||||
if player_count > 1
|
Spawn(TriggerBotPro, Point.RIGHT_UPPER_MORE)
|
||||||
else None,
|
if player_count > 1
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spawn(TriggerBotPro, Point.RIGHT_UPPER),
|
Spawn(TriggerBotPro, Point.RIGHT_UPPER),
|
||||||
Spawn(TriggerBotPro, Point.RIGHT_LOWER)
|
(
|
||||||
if hard
|
Spawn(TriggerBotPro, Point.RIGHT_LOWER)
|
||||||
else None,
|
if hard
|
||||||
Spawn(TriggerBotPro, Point.RIGHT_LOWER_MORE)
|
else None
|
||||||
if player_count > 2
|
),
|
||||||
else None,
|
(
|
||||||
|
Spawn(TriggerBotPro, Point.RIGHT_LOWER_MORE)
|
||||||
|
if player_count > 2
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spawn(TriggerBotPro, Point.BOTTOM_RIGHT),
|
Spawn(TriggerBotPro, Point.BOTTOM_RIGHT),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
Wave(
|
Wave(
|
||||||
entries=[
|
entries=[
|
||||||
Spawn(ChargerBotProShielded, Point.BOTTOM_RIGHT),
|
Spawn(ChargerBotProShielded, Point.BOTTOM_RIGHT),
|
||||||
Spawn(ChargerBotProShielded, Point.BOTTOM)
|
(
|
||||||
if player_count > 2
|
Spawn(ChargerBotProShielded, Point.BOTTOM)
|
||||||
else None,
|
if player_count > 2
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spawn(ChargerBotProShielded, Point.BOTTOM_LEFT),
|
Spawn(ChargerBotProShielded, Point.BOTTOM_LEFT),
|
||||||
Spawn(ChargerBotProShielded, Point.TOP)
|
(
|
||||||
if hard
|
Spawn(ChargerBotProShielded, Point.TOP)
|
||||||
else None,
|
if hard
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spawn(BomberBotProStatic, Point.TURRET_TOP_MIDDLE),
|
Spawn(BomberBotProStatic, Point.TURRET_TOP_MIDDLE),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
@ -643,12 +733,21 @@ class OnslaughtGame(bs.CoopGameActivity[Player, Team]):
|
|||||||
Spawn(BomberBotProStatic, Point.TURRET_TOP_RIGHT),
|
Spawn(BomberBotProStatic, Point.TURRET_TOP_RIGHT),
|
||||||
Spawn(BomberBotProStatic, Point.TURRET_BOTTOM_LEFT),
|
Spawn(BomberBotProStatic, Point.TURRET_BOTTOM_LEFT),
|
||||||
Spawn(BomberBotProStatic, Point.TURRET_BOTTOM_RIGHT),
|
Spawn(BomberBotProStatic, Point.TURRET_BOTTOM_RIGHT),
|
||||||
Spawn(BomberBotProStatic, Point.TURRET_TOP_MIDDLE_LEFT)
|
(
|
||||||
if hard
|
Spawn(
|
||||||
else None,
|
BomberBotProStatic, Point.TURRET_TOP_MIDDLE_LEFT
|
||||||
Spawn(BomberBotProStatic, Point.TURRET_TOP_MIDDLE_RIGHT)
|
)
|
||||||
if hard
|
if hard
|
||||||
else None,
|
else None
|
||||||
|
),
|
||||||
|
(
|
||||||
|
Spawn(
|
||||||
|
BomberBotProStatic,
|
||||||
|
Point.TURRET_TOP_MIDDLE_RIGHT,
|
||||||
|
)
|
||||||
|
if hard
|
||||||
|
else None
|
||||||
|
),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
@ -667,12 +766,14 @@ class OnslaughtGame(bs.CoopGameActivity[Player, Team]):
|
|||||||
# Spit out a few powerups and start dropping more shortly.
|
# Spit out a few powerups and start dropping more shortly.
|
||||||
self._drop_powerups(
|
self._drop_powerups(
|
||||||
standard_points=True,
|
standard_points=True,
|
||||||
poweruptype='curse'
|
poweruptype=(
|
||||||
if self._preset in [Preset.UBER, Preset.UBER_EASY]
|
'curse'
|
||||||
else (
|
if self._preset in [Preset.UBER, Preset.UBER_EASY]
|
||||||
'land_mines'
|
else (
|
||||||
if self._preset in [Preset.ROOKIE, Preset.ROOKIE_EASY]
|
'land_mines'
|
||||||
else None
|
if self._preset in [Preset.ROOKIE, Preset.ROOKIE_EASY]
|
||||||
|
else None
|
||||||
|
)
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
bs.timer(4.0, self._start_powerup_drops)
|
bs.timer(4.0, self._start_powerup_drops)
|
||||||
|
|||||||
@ -778,9 +778,11 @@ class RaceGame(bs.TeamGameActivity[Player, Team]):
|
|||||||
assert self._timer is not None
|
assert self._timer is not None
|
||||||
if self._timer.has_started():
|
if self._timer.has_started():
|
||||||
self._timer.stop(
|
self._timer.stop(
|
||||||
endtime=None
|
endtime=(
|
||||||
if self._last_team_time is None
|
None
|
||||||
else (self._timer.getstarttime() + self._last_team_time)
|
if self._last_team_time is None
|
||||||
|
else (self._timer.getstarttime() + self._last_team_time)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
results = bs.GameResults()
|
results = bs.GameResults()
|
||||||
|
|||||||
@ -279,9 +279,11 @@ class RunaroundGame(bs.CoopGameActivity[Player, Team]):
|
|||||||
Spacing(duration=1.0),
|
Spacing(duration=1.0),
|
||||||
Spawn(TriggerBot, path=3),
|
Spawn(TriggerBot, path=3),
|
||||||
Spacing(duration=1.0),
|
Spacing(duration=1.0),
|
||||||
Spawn(TriggerBot, path=1)
|
(
|
||||||
if (player_count > 1 and hard)
|
Spawn(TriggerBot, path=1)
|
||||||
else None,
|
if (player_count > 1 and hard)
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spacing(duration=1.0),
|
Spacing(duration=1.0),
|
||||||
Spawn(TriggerBot, path=2) if player_count > 2 else None,
|
Spawn(TriggerBot, path=2) if player_count > 2 else None,
|
||||||
Spacing(duration=1.0),
|
Spacing(duration=1.0),
|
||||||
@ -320,17 +322,23 @@ class RunaroundGame(bs.CoopGameActivity[Player, Team]):
|
|||||||
Spacing(duration=1.5),
|
Spacing(duration=1.5),
|
||||||
Spawn(BomberBotProShielded, path=1) if hard else None,
|
Spawn(BomberBotProShielded, path=1) if hard else None,
|
||||||
Spacing(duration=1.5) if hard else None,
|
Spacing(duration=1.5) if hard else None,
|
||||||
Spawn(BomberBotProShielded, path=3)
|
(
|
||||||
if player_count > 1
|
Spawn(BomberBotProShielded, path=3)
|
||||||
else None,
|
if player_count > 1
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spacing(duration=1.5),
|
Spacing(duration=1.5),
|
||||||
Spawn(BomberBotProShielded, path=2)
|
(
|
||||||
if player_count > 2
|
Spawn(BomberBotProShielded, path=2)
|
||||||
else None,
|
if player_count > 2
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spacing(duration=1.5),
|
Spacing(duration=1.5),
|
||||||
Spawn(BomberBotProShielded, path=1)
|
(
|
||||||
if player_count > 3
|
Spawn(BomberBotProShielded, path=1)
|
||||||
else None,
|
if player_count > 3
|
||||||
|
else None
|
||||||
|
),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
@ -352,9 +360,11 @@ class RunaroundGame(bs.CoopGameActivity[Player, Team]):
|
|||||||
BrawlerBotPro if hard else BrawlerBot,
|
BrawlerBotPro if hard else BrawlerBot,
|
||||||
point=Point.BOTTOM_LEFT,
|
point=Point.BOTTOM_LEFT,
|
||||||
),
|
),
|
||||||
Spawn(BrawlerBotPro, point=Point.BOTTOM_RIGHT)
|
(
|
||||||
if player_count > 2
|
Spawn(BrawlerBotPro, point=Point.BOTTOM_RIGHT)
|
||||||
else None,
|
if player_count > 2
|
||||||
|
else None
|
||||||
|
),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
Wave(
|
Wave(
|
||||||
@ -375,9 +385,11 @@ class RunaroundGame(bs.CoopGameActivity[Player, Team]):
|
|||||||
Spawn(BomberBotProShielded, path=3),
|
Spawn(BomberBotProShielded, path=3),
|
||||||
Spawn(BomberBotProShielded, path=3),
|
Spawn(BomberBotProShielded, path=3),
|
||||||
Spawn(ChargerBot, point=Point.BOTTOM_RIGHT),
|
Spawn(ChargerBot, point=Point.BOTTOM_RIGHT),
|
||||||
Spawn(ChargerBot, point=Point.BOTTOM_LEFT)
|
(
|
||||||
if player_count > 2
|
Spawn(ChargerBot, point=Point.BOTTOM_LEFT)
|
||||||
else None,
|
if player_count > 2
|
||||||
|
else None
|
||||||
|
),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
Wave(
|
Wave(
|
||||||
@ -388,12 +400,16 @@ class RunaroundGame(bs.CoopGameActivity[Player, Team]):
|
|||||||
Spawn(TriggerBotPro, path=1 if hard else 2),
|
Spawn(TriggerBotPro, path=1 if hard else 2),
|
||||||
Spawn(TriggerBotPro, path=1 if hard else 2),
|
Spawn(TriggerBotPro, path=1 if hard else 2),
|
||||||
Spawn(TriggerBotPro, path=1 if hard else 2),
|
Spawn(TriggerBotPro, path=1 if hard else 2),
|
||||||
Spawn(TriggerBotPro, path=1 if hard else 2)
|
(
|
||||||
if player_count > 1
|
Spawn(TriggerBotPro, path=1 if hard else 2)
|
||||||
else None,
|
if player_count > 1
|
||||||
Spawn(TriggerBotPro, path=1 if hard else 2)
|
else None
|
||||||
if player_count > 3
|
),
|
||||||
else None,
|
(
|
||||||
|
Spawn(TriggerBotPro, path=1 if hard else 2)
|
||||||
|
if player_count > 3
|
||||||
|
else None
|
||||||
|
),
|
||||||
]
|
]
|
||||||
),
|
),
|
||||||
Wave(
|
Wave(
|
||||||
@ -402,12 +418,20 @@ class RunaroundGame(bs.CoopGameActivity[Player, Team]):
|
|||||||
TriggerBotProShielded if hard else TriggerBotPro,
|
TriggerBotProShielded if hard else TriggerBotPro,
|
||||||
point=Point.BOTTOM_LEFT,
|
point=Point.BOTTOM_LEFT,
|
||||||
),
|
),
|
||||||
Spawn(TriggerBotProShielded, point=Point.BOTTOM_RIGHT)
|
(
|
||||||
if hard
|
Spawn(
|
||||||
else None,
|
TriggerBotProShielded, point=Point.BOTTOM_RIGHT
|
||||||
Spawn(TriggerBotProShielded, point=Point.BOTTOM_RIGHT)
|
)
|
||||||
if player_count > 2
|
if hard
|
||||||
else None,
|
else None
|
||||||
|
),
|
||||||
|
(
|
||||||
|
Spawn(
|
||||||
|
TriggerBotProShielded, point=Point.BOTTOM_RIGHT
|
||||||
|
)
|
||||||
|
if player_count > 2
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spawn(BomberBot, path=3),
|
Spawn(BomberBot, path=3),
|
||||||
Spawn(BomberBot, path=3),
|
Spawn(BomberBot, path=3),
|
||||||
Spacing(duration=5.0),
|
Spacing(duration=5.0),
|
||||||
@ -425,15 +449,19 @@ class RunaroundGame(bs.CoopGameActivity[Player, Team]):
|
|||||||
Spawn(StickyBot, point=Point.BOTTOM_RIGHT),
|
Spawn(StickyBot, point=Point.BOTTOM_RIGHT),
|
||||||
Spawn(BomberBotProShielded, path=2),
|
Spawn(BomberBotProShielded, path=2),
|
||||||
Spawn(BomberBotProShielded, path=2),
|
Spawn(BomberBotProShielded, path=2),
|
||||||
Spawn(StickyBot, point=Point.BOTTOM_RIGHT)
|
(
|
||||||
if player_count > 2
|
Spawn(StickyBot, point=Point.BOTTOM_RIGHT)
|
||||||
else None,
|
if player_count > 2
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spawn(BomberBotProShielded, path=2),
|
Spawn(BomberBotProShielded, path=2),
|
||||||
Spawn(ExplodeyBot, point=Point.BOTTOM_LEFT),
|
Spawn(ExplodeyBot, point=Point.BOTTOM_LEFT),
|
||||||
Spawn(BomberBotProShielded, path=2),
|
Spawn(BomberBotProShielded, path=2),
|
||||||
Spawn(BomberBotProShielded, path=2)
|
(
|
||||||
if player_count > 1
|
Spawn(BomberBotProShielded, path=2)
|
||||||
else None,
|
if player_count > 1
|
||||||
|
else None
|
||||||
|
),
|
||||||
Spacing(duration=5.0),
|
Spacing(duration=5.0),
|
||||||
Spawn(StickyBot, point=Point.BOTTOM_LEFT),
|
Spawn(StickyBot, point=Point.BOTTOM_LEFT),
|
||||||
Spacing(duration=2.0),
|
Spacing(duration=2.0),
|
||||||
@ -461,9 +489,7 @@ class RunaroundGame(bs.CoopGameActivity[Player, Team]):
|
|||||||
l_offs = (
|
l_offs = (
|
||||||
-80
|
-80
|
||||||
if uiscale is bs.UIScale.SMALL
|
if uiscale is bs.UIScale.SMALL
|
||||||
else -40
|
else -40 if uiscale is bs.UIScale.MEDIUM else 0
|
||||||
if uiscale is bs.UIScale.MEDIUM
|
|
||||||
else 0
|
|
||||||
)
|
)
|
||||||
|
|
||||||
self._lives_bg = bs.NodeActor(
|
self._lives_bg = bs.NodeActor(
|
||||||
|
|||||||
@ -321,11 +321,15 @@ class Target(bs.Actor):
|
|||||||
bs.getsound(
|
bs.getsound(
|
||||||
'orchestraHit4'
|
'orchestraHit4'
|
||||||
if streak > 3
|
if streak > 3
|
||||||
else 'orchestraHit3'
|
else (
|
||||||
if streak > 2
|
'orchestraHit3'
|
||||||
else 'orchestraHit2'
|
if streak > 2
|
||||||
if streak > 1
|
else (
|
||||||
else 'orchestraHit'
|
'orchestraHit2'
|
||||||
|
if streak > 1
|
||||||
|
else 'orchestraHit'
|
||||||
|
)
|
||||||
|
)
|
||||||
).play()
|
).play()
|
||||||
elif dist <= self._r2 + self._rfudge:
|
elif dist <= self._r2 + self._rfudge:
|
||||||
self._nodes[0].color = cdull
|
self._nodes[0].color = cdull
|
||||||
|
|||||||
@ -164,9 +164,7 @@ class UIController:
|
|||||||
entrynew = (
|
entrynew = (
|
||||||
self._dialog_stack[-1]
|
self._dialog_stack[-1]
|
||||||
if self._dialog_stack
|
if self._dialog_stack
|
||||||
else self._main_stack[-1]
|
else self._main_stack[-1] if self._main_stack else None
|
||||||
if self._main_stack
|
|
||||||
else None
|
|
||||||
)
|
)
|
||||||
if entrynew is not None:
|
if entrynew is not None:
|
||||||
entrynew.create()
|
entrynew.create()
|
||||||
|
|||||||
@ -41,15 +41,13 @@ class OnScreenKeyboardWindow(Window):
|
|||||||
scale=(
|
scale=(
|
||||||
2.0
|
2.0
|
||||||
if uiscale is babase.UIScale.SMALL
|
if uiscale is babase.UIScale.SMALL
|
||||||
else 1.5
|
else 1.5 if uiscale is babase.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is babase.UIScale.MEDIUM
|
),
|
||||||
else 1.0
|
stack_offset=(
|
||||||
|
(0, 0)
|
||||||
|
if uiscale is babase.UIScale.SMALL
|
||||||
|
else (0, 0) if uiscale is babase.UIScale.MEDIUM else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(0, 0)
|
|
||||||
if uiscale is babase.UIScale.SMALL
|
|
||||||
else (0, 0)
|
|
||||||
if uiscale is babase.UIScale.MEDIUM
|
|
||||||
else (0, 0),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
self._cancel_button = _bauiv1.buttonwidget(
|
self._cancel_button = _bauiv1.buttonwidget(
|
||||||
@ -300,9 +298,11 @@ class OnScreenKeyboardWindow(Window):
|
|||||||
chars = [c.upper() for c in chars]
|
chars = [c.upper() for c in chars]
|
||||||
_bauiv1.buttonwidget(
|
_bauiv1.buttonwidget(
|
||||||
edit=self._shift_button,
|
edit=self._shift_button,
|
||||||
color=self._key_color_lit
|
color=(
|
||||||
if self._mode == 'caps'
|
self._key_color_lit
|
||||||
else self._key_color_dark,
|
if self._mode == 'caps'
|
||||||
|
else self._key_color_dark
|
||||||
|
),
|
||||||
label=babase.charstr(babase.SpecialChar.SHIFT),
|
label=babase.charstr(babase.SpecialChar.SHIFT),
|
||||||
on_activate_call=self._shift,
|
on_activate_call=self._shift,
|
||||||
)
|
)
|
||||||
|
|||||||
@ -38,9 +38,7 @@ class AccountLinkWindow(bui.Window):
|
|||||||
base_scale = (
|
base_scale = (
|
||||||
1.65
|
1.65
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.5
|
else 1.5 if uiscale is bui.UIScale.MEDIUM else 1.1
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.1
|
|
||||||
)
|
)
|
||||||
super().__init__(
|
super().__init__(
|
||||||
root_widget=bui.containerwidget(
|
root_widget=bui.containerwidget(
|
||||||
@ -48,9 +46,9 @@ class AccountLinkWindow(bui.Window):
|
|||||||
transition=transition,
|
transition=transition,
|
||||||
scale=base_scale,
|
scale=base_scale,
|
||||||
scale_origin_stack_offset=scale_origin,
|
scale_origin_stack_offset=scale_origin,
|
||||||
stack_offset=(0, -10)
|
stack_offset=(
|
||||||
if uiscale is bui.UIScale.SMALL
|
(0, -10) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
else (0, 0),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
self._cancel_button = bui.buttonwidget(
|
self._cancel_button = bui.buttonwidget(
|
||||||
@ -159,9 +157,7 @@ class AccountLinkCodeWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.8
|
1.8
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.35
|
else 1.35 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -74,9 +74,7 @@ class AccountSettingsWindow(bui.Window):
|
|||||||
self._height = (
|
self._height = (
|
||||||
390
|
390
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 430
|
else 430 if uiscale is bui.UIScale.MEDIUM else 490
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 490
|
|
||||||
)
|
)
|
||||||
|
|
||||||
self._sign_in_button = None
|
self._sign_in_button = None
|
||||||
@ -112,13 +110,11 @@ class AccountSettingsWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
2.09
|
2.09
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.4
|
else 1.4 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 1.0
|
stack_offset=(
|
||||||
|
(0, -19) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(0, -19)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (0, 0),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
if uiscale is bui.UIScale.SMALL and app.ui_v1.use_toolbars:
|
if uiscale is bui.UIScale.SMALL and app.ui_v1.use_toolbars:
|
||||||
@ -928,9 +924,9 @@ class AccountSettingsWindow(bui.Window):
|
|||||||
if gpgs_active
|
if gpgs_active
|
||||||
else 'achievementsIcon'
|
else 'achievementsIcon'
|
||||||
),
|
),
|
||||||
icon_color=(0.8, 0.95, 0.7)
|
icon_color=(
|
||||||
if gpgs_active
|
(0.8, 0.95, 0.7) if gpgs_active else (0.85, 0.8, 0.9)
|
||||||
else (0.85, 0.8, 0.9),
|
),
|
||||||
on_activate_call=(
|
on_activate_call=(
|
||||||
self._on_custom_achievements_press
|
self._on_custom_achievements_press
|
||||||
if gpgs_active
|
if gpgs_active
|
||||||
|
|||||||
@ -39,9 +39,7 @@ class AccountUnlinkWindow(bui.Window):
|
|||||||
base_scale = (
|
base_scale = (
|
||||||
2.0
|
2.0
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.6
|
else 1.6 if uiscale is bui.UIScale.MEDIUM else 1.1
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.1
|
|
||||||
)
|
)
|
||||||
super().__init__(
|
super().__init__(
|
||||||
root_widget=bui.containerwidget(
|
root_widget=bui.containerwidget(
|
||||||
@ -49,9 +47,9 @@ class AccountUnlinkWindow(bui.Window):
|
|||||||
transition=transition,
|
transition=transition,
|
||||||
scale=base_scale,
|
scale=base_scale,
|
||||||
scale_origin_stack_offset=scale_origin,
|
scale_origin_stack_offset=scale_origin,
|
||||||
stack_offset=(0, -10)
|
stack_offset=(
|
||||||
if uiscale is bui.UIScale.SMALL
|
(0, -10) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
else (0, 0),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
self._cancel_button = bui.buttonwidget(
|
self._cancel_button = bui.buttonwidget(
|
||||||
|
|||||||
@ -34,9 +34,7 @@ class V2ProxySignInWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.25
|
1.25
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.05
|
else 1.05 if uiscale is bui.UIScale.MEDIUM else 0.9
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 0.9
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -43,9 +43,7 @@ class AccountViewerWindow(PopupWindow):
|
|||||||
scale = (
|
scale = (
|
||||||
2.6
|
2.6
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.8
|
else 1.8 if uiscale is bui.UIScale.MEDIUM else 1.4
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.4
|
|
||||||
)
|
)
|
||||||
self._transitioning_out = False
|
self._transitioning_out = False
|
||||||
|
|
||||||
@ -53,9 +51,7 @@ class AccountViewerWindow(PopupWindow):
|
|||||||
self._height = (
|
self._height = (
|
||||||
300
|
300
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 400
|
else 400 if uiscale is bui.UIScale.MEDIUM else 450
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 450
|
|
||||||
)
|
)
|
||||||
self._subcontainer: bui.Widget | None = None
|
self._subcontainer: bui.Widget | None = None
|
||||||
|
|
||||||
@ -186,9 +182,7 @@ class AccountViewerWindow(PopupWindow):
|
|||||||
scale=(
|
scale=(
|
||||||
2.3
|
2.3
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.65
|
else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.23
|
|
||||||
),
|
),
|
||||||
choices=choices,
|
choices=choices,
|
||||||
choices_display=choices_display,
|
choices_display=choices_display,
|
||||||
|
|||||||
@ -23,18 +23,14 @@ class AchievementsWindow(PopupWindow):
|
|||||||
scale = (
|
scale = (
|
||||||
2.3
|
2.3
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.65
|
else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.23
|
|
||||||
)
|
)
|
||||||
self._transitioning_out = False
|
self._transitioning_out = False
|
||||||
self._width = 450
|
self._width = 450
|
||||||
self._height = (
|
self._height = (
|
||||||
300
|
300
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 370
|
else 370 if uiscale is bui.UIScale.MEDIUM else 450
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 450
|
|
||||||
)
|
)
|
||||||
bg_color = (0.5, 0.4, 0.6)
|
bg_color = (0.5, 0.4, 0.6)
|
||||||
|
|
||||||
@ -126,9 +122,11 @@ class AchievementsWindow(PopupWindow):
|
|||||||
|
|
||||||
bui.imagewidget(
|
bui.imagewidget(
|
||||||
parent=self._subcontainer,
|
parent=self._subcontainer,
|
||||||
position=(sub_width * 0.10 + 1, sub_height - 20 - incr * i - 9)
|
position=(
|
||||||
if complete
|
(sub_width * 0.10 + 1, sub_height - 20 - incr * i - 9)
|
||||||
else (sub_width * 0.10 - 4, sub_height - 20 - incr * i - 14),
|
if complete
|
||||||
|
else (sub_width * 0.10 - 4, sub_height - 20 - incr * i - 14)
|
||||||
|
),
|
||||||
size=(18, 18) if complete else (27, 27),
|
size=(18, 18) if complete else (27, 27),
|
||||||
opacity=1.0 if complete else 0.3,
|
opacity=1.0 if complete else 0.3,
|
||||||
color=ach.get_icon_color(complete)[:3],
|
color=ach.get_icon_color(complete)[:3],
|
||||||
@ -167,9 +165,11 @@ class AchievementsWindow(PopupWindow):
|
|||||||
flatness=1.0,
|
flatness=1.0,
|
||||||
shadow=0.0,
|
shadow=0.0,
|
||||||
color=(0.83, 0.8, 0.85) if complete else (0.8, 0.8, 0.8, 0.2),
|
color=(0.83, 0.8, 0.85) if complete else (0.8, 0.8, 0.8, 0.2),
|
||||||
text=ach.description_full_complete
|
text=(
|
||||||
if complete
|
ach.description_full_complete
|
||||||
else ach.description_full,
|
if complete
|
||||||
|
else ach.description_full
|
||||||
|
),
|
||||||
size=(0, 0),
|
size=(0, 0),
|
||||||
h_align='left',
|
h_align='left',
|
||||||
v_align='center',
|
v_align='center',
|
||||||
|
|||||||
@ -31,9 +31,7 @@ class ShowFriendCodeWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.7
|
1.7
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.35
|
else 1.35 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -41,9 +41,7 @@ class CharacterPicker(PopupWindow):
|
|||||||
scale = (
|
scale = (
|
||||||
1.85
|
1.85
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.65
|
else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.23
|
|
||||||
)
|
)
|
||||||
|
|
||||||
self._delegate = delegate
|
self._delegate = delegate
|
||||||
|
|||||||
@ -43,9 +43,7 @@ class ColorPicker(PopupWindow):
|
|||||||
scale = (
|
scale = (
|
||||||
2.3
|
2.3
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.65
|
else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.23
|
|
||||||
)
|
)
|
||||||
self._parent = parent
|
self._parent = parent
|
||||||
self._position = position
|
self._position = position
|
||||||
@ -206,9 +204,7 @@ class ColorPickerExact(PopupWindow):
|
|||||||
scale = (
|
scale = (
|
||||||
2.3
|
2.3
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.65
|
else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.23
|
|
||||||
)
|
)
|
||||||
self._delegate = delegate
|
self._delegate = delegate
|
||||||
self._transitioning_out = False
|
self._transitioning_out = False
|
||||||
|
|||||||
@ -61,9 +61,7 @@ class ConfirmWindow:
|
|||||||
scale=(
|
scale=(
|
||||||
2.1
|
2.1
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.5
|
else 1.5 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
),
|
),
|
||||||
scale_origin_stack_offset=scale_origin,
|
scale_origin_stack_offset=scale_origin,
|
||||||
)
|
)
|
||||||
@ -187,8 +185,10 @@ class QuitWindow:
|
|||||||
resource=quit_resource,
|
resource=quit_resource,
|
||||||
subs=[('${APP_NAME}', bui.Lstr(resource='titleText'))],
|
subs=[('${APP_NAME}', bui.Lstr(resource='titleText'))],
|
||||||
),
|
),
|
||||||
lambda: bui.quit(confirm=False, quit_type=self._quit_type)
|
lambda: (
|
||||||
if self._quit_type is not None
|
bui.quit(confirm=False, quit_type=self._quit_type)
|
||||||
else bui.quit(confirm=False),
|
if self._quit_type is not None
|
||||||
|
else bui.quit(confirm=False)
|
||||||
|
),
|
||||||
origin_widget=origin_widget,
|
origin_widget=origin_widget,
|
||||||
).root_widget
|
).root_widget
|
||||||
|
|||||||
@ -148,9 +148,11 @@ class GameButton:
|
|||||||
draw_controller=btn,
|
draw_controller=btn,
|
||||||
position=(xach, yach),
|
position=(xach, yach),
|
||||||
size=(a_scale, a_scale),
|
size=(a_scale, a_scale),
|
||||||
color=tuple(ach.get_icon_color(a_complete)[:3])
|
color=(
|
||||||
if a_complete
|
tuple(ach.get_icon_color(a_complete)[:3])
|
||||||
else (1.2, 1.2, 1.2),
|
if a_complete
|
||||||
|
else (1.2, 1.2, 1.2)
|
||||||
|
),
|
||||||
texture=ach.get_icon_ui_texture(a_complete),
|
texture=ach.get_icon_ui_texture(a_complete),
|
||||||
)
|
)
|
||||||
imw2 = bui.imagewidget(
|
imw2 = bui.imagewidget(
|
||||||
@ -307,8 +309,6 @@ class GameButton:
|
|||||||
opacity=(
|
opacity=(
|
||||||
1.0
|
1.0
|
||||||
if (a_complete and unlocked)
|
if (a_complete and unlocked)
|
||||||
else 0.2
|
else 0.2 if a_complete else 0.0
|
||||||
if a_complete
|
|
||||||
else 0.0
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|||||||
@ -23,9 +23,7 @@ class CoopLevelLockedWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.7
|
1.7
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.3
|
else 1.3 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -417,9 +417,7 @@ class TournamentButton:
|
|||||||
prize_y_offs = (
|
prize_y_offs = (
|
||||||
34
|
34
|
||||||
if 'prizeRange3' in entry
|
if 'prizeRange3' in entry
|
||||||
else 20
|
else 20 if 'prizeRange2' in entry else 12
|
||||||
if 'prizeRange2' in entry
|
|
||||||
else 12
|
|
||||||
)
|
)
|
||||||
x_offs = 90
|
x_offs = 90
|
||||||
|
|
||||||
@ -460,9 +458,11 @@ class TournamentButton:
|
|||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
edit=self.prize_value_1_text,
|
edit=self.prize_value_1_text,
|
||||||
text='-' if pv1 == '' else pv1,
|
text='-' if pv1 == '' else pv1,
|
||||||
scale=prize_value_scale_large
|
scale=(
|
||||||
if ticket_char not in pv1
|
prize_value_scale_large
|
||||||
else prize_value_scale_small,
|
if ticket_char not in pv1
|
||||||
|
else prize_value_scale_small
|
||||||
|
),
|
||||||
position=(
|
position=(
|
||||||
self.button_x + 380 + x_offs,
|
self.button_x + 380 + x_offs,
|
||||||
self.button_y + self.button_scale_y - 93 + prize_y_offs,
|
self.button_y + self.button_scale_y - 93 + prize_y_offs,
|
||||||
@ -480,9 +480,11 @@ class TournamentButton:
|
|||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
edit=self.prize_value_2_text,
|
edit=self.prize_value_2_text,
|
||||||
text=pv2,
|
text=pv2,
|
||||||
scale=prize_value_scale_large
|
scale=(
|
||||||
if ticket_char not in pv2
|
prize_value_scale_large
|
||||||
else prize_value_scale_small,
|
if ticket_char not in pv2
|
||||||
|
else prize_value_scale_small
|
||||||
|
),
|
||||||
position=(
|
position=(
|
||||||
self.button_x + 380 + x_offs,
|
self.button_x + 380 + x_offs,
|
||||||
self.button_y + self.button_scale_y - 93 - 45 + prize_y_offs,
|
self.button_y + self.button_scale_y - 93 - 45 + prize_y_offs,
|
||||||
@ -500,9 +502,11 @@ class TournamentButton:
|
|||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
edit=self.prize_value_3_text,
|
edit=self.prize_value_3_text,
|
||||||
text=pv3,
|
text=pv3,
|
||||||
scale=prize_value_scale_large
|
scale=(
|
||||||
if ticket_char not in pv3
|
prize_value_scale_large
|
||||||
else prize_value_scale_small,
|
if ticket_char not in pv3
|
||||||
|
else prize_value_scale_small
|
||||||
|
),
|
||||||
position=(
|
position=(
|
||||||
self.button_x + 380 + x_offs,
|
self.button_x + 380 + x_offs,
|
||||||
self.button_y + self.button_scale_y - 93 - 90 + prize_y_offs,
|
self.button_y + self.button_scale_y - 93 - 90 + prize_y_offs,
|
||||||
@ -667,9 +671,11 @@ class TournamentButton:
|
|||||||
self.button_x + 360,
|
self.button_x + 360,
|
||||||
self.button_y + self.button_scale_y - 146,
|
self.button_y + self.button_scale_y - 146,
|
||||||
),
|
),
|
||||||
text=''
|
text=(
|
||||||
if ad_tries_remaining in [None, 0]
|
''
|
||||||
else ('' + str(ad_tries_remaining)),
|
if ad_tries_remaining in [None, 0]
|
||||||
|
else ('' + str(ad_tries_remaining))
|
||||||
|
),
|
||||||
color=(0.6, 0.6, 0.6, 1 if ads_enabled else 0.2),
|
color=(0.6, 0.6, 0.6, 1 if ads_enabled else 0.2),
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
|
|||||||
@ -51,13 +51,11 @@ class CreditsListWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
2.0
|
2.0
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.3
|
else 1.3 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 1.0
|
stack_offset=(
|
||||||
|
(0, -8) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(0, -8)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (0, 0),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -25,9 +25,7 @@ class DebugWindow(bui.Window):
|
|||||||
self._height = height = (
|
self._height = height = (
|
||||||
350
|
350
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 420
|
else 420 if uiscale is bui.UIScale.MEDIUM else 520
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 520
|
|
||||||
)
|
)
|
||||||
|
|
||||||
self._scroll_width = self._width - 100
|
self._scroll_width = self._width - 100
|
||||||
@ -50,13 +48,11 @@ class DebugWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
2.35
|
2.35
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.55
|
else 1.55 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 1.0
|
stack_offset=(
|
||||||
|
(0, -30) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(0, -30)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (0, 0),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -45,9 +45,7 @@ class DiscordWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.6
|
1.6
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.3
|
else 1.3 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
),
|
),
|
||||||
stack_offset=(0, 5) if uiscale is bui.UIScale.SMALL else (0, 0),
|
stack_offset=(0, 5) if uiscale is bui.UIScale.SMALL else (0, 0),
|
||||||
)
|
)
|
||||||
|
|||||||
@ -33,9 +33,7 @@ def ask_for_rating() -> bui.Widget | None:
|
|||||||
scale=(
|
scale=(
|
||||||
1.6
|
1.6
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.35
|
else 1.35 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
v = height - 50
|
v = height - 50
|
||||||
|
|||||||
@ -57,13 +57,11 @@ class FileSelectorWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
2.23
|
2.23
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.4
|
else 1.4 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 1.0
|
stack_offset=(
|
||||||
|
(0, -35) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(0, -35)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (0, 0),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
@ -73,11 +71,15 @@ class FileSelectorWindow(bui.Window):
|
|||||||
color=bui.app.ui_v1.title_color,
|
color=bui.app.ui_v1.title_color,
|
||||||
h_align='center',
|
h_align='center',
|
||||||
v_align='center',
|
v_align='center',
|
||||||
text=bui.Lstr(resource=self._r + '.titleFolderText')
|
text=(
|
||||||
if (allow_folders and not valid_file_extensions)
|
bui.Lstr(resource=self._r + '.titleFolderText')
|
||||||
else bui.Lstr(resource=self._r + '.titleFileText')
|
if (allow_folders and not valid_file_extensions)
|
||||||
if not allow_folders
|
else (
|
||||||
else bui.Lstr(resource=self._r + '.titleFileFolderText'),
|
bui.Lstr(resource=self._r + '.titleFileText')
|
||||||
|
if not allow_folders
|
||||||
|
else bui.Lstr(resource=self._r + '.titleFileFolderText')
|
||||||
|
)
|
||||||
|
),
|
||||||
maxwidth=210,
|
maxwidth=210,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -444,9 +446,11 @@ class FileSelectorWindow(bui.Window):
|
|||||||
position=(10 + folder_icon_size * 1.05, entry_height * 0.5),
|
position=(10 + folder_icon_size * 1.05, entry_height * 0.5),
|
||||||
size=(0, 0),
|
size=(0, 0),
|
||||||
maxwidth=self._scroll_width * 0.93 - 50,
|
maxwidth=self._scroll_width * 0.93 - 50,
|
||||||
color=(1, 1, 1, 1)
|
color=(
|
||||||
if (is_valid_file_path or is_dir)
|
(1, 1, 1, 1)
|
||||||
else (0.5, 0.5, 0.5, 1),
|
if (is_valid_file_path or is_dir)
|
||||||
|
else (0.5, 0.5, 0.5, 1)
|
||||||
|
),
|
||||||
)
|
)
|
||||||
v -= entry_height
|
v -= entry_height
|
||||||
|
|
||||||
|
|||||||
@ -99,9 +99,7 @@ class GatherWindow(bui.Window):
|
|||||||
self._height = (
|
self._height = (
|
||||||
582
|
582
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 680
|
else 680 if uiscale is bui.UIScale.MEDIUM else 800
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 800
|
|
||||||
)
|
)
|
||||||
self._current_tab: GatherWindow.TabID | None = None
|
self._current_tab: GatherWindow.TabID | None = None
|
||||||
extra_top = 20 if uiscale is bui.UIScale.SMALL else 0
|
extra_top = 20 if uiscale is bui.UIScale.SMALL else 0
|
||||||
@ -116,15 +114,13 @@ class GatherWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.3
|
1.3
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 0.97
|
else 0.97 if uiscale is bui.UIScale.MEDIUM else 0.8
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 0.8
|
stack_offset=(
|
||||||
|
(0, -11)
|
||||||
|
if uiscale is bui.UIScale.SMALL
|
||||||
|
else (0, 0) if uiscale is bui.UIScale.MEDIUM else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(0, -11)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (0, 0)
|
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else (0, 0),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -165,9 +161,7 @@ class GatherWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.5
|
1.5
|
||||||
if not condensed
|
if not condensed
|
||||||
else 1.0
|
else 1.0 if uiscale is bui.UIScale.MEDIUM else 0.6
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 0.6
|
|
||||||
),
|
),
|
||||||
h_align='center',
|
h_align='center',
|
||||||
v_align='center',
|
v_align='center',
|
||||||
|
|||||||
@ -44,9 +44,7 @@ class AboutGatherTab(GatherTab):
|
|||||||
message_height = (
|
message_height = (
|
||||||
210
|
210
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 305
|
else 305 if uiscale is bui.UIScale.MEDIUM else 370
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 370
|
|
||||||
)
|
)
|
||||||
# Let's not talk about sharing in vr-mode; its tricky to fit more
|
# Let's not talk about sharing in vr-mode; its tricky to fit more
|
||||||
# than one head in a VR-headset.
|
# than one head in a VR-headset.
|
||||||
|
|||||||
@ -837,9 +837,7 @@ class PrivateGatherTab(GatherTab):
|
|||||||
color=(
|
color=(
|
||||||
(0.6, 0.6, 0.6)
|
(0.6, 0.6, 0.6)
|
||||||
if disabled
|
if disabled
|
||||||
else (0.5, 1.0, 0.5)
|
else (0.5, 1.0, 0.5) if waiting else None
|
||||||
if waiting
|
|
||||||
else None
|
|
||||||
),
|
),
|
||||||
enable_sound=False,
|
enable_sound=False,
|
||||||
label=btnlabel,
|
label=btnlabel,
|
||||||
|
|||||||
@ -204,11 +204,11 @@ class UIRow:
|
|||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
edit=self._ping_widget,
|
edit=self._ping_widget,
|
||||||
text=str(int(party.ping)),
|
text=str(int(party.ping)),
|
||||||
color=(0, 1, 0)
|
color=(
|
||||||
if party.ping <= ping_good
|
(0, 1, 0)
|
||||||
else (1, 1, 0)
|
if party.ping <= ping_good
|
||||||
if party.ping <= ping_med
|
else (1, 1, 0) if party.ping <= ping_med else (1, 0, 0)
|
||||||
else (1, 0, 0),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
party.clean_display_index = index
|
party.clean_display_index = index
|
||||||
@ -369,8 +369,8 @@ class PublicGatherTab(GatherTab):
|
|||||||
self._join_status_text: bui.Widget | None = None
|
self._join_status_text: bui.Widget | None = None
|
||||||
self._no_servers_found_text: bui.Widget | None = None
|
self._no_servers_found_text: bui.Widget | None = None
|
||||||
self._host_max_party_size_value: bui.Widget | None = None
|
self._host_max_party_size_value: bui.Widget | None = None
|
||||||
self._host_max_party_size_minus_button: (bui.Widget | None) = None
|
self._host_max_party_size_minus_button: bui.Widget | None = None
|
||||||
self._host_max_party_size_plus_button: (bui.Widget | None) = None
|
self._host_max_party_size_plus_button: bui.Widget | None = None
|
||||||
self._host_status_text: bui.Widget | None = None
|
self._host_status_text: bui.Widget | None = None
|
||||||
self._signed_in = False
|
self._signed_in = False
|
||||||
self._ui_rows: list[UIRow] = []
|
self._ui_rows: list[UIRow] = []
|
||||||
@ -800,9 +800,11 @@ class PublicGatherTab(GatherTab):
|
|||||||
parent=self._container,
|
parent=self._container,
|
||||||
label=label,
|
label=label,
|
||||||
size=(400, 80),
|
size=(400, 80),
|
||||||
on_activate_call=self._on_stop_advertising_press
|
on_activate_call=(
|
||||||
if is_public_enabled
|
self._on_stop_advertising_press
|
||||||
else self._on_start_advertizing_press,
|
if is_public_enabled
|
||||||
|
else self._on_start_advertizing_press
|
||||||
|
),
|
||||||
position=(c_width * 0.5 - 200, v),
|
position=(c_width * 0.5 - 200, v),
|
||||||
autoselect=True,
|
autoselect=True,
|
||||||
up_widget=btn2,
|
up_widget=btn2,
|
||||||
|
|||||||
@ -72,13 +72,11 @@ class GetCurrencyWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.63
|
1.63
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.2
|
else 1.2 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 1.0
|
stack_offset=(
|
||||||
|
(0, -3) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(0, -3)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (0, 0),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -605,11 +603,11 @@ class GetCurrencyWindow(bui.Window):
|
|||||||
self._smooth_increase_speed = (
|
self._smooth_increase_speed = (
|
||||||
diff / 100.0
|
diff / 100.0
|
||||||
if diff >= 5000
|
if diff >= 5000
|
||||||
else diff / 50.0
|
else (
|
||||||
if diff >= 1500
|
diff / 50.0
|
||||||
else diff / 30.0
|
if diff >= 1500
|
||||||
if diff >= 500
|
else diff / 30.0 if diff >= 500 else diff / 15.0
|
||||||
else diff / 15.0
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
def _disabled_press(self) -> None:
|
def _disabled_press(self) -> None:
|
||||||
|
|||||||
@ -20,9 +20,7 @@ class GetBSRemoteWindow(PopupWindow):
|
|||||||
scale = (
|
scale = (
|
||||||
2.3
|
2.3
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.65
|
else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.23
|
|
||||||
)
|
)
|
||||||
self._transitioning_out = False
|
self._transitioning_out = False
|
||||||
self._width = 570
|
self._width = 570
|
||||||
|
|||||||
@ -41,9 +41,7 @@ class HelpWindow(bui.Window):
|
|||||||
height = (
|
height = (
|
||||||
460
|
460
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 530
|
else 530 if uiscale is bui.UIScale.MEDIUM else 600
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 600
|
|
||||||
)
|
)
|
||||||
|
|
||||||
super().__init__(
|
super().__init__(
|
||||||
@ -55,15 +53,13 @@ class HelpWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.77
|
1.77
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.25
|
else 1.25 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 1.0
|
stack_offset=(
|
||||||
|
(0, -30)
|
||||||
|
if uiscale is bui.UIScale.SMALL
|
||||||
|
else (0, 15) if uiscale is bui.UIScale.MEDIUM else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(0, -30)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (0, 15)
|
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else (0, 0),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -119,9 +115,11 @@ class HelpWindow(bui.Window):
|
|||||||
),
|
),
|
||||||
size=(140, 60),
|
size=(140, 60),
|
||||||
scale=0.7 if uiscale is bui.UIScale.SMALL else 0.8,
|
scale=0.7 if uiscale is bui.UIScale.SMALL else 0.8,
|
||||||
label=bui.Lstr(resource='backText')
|
label=(
|
||||||
if self._main_menu
|
bui.Lstr(resource='backText')
|
||||||
else 'Close',
|
if self._main_menu
|
||||||
|
else 'Close'
|
||||||
|
),
|
||||||
button_type='back' if self._main_menu else None,
|
button_type='back' if self._main_menu else None,
|
||||||
extra_touch_border_scale=2.0,
|
extra_touch_border_scale=2.0,
|
||||||
autoselect=True,
|
autoselect=True,
|
||||||
|
|||||||
@ -40,9 +40,7 @@ class IconPicker(PopupWindow):
|
|||||||
scale = (
|
scale = (
|
||||||
1.85
|
1.85
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.65
|
else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.23
|
|
||||||
)
|
)
|
||||||
|
|
||||||
self._delegate = delegate
|
self._delegate = delegate
|
||||||
|
|||||||
@ -472,9 +472,9 @@ class KioskWindow(bui.Window):
|
|||||||
'type': 'bs_hockey.HockeyGame',
|
'type': 'bs_hockey.HockeyGame',
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
appconfig[
|
appconfig['Team Tournament Playlist Selection'] = (
|
||||||
'Team Tournament Playlist Selection'
|
'Just Hockey'
|
||||||
] = 'Just Hockey'
|
)
|
||||||
bui.fade_screen(
|
bui.fade_screen(
|
||||||
False,
|
False,
|
||||||
endcall=bui.Call(
|
endcall=bui.Call(
|
||||||
@ -488,9 +488,11 @@ class KioskWindow(bui.Window):
|
|||||||
game = (
|
game = (
|
||||||
'Easy:Onslaught Training'
|
'Easy:Onslaught Training'
|
||||||
if mode == 'easy'
|
if mode == 'easy'
|
||||||
else 'Easy:Rookie Football'
|
else (
|
||||||
if mode == 'medium'
|
'Easy:Rookie Football'
|
||||||
else 'Easy:Uber Onslaught'
|
if mode == 'medium'
|
||||||
|
else 'Easy:Uber Onslaught'
|
||||||
|
)
|
||||||
)
|
)
|
||||||
cfg = bui.app.config
|
cfg = bui.app.config
|
||||||
cfg['Selected Coop Game'] = game
|
cfg['Selected Coop Game'] = game
|
||||||
|
|||||||
@ -63,9 +63,7 @@ class LeagueRankWindow(bui.Window):
|
|||||||
self._height = (
|
self._height = (
|
||||||
657
|
657
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 710
|
else 710 if uiscale is bui.UIScale.MEDIUM else 800
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 800
|
|
||||||
)
|
)
|
||||||
self._r = 'coopSelectWindow'
|
self._r = 'coopSelectWindow'
|
||||||
self._rdict = bui.app.lang.get_resource(self._r)
|
self._rdict = bui.app.lang.get_resource(self._r)
|
||||||
@ -79,19 +77,17 @@ class LeagueRankWindow(bui.Window):
|
|||||||
super().__init__(
|
super().__init__(
|
||||||
root_widget=bui.containerwidget(
|
root_widget=bui.containerwidget(
|
||||||
size=(self._width, self._height + top_extra),
|
size=(self._width, self._height + top_extra),
|
||||||
stack_offset=(0, -15)
|
stack_offset=(
|
||||||
if uiscale is bui.UIScale.SMALL
|
(0, -15)
|
||||||
else (0, 10)
|
if uiscale is bui.UIScale.SMALL
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
else (0, 10) if uiscale is bui.UIScale.MEDIUM else (0, 0)
|
||||||
else (0, 0),
|
),
|
||||||
transition=transition,
|
transition=transition,
|
||||||
scale_origin_stack_offset=scale_origin,
|
scale_origin_stack_offset=scale_origin,
|
||||||
scale=(
|
scale=(
|
||||||
1.2
|
1.2
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 0.93
|
else 0.93 if uiscale is bui.UIScale.MEDIUM else 0.8
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 0.8
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -210,9 +206,11 @@ class LeagueRankWindow(bui.Window):
|
|||||||
assert plus is not None
|
assert plus is not None
|
||||||
|
|
||||||
txt = bui.Lstr(
|
txt = bui.Lstr(
|
||||||
resource='coopSelectWindow.activenessAllTimeInfoText'
|
resource=(
|
||||||
if self._season == 'a'
|
'coopSelectWindow.activenessAllTimeInfoText'
|
||||||
else 'coopSelectWindow.activenessInfoText',
|
if self._season == 'a'
|
||||||
|
else 'coopSelectWindow.activenessInfoText'
|
||||||
|
),
|
||||||
subs=[
|
subs=[
|
||||||
(
|
(
|
||||||
'${MAX}',
|
'${MAX}',
|
||||||
@ -853,9 +851,11 @@ class LeagueRankWindow(bui.Window):
|
|||||||
|
|
||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
edit=self._league_title_text,
|
edit=self._league_title_text,
|
||||||
text=''
|
text=(
|
||||||
if self._season == 'a'
|
''
|
||||||
else bui.Lstr(resource='league.leagueText'),
|
if self._season == 'a'
|
||||||
|
else bui.Lstr(resource='league.leagueText')
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
if data is None:
|
if data is None:
|
||||||
@ -910,9 +910,11 @@ class LeagueRankWindow(bui.Window):
|
|||||||
bui.textwidget(edit=self._season_ends_text, text=to_end_string)
|
bui.textwidget(edit=self._season_ends_text, text=to_end_string)
|
||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
edit=self._trophy_counts_reset_text,
|
edit=self._trophy_counts_reset_text,
|
||||||
text=bui.Lstr(resource='league.trophyCountsResetText')
|
text=(
|
||||||
if self._is_current_season and show_season_end
|
bui.Lstr(resource='league.trophyCountsResetText')
|
||||||
else '',
|
if self._is_current_season and show_season_end
|
||||||
|
else ''
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
bui.textwidget(edit=self._league_text, text=lname, color=lcolor)
|
bui.textwidget(edit=self._league_text, text=lname, color=lcolor)
|
||||||
@ -932,21 +934,25 @@ class LeagueRankWindow(bui.Window):
|
|||||||
)
|
)
|
||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
edit=self._to_ranked_text,
|
edit=self._to_ranked_text,
|
||||||
text=bui.Lstr(resource='coopSelectWindow.toRankedText').evaluate()
|
text=(
|
||||||
+ ''
|
bui.Lstr(resource='coopSelectWindow.toRankedText').evaluate()
|
||||||
+ extra_text
|
+ ''
|
||||||
if do_percent
|
+ extra_text
|
||||||
else '',
|
if do_percent
|
||||||
|
else ''
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
edit=self._your_power_ranking_text,
|
edit=self._your_power_ranking_text,
|
||||||
text=bui.Lstr(
|
text=(
|
||||||
resource='rankText',
|
bui.Lstr(
|
||||||
fallback_resource='coopSelectWindow.yourPowerRankingText',
|
resource='rankText',
|
||||||
)
|
fallback_resource='coopSelectWindow.yourPowerRankingText',
|
||||||
if (not do_percent)
|
)
|
||||||
else '',
|
if (not do_percent)
|
||||||
|
else ''
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
@ -954,11 +960,11 @@ class LeagueRankWindow(bui.Window):
|
|||||||
position=(473, v - 70 - (170 if do_percent else 220)),
|
position=(473, v - 70 - (170 if do_percent else 220)),
|
||||||
text=status_text,
|
text=status_text,
|
||||||
big=(in_top or do_percent),
|
big=(in_top or do_percent),
|
||||||
scale=3.0
|
scale=(
|
||||||
if (in_top or do_percent)
|
3.0
|
||||||
else 0.7
|
if (in_top or do_percent)
|
||||||
if finished_season_unranked
|
else 0.7 if finished_season_unranked else 1.0
|
||||||
else 1.0,
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
if self._activity_mult_button is not None:
|
if self._activity_mult_button is not None:
|
||||||
@ -992,9 +998,11 @@ class LeagueRankWindow(bui.Window):
|
|||||||
# pylint: disable=consider-using-f-string
|
# pylint: disable=consider-using-f-string
|
||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
edit=self._pro_mult_text,
|
edit=self._pro_mult_text,
|
||||||
text=' -'
|
text=(
|
||||||
if (data is None or not have_pro)
|
' -'
|
||||||
else 'x ' + ('%.2f' % pro_mult),
|
if (data is None or not have_pro)
|
||||||
|
else 'x ' + ('%.2f' % pro_mult)
|
||||||
|
),
|
||||||
)
|
)
|
||||||
bui.buttonwidget(
|
bui.buttonwidget(
|
||||||
edit=self._pro_mult_button,
|
edit=self._pro_mult_button,
|
||||||
@ -1019,9 +1027,11 @@ class LeagueRankWindow(bui.Window):
|
|||||||
|
|
||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
edit=self._power_ranking_achievement_total_text,
|
edit=self._power_ranking_achievement_total_text,
|
||||||
text='-'
|
text=(
|
||||||
if data is None
|
'-'
|
||||||
else ('+ ' + pts_txt.replace('${NUMBER}', str(total_ach_value))),
|
if data is None
|
||||||
|
else ('+ ' + pts_txt.replace('${NUMBER}', str(total_ach_value)))
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
total_trophies_count = accounts.get_league_rank_points(
|
total_trophies_count = accounts.get_league_rank_points(
|
||||||
@ -1035,19 +1045,24 @@ class LeagueRankWindow(bui.Window):
|
|||||||
)
|
)
|
||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
edit=self._power_ranking_trophies_total_text,
|
edit=self._power_ranking_trophies_total_text,
|
||||||
text='-'
|
text=(
|
||||||
if data is None
|
'-'
|
||||||
else (
|
if data is None
|
||||||
'+ ' + pts_txt.replace('${NUMBER}', str(total_trophies_value))
|
else (
|
||||||
|
'+ '
|
||||||
|
+ pts_txt.replace('${NUMBER}', str(total_trophies_value))
|
||||||
|
)
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
edit=self._power_ranking_total_text,
|
edit=self._power_ranking_total_text,
|
||||||
text='-'
|
text=(
|
||||||
if data is None
|
'-'
|
||||||
else eq_text.replace(
|
if data is None
|
||||||
'${NUMBER}', str(accounts.get_league_rank_points(data))
|
else eq_text.replace(
|
||||||
|
'${NUMBER}', str(accounts.get_league_rank_points(data))
|
||||||
|
)
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
for widget in self._power_ranking_score_widgets:
|
for widget in self._power_ranking_score_widgets:
|
||||||
|
|||||||
@ -43,9 +43,11 @@ class MainMenuWindow(bui.Window):
|
|||||||
super().__init__(
|
super().__init__(
|
||||||
root_widget=bui.containerwidget(
|
root_widget=bui.containerwidget(
|
||||||
transition=transition,
|
transition=transition,
|
||||||
toolbar_visibility='menu_minimal_no_back'
|
toolbar_visibility=(
|
||||||
if self._in_game
|
'menu_minimal_no_back'
|
||||||
else 'menu_minimal_no_back',
|
if self._in_game
|
||||||
|
else 'menu_minimal_no_back'
|
||||||
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -142,9 +144,11 @@ class MainMenuWindow(bui.Window):
|
|||||||
return (
|
return (
|
||||||
'storeCharacterXmas'
|
'storeCharacterXmas'
|
||||||
if plus.get_v1_account_misc_read_val('xmas', False)
|
if plus.get_v1_account_misc_read_val('xmas', False)
|
||||||
else 'storeCharacterEaster'
|
else (
|
||||||
if plus.get_v1_account_misc_read_val('easter', False)
|
'storeCharacterEaster'
|
||||||
else 'storeCharacter'
|
if plus.get_v1_account_misc_read_val('easter', False)
|
||||||
|
else 'storeCharacter'
|
||||||
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
def _check_refresh(self) -> None:
|
def _check_refresh(self) -> None:
|
||||||
@ -344,9 +348,7 @@ class MainMenuWindow(bui.Window):
|
|||||||
icon_size = (
|
icon_size = (
|
||||||
55
|
55
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 55
|
else 55 if uiscale is bui.UIScale.MEDIUM else 70
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 70
|
|
||||||
)
|
)
|
||||||
bui.imagewidget(
|
bui.imagewidget(
|
||||||
parent=self._root_widget,
|
parent=self._root_widget,
|
||||||
@ -646,9 +648,11 @@ class MainMenuWindow(bui.Window):
|
|||||||
color=(0.45, 0.55, 0.45),
|
color=(0.45, 0.55, 0.45),
|
||||||
textcolor=(0.7, 0.8, 0.7),
|
textcolor=(0.7, 0.8, 0.7),
|
||||||
label=bui.Lstr(
|
label=bui.Lstr(
|
||||||
resource='modeArcadeText'
|
resource=(
|
||||||
if bui.app.env.arcade
|
'modeArcadeText'
|
||||||
else 'modeDemoText'
|
if bui.app.env.arcade
|
||||||
|
else 'modeDemoText'
|
||||||
|
)
|
||||||
),
|
),
|
||||||
transition_delay=demo_menu_delay,
|
transition_delay=demo_menu_delay,
|
||||||
on_activate_call=self._demo_menu_press,
|
on_activate_call=self._demo_menu_press,
|
||||||
@ -659,9 +663,7 @@ class MainMenuWindow(bui.Window):
|
|||||||
foof = (
|
foof = (
|
||||||
-1
|
-1
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1
|
else 1 if uiscale is bui.UIScale.MEDIUM else 3
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 3
|
|
||||||
)
|
)
|
||||||
h, v, scale = positions[self._p_index]
|
h, v, scale = positions[self._p_index]
|
||||||
v = v + foof
|
v = v + foof
|
||||||
@ -906,9 +908,7 @@ class MainMenuWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
2.15
|
2.15
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.6
|
else 1.6 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
h = 125.0
|
h = 125.0
|
||||||
|
|||||||
@ -36,9 +36,7 @@ class PartyWindow(bui.Window):
|
|||||||
self._height = (
|
self._height = (
|
||||||
365
|
365
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 480
|
else 480 if uiscale is bui.UIScale.MEDIUM else 600
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 600
|
|
||||||
)
|
)
|
||||||
self._display_old_msgs = True
|
self._display_old_msgs = True
|
||||||
super().__init__(
|
super().__init__(
|
||||||
@ -52,15 +50,15 @@ class PartyWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
2.0
|
2.0
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.35
|
else 1.35 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 1.0
|
stack_offset=(
|
||||||
|
(0, -10)
|
||||||
|
if uiscale is bui.UIScale.SMALL
|
||||||
|
else (
|
||||||
|
(240, 0) if uiscale is bui.UIScale.MEDIUM else (330, 20)
|
||||||
|
)
|
||||||
),
|
),
|
||||||
stack_offset=(0, -10)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (240, 0)
|
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else (330, 20),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -251,9 +249,7 @@ class PartyWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
2.3
|
2.3
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.65
|
else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.23
|
|
||||||
),
|
),
|
||||||
choices=choices,
|
choices=choices,
|
||||||
choices_display=choices_display,
|
choices_display=choices_display,
|
||||||
@ -312,9 +308,7 @@ class PartyWindow(bui.Window):
|
|||||||
columns = (
|
columns = (
|
||||||
1
|
1
|
||||||
if len(self._roster) == 1
|
if len(self._roster) == 1
|
||||||
else 2
|
else 2 if len(self._roster) == 2 else 3
|
||||||
if len(self._roster) == 2
|
|
||||||
else 3
|
|
||||||
)
|
)
|
||||||
rows = int(math.ceil(float(len(self._roster)) / columns))
|
rows = int(math.ceil(float(len(self._roster)) / columns))
|
||||||
c_width = (self._width * 0.9) / max(3, columns)
|
c_width = (self._width * 0.9) / max(3, columns)
|
||||||
@ -572,9 +566,7 @@ class PartyWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
2.3
|
2.3
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.65
|
else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.23
|
|
||||||
),
|
),
|
||||||
choices=['kick'],
|
choices=['kick'],
|
||||||
choices_display=[kick_str],
|
choices_display=[kick_str],
|
||||||
|
|||||||
@ -274,9 +274,7 @@ class PartyQueueWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.4
|
1.4
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.2
|
else 1.2 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -57,9 +57,7 @@ class PlayWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.6
|
1.6
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 0.9
|
else 0.9 if uiscale is bui.UIScale.MEDIUM else 0.8
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 0.8
|
|
||||||
),
|
),
|
||||||
stack_offset=(0, 0) if uiscale is bui.UIScale.SMALL else (0, 0),
|
stack_offset=(0, 0) if uiscale is bui.UIScale.SMALL else (0, 0),
|
||||||
)
|
)
|
||||||
@ -83,9 +81,11 @@ class PlayWindow(bui.Window):
|
|||||||
# (101 if main_menu else 61)),
|
# (101 if main_menu else 61)),
|
||||||
size=(0, 0),
|
size=(0, 0),
|
||||||
text=bui.Lstr(
|
text=bui.Lstr(
|
||||||
resource=(self._r + '.titleText')
|
resource=(
|
||||||
if self._is_main_menu
|
(self._r + '.titleText')
|
||||||
else 'playlistsText'
|
if self._is_main_menu
|
||||||
|
else 'playlistsText'
|
||||||
|
)
|
||||||
),
|
),
|
||||||
scale=1.7,
|
scale=1.7,
|
||||||
res_scale=2.0,
|
res_scale=2.0,
|
||||||
@ -494,18 +494,22 @@ class PlayWindow(bui.Window):
|
|||||||
bui.containerwidget(
|
bui.containerwidget(
|
||||||
edit=self._root_widget,
|
edit=self._root_widget,
|
||||||
on_cancel_call=self._back,
|
on_cancel_call=self._back,
|
||||||
selected_child=self._coop_button
|
selected_child=(
|
||||||
if self._is_main_menu
|
self._coop_button
|
||||||
else self._teams_button,
|
if self._is_main_menu
|
||||||
|
else self._teams_button
|
||||||
|
),
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
bui.buttonwidget(edit=back_button, on_activate_call=self._back)
|
bui.buttonwidget(edit=back_button, on_activate_call=self._back)
|
||||||
bui.containerwidget(
|
bui.containerwidget(
|
||||||
edit=self._root_widget,
|
edit=self._root_widget,
|
||||||
cancel_button=back_button,
|
cancel_button=back_button,
|
||||||
selected_child=self._coop_button
|
selected_child=(
|
||||||
if self._is_main_menu
|
self._coop_button
|
||||||
else self._teams_button,
|
if self._is_main_menu
|
||||||
|
else self._teams_button
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
self._restore_state()
|
self._restore_state()
|
||||||
|
|||||||
@ -30,9 +30,7 @@ class PlaylistAddGameWindow(bui.Window):
|
|||||||
self._height = (
|
self._height = (
|
||||||
346
|
346
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 380
|
else 380 if uiscale is bui.UIScale.MEDIUM else 440
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 440
|
|
||||||
)
|
)
|
||||||
top_extra = 30 if uiscale is bui.UIScale.SMALL else 20
|
top_extra = 30 if uiscale is bui.UIScale.SMALL else 20
|
||||||
self._scroll_width = 210
|
self._scroll_width = 210
|
||||||
@ -44,9 +42,7 @@ class PlaylistAddGameWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
2.17
|
2.17
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.5
|
else 1.5 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
),
|
),
|
||||||
stack_offset=(0, 1) if uiscale is bui.UIScale.SMALL else (0, 0),
|
stack_offset=(0, 1) if uiscale is bui.UIScale.SMALL else (0, 0),
|
||||||
)
|
)
|
||||||
|
|||||||
@ -67,9 +67,7 @@ class PlaylistBrowserWindow(bui.Window):
|
|||||||
self._height = (
|
self._height = (
|
||||||
480
|
480
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 510
|
else 510 if uiscale is bui.UIScale.MEDIUM else 580
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 580
|
|
||||||
)
|
)
|
||||||
|
|
||||||
top_extra = 20 if uiscale is bui.UIScale.SMALL else 0
|
top_extra = 20 if uiscale is bui.UIScale.SMALL else 0
|
||||||
@ -83,13 +81,11 @@ class PlaylistBrowserWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.69
|
1.69
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.05
|
else 1.05 if uiscale is bui.UIScale.MEDIUM else 0.9
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 0.9
|
stack_offset=(
|
||||||
|
(0, -26) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(0, -26)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (0, 0),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -714,9 +710,9 @@ class PlaylistBrowserWindow(bui.Window):
|
|||||||
)
|
)
|
||||||
if self._selected_playlist != prev_sel:
|
if self._selected_playlist != prev_sel:
|
||||||
cfg = bui.app.config
|
cfg = bui.app.config
|
||||||
cfg[
|
cfg[self._pvars.config_name + ' Playlist Selection'] = (
|
||||||
self._pvars.config_name + ' Playlist Selection'
|
self._selected_playlist
|
||||||
] = self._selected_playlist
|
)
|
||||||
cfg.commit()
|
cfg.commit()
|
||||||
|
|
||||||
self._save_state()
|
self._save_state()
|
||||||
|
|||||||
@ -36,9 +36,7 @@ class PlaylistEditWindow(bui.Window):
|
|||||||
self._height = (
|
self._height = (
|
||||||
400
|
400
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 470
|
else 470 if uiscale is bui.UIScale.MEDIUM else 540
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 540
|
|
||||||
)
|
)
|
||||||
|
|
||||||
top_extra = 20 if uiscale is bui.UIScale.SMALL else 0
|
top_extra = 20 if uiscale is bui.UIScale.SMALL else 0
|
||||||
@ -49,13 +47,11 @@ class PlaylistEditWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
2.0
|
2.0
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.3
|
else 1.3 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 1.0
|
stack_offset=(
|
||||||
|
(0, -16) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(0, -16)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (0, 0),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
cancel_button = bui.buttonwidget(
|
cancel_button = bui.buttonwidget(
|
||||||
@ -149,9 +145,7 @@ class PlaylistEditWindow(bui.Window):
|
|||||||
scl = (
|
scl = (
|
||||||
1.03
|
1.03
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.36
|
else 1.36 if uiscale is bui.UIScale.MEDIUM else 1.74
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.74
|
|
||||||
)
|
)
|
||||||
v -= 63.0 * scl
|
v -= 63.0 * scl
|
||||||
|
|
||||||
|
|||||||
@ -108,9 +108,7 @@ class PlaylistEditGameWindow(bui.Window):
|
|||||||
height = (
|
height = (
|
||||||
365
|
365
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 460
|
else 460 if uiscale is bui.UIScale.MEDIUM else 550
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 550
|
|
||||||
)
|
)
|
||||||
spacing = 52
|
spacing = 52
|
||||||
y_extra = 15
|
y_extra = 15
|
||||||
@ -129,13 +127,11 @@ class PlaylistEditGameWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
2.19
|
2.19
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.35
|
else 1.35 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 1.0
|
stack_offset=(
|
||||||
|
(0, -17) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(0, -17)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (0, 0),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -143,9 +139,11 @@ class PlaylistEditGameWindow(bui.Window):
|
|||||||
parent=self._root_widget,
|
parent=self._root_widget,
|
||||||
position=(45 + x_inset, height - 82 + y_extra2),
|
position=(45 + x_inset, height - 82 + y_extra2),
|
||||||
size=(180, 70) if is_add else (180, 65),
|
size=(180, 70) if is_add else (180, 65),
|
||||||
label=bui.Lstr(resource='backText')
|
label=(
|
||||||
if is_add
|
bui.Lstr(resource='backText')
|
||||||
else bui.Lstr(resource='cancelText'),
|
if is_add
|
||||||
|
else bui.Lstr(resource='cancelText')
|
||||||
|
),
|
||||||
button_type='back' if is_add else None,
|
button_type='back' if is_add else None,
|
||||||
autoselect=True,
|
autoselect=True,
|
||||||
scale=0.75,
|
scale=0.75,
|
||||||
@ -160,9 +158,11 @@ class PlaylistEditGameWindow(bui.Window):
|
|||||||
size=(200, 65),
|
size=(200, 65),
|
||||||
scale=0.75,
|
scale=0.75,
|
||||||
text_scale=1.3,
|
text_scale=1.3,
|
||||||
label=bui.Lstr(resource=self._r + '.addGameText')
|
label=(
|
||||||
if is_add
|
bui.Lstr(resource=self._r + '.addGameText')
|
||||||
else bui.Lstr(resource='doneText'),
|
if is_add
|
||||||
|
else bui.Lstr(resource='doneText')
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
if bui.app.ui_v1.use_toolbars:
|
if bui.app.ui_v1.use_toolbars:
|
||||||
@ -447,9 +447,11 @@ class PlaylistEditGameWindow(bui.Window):
|
|||||||
parent=self._subcontainer,
|
parent=self._subcontainer,
|
||||||
position=(h + 509 - 95, v),
|
position=(h + 509 - 95, v),
|
||||||
size=(0, 28),
|
size=(0, 28),
|
||||||
text=bui.Lstr(resource='onText')
|
text=(
|
||||||
if value
|
bui.Lstr(resource='onText')
|
||||||
else bui.Lstr(resource='offText'),
|
if value
|
||||||
|
else bui.Lstr(resource='offText')
|
||||||
|
),
|
||||||
editable=False,
|
editable=False,
|
||||||
color=(0.6, 1.0, 0.6, 1.0),
|
color=(0.6, 1.0, 0.6, 1.0),
|
||||||
maxwidth=mw2,
|
maxwidth=mw2,
|
||||||
@ -566,9 +568,11 @@ class PlaylistEditGameWindow(bui.Window):
|
|||||||
) -> None:
|
) -> None:
|
||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
edit=widget,
|
edit=widget,
|
||||||
text=bui.Lstr(resource='onText')
|
text=(
|
||||||
if value
|
bui.Lstr(resource='onText')
|
||||||
else bui.Lstr(resource='offText'),
|
if value
|
||||||
|
else bui.Lstr(resource='offText')
|
||||||
|
),
|
||||||
)
|
)
|
||||||
self._settings[setting_name] = value
|
self._settings[setting_name] = value
|
||||||
|
|
||||||
|
|||||||
@ -49,9 +49,7 @@ class PlaylistMapSelectWindow(bui.Window):
|
|||||||
height = (
|
height = (
|
||||||
400
|
400
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 480
|
else 480 if uiscale is bui.UIScale.MEDIUM else 600
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 600
|
|
||||||
)
|
)
|
||||||
|
|
||||||
top_extra = 20 if uiscale is bui.UIScale.SMALL else 0
|
top_extra = 20 if uiscale is bui.UIScale.SMALL else 0
|
||||||
@ -62,13 +60,11 @@ class PlaylistMapSelectWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
2.17
|
2.17
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.3
|
else 1.3 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 1.0
|
stack_offset=(
|
||||||
|
(0, -27) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(0, -27)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (0, 0),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -93,9 +93,7 @@ class SharePlaylistResultsWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.8
|
1.8
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.35
|
else 1.35 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -223,12 +223,14 @@ class PopupMenuWindow(PopupWindow):
|
|||||||
size=(self._width - 40, 28),
|
size=(self._width - 40, 28),
|
||||||
on_select_call=bui.Call(self._select, index),
|
on_select_call=bui.Call(self._select, index),
|
||||||
click_activate=True,
|
click_activate=True,
|
||||||
color=(0.5, 0.5, 0.5, 0.5)
|
color=(
|
||||||
if inactive
|
(0.5, 0.5, 0.5, 0.5)
|
||||||
else (
|
if inactive
|
||||||
(0.5, 1, 0.5, 1)
|
else (
|
||||||
if choice == self._current_choice
|
(0.5, 1, 0.5, 1)
|
||||||
else (0.8, 0.8, 0.8, 1.0)
|
if choice == self._current_choice
|
||||||
|
else (0.8, 0.8, 0.8, 1.0)
|
||||||
|
)
|
||||||
),
|
),
|
||||||
padding=0,
|
padding=0,
|
||||||
maxwidth=maxwidth,
|
maxwidth=maxwidth,
|
||||||
@ -318,9 +320,7 @@ class PopupMenu:
|
|||||||
scale = (
|
scale = (
|
||||||
2.3
|
2.3
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.65
|
else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.23
|
|
||||||
)
|
)
|
||||||
if current_choice not in choices:
|
if current_choice not in choices:
|
||||||
current_choice = None
|
current_choice = None
|
||||||
|
|||||||
@ -38,9 +38,7 @@ class ProfileBrowserWindow(bui.Window):
|
|||||||
self._height = (
|
self._height = (
|
||||||
360.0
|
360.0
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 385.0
|
else 385.0 if uiscale is bui.UIScale.MEDIUM else 410.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 410.0
|
|
||||||
)
|
)
|
||||||
|
|
||||||
# If we're being called up standalone, handle pause/resume ourself.
|
# If we're being called up standalone, handle pause/resume ourself.
|
||||||
@ -74,13 +72,11 @@ class ProfileBrowserWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
2.2
|
2.2
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.6
|
else 1.6 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 1.0
|
stack_offset=(
|
||||||
|
(0, -14) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(0, -14)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (0, 0),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -125,9 +121,7 @@ class ProfileBrowserWindow(bui.Window):
|
|||||||
scl = (
|
scl = (
|
||||||
1.055
|
1.055
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.18
|
else 1.18 if uiscale is bui.UIScale.MEDIUM else 1.3
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.3
|
|
||||||
)
|
)
|
||||||
v -= 70.0 * scl
|
v -= 70.0 * scl
|
||||||
self._new_button = bui.buttonwidget(
|
self._new_button = bui.buttonwidget(
|
||||||
|
|||||||
@ -65,17 +65,13 @@ class EditProfileWindow(bui.Window):
|
|||||||
self._height = height = (
|
self._height = height = (
|
||||||
350.0
|
350.0
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 400.0
|
else 400.0 if uiscale is bui.UIScale.MEDIUM else 450.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 450.0
|
|
||||||
)
|
)
|
||||||
spacing = 40
|
spacing = 40
|
||||||
self._base_scale = (
|
self._base_scale = (
|
||||||
2.05
|
2.05
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.5
|
else 1.5 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
)
|
)
|
||||||
top_extra = 15 if uiscale is bui.UIScale.SMALL else 15
|
top_extra = 15 if uiscale is bui.UIScale.SMALL else 15
|
||||||
super().__init__(
|
super().__init__(
|
||||||
@ -83,9 +79,9 @@ class EditProfileWindow(bui.Window):
|
|||||||
size=(width, height + top_extra),
|
size=(width, height + top_extra),
|
||||||
transition=transition,
|
transition=transition,
|
||||||
scale=self._base_scale,
|
scale=self._base_scale,
|
||||||
stack_offset=(0, 15)
|
stack_offset=(
|
||||||
if uiscale is bui.UIScale.SMALL
|
(0, 15) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
else (0, 0),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
cancel_button = btn = bui.buttonwidget(
|
cancel_button = btn = bui.buttonwidget(
|
||||||
@ -475,9 +471,11 @@ class EditProfileWindow(bui.Window):
|
|||||||
parent=self._root_widget,
|
parent=self._root_widget,
|
||||||
autoselect=True,
|
autoselect=True,
|
||||||
position=(self._width * 0.5 + b_offs - b_size * 0.5, v - 50),
|
position=(self._width * 0.5 + b_offs - b_size * 0.5, v - 50),
|
||||||
up_widget=self._upgrade_button
|
up_widget=(
|
||||||
if self._upgrade_button is not None
|
self._upgrade_button
|
||||||
else self._account_type_info_button,
|
if self._upgrade_button is not None
|
||||||
|
else self._account_type_info_button
|
||||||
|
),
|
||||||
size=(b_size, b_size),
|
size=(b_size, b_size),
|
||||||
color=self._highlight,
|
color=self._highlight,
|
||||||
label='',
|
label='',
|
||||||
|
|||||||
@ -39,9 +39,7 @@ class ProfileUpgradeWindow(bui.Window):
|
|||||||
self._base_scale = (
|
self._base_scale = (
|
||||||
2.05
|
2.05
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.5
|
else 1.5 if uiscale is bui.UIScale.MEDIUM else 1.2
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.2
|
|
||||||
)
|
)
|
||||||
self._upgrade_start_time: float | None = None
|
self._upgrade_start_time: float | None = None
|
||||||
self._name = edit_profile_window.getname()
|
self._name = edit_profile_window.getname()
|
||||||
@ -54,9 +52,9 @@ class ProfileUpgradeWindow(bui.Window):
|
|||||||
toolbar_visibility='menu_currency',
|
toolbar_visibility='menu_currency',
|
||||||
transition=transition,
|
transition=transition,
|
||||||
scale=self._base_scale,
|
scale=self._base_scale,
|
||||||
stack_offset=(0, 15)
|
stack_offset=(
|
||||||
if uiscale is bui.UIScale.SMALL
|
(0, 15) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
else (0, 0),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
cancel_button = bui.buttonwidget(
|
cancel_button = bui.buttonwidget(
|
||||||
|
|||||||
@ -47,9 +47,7 @@ class PromoCodeWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
2.0
|
2.0
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.5
|
else 1.5 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -48,13 +48,11 @@ class PurchaseWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.2
|
1.2
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.1
|
else 1.1 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 1.0
|
stack_offset=(
|
||||||
|
(0, -15) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(0, -15)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (0, 0),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
self._is_double = False
|
self._is_double = False
|
||||||
|
|||||||
@ -19,9 +19,7 @@ class QRCodeWindow(PopupWindow):
|
|||||||
scale = (
|
scale = (
|
||||||
2.3
|
2.3
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.65
|
else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.23
|
|
||||||
)
|
)
|
||||||
self._transitioning_out = False
|
self._transitioning_out = False
|
||||||
self._width = 450
|
self._width = 450
|
||||||
|
|||||||
@ -29,9 +29,7 @@ class ReportPlayerWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.8
|
1.8
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.35
|
else 1.35 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -19,9 +19,7 @@ class ResourceTypeInfoWindow(PopupWindow):
|
|||||||
scale = (
|
scale = (
|
||||||
2.3
|
2.3
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.65
|
else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.23
|
|
||||||
)
|
)
|
||||||
self._transitioning_out = False
|
self._transitioning_out = False
|
||||||
self._width = 570
|
self._width = 570
|
||||||
|
|||||||
@ -51,9 +51,7 @@ class ServerDialogWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.8
|
1.8
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.35
|
else 1.35 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -114,9 +112,11 @@ class ServerDialogWindow(bui.Window):
|
|||||||
self._ok_button = bui.buttonwidget(
|
self._ok_button = bui.buttonwidget(
|
||||||
parent=self._root_widget,
|
parent=self._root_widget,
|
||||||
position=(
|
position=(
|
||||||
(self._width - 182)
|
(
|
||||||
if (data.show_cancel or show_copy)
|
(self._width - 182)
|
||||||
else (self._width * 0.5 - 80),
|
if (data.show_cancel or show_copy)
|
||||||
|
else (self._width * 0.5 - 80)
|
||||||
|
),
|
||||||
30,
|
30,
|
||||||
),
|
),
|
||||||
size=(160, 60),
|
size=(160, 60),
|
||||||
|
|||||||
@ -52,9 +52,7 @@ class AdvancedSettingsWindow(bui.Window):
|
|||||||
self._height = (
|
self._height = (
|
||||||
390.0
|
390.0
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 450.0
|
else 450.0 if uiscale is bui.UIScale.MEDIUM else 520.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 520.0
|
|
||||||
)
|
)
|
||||||
self._lang_status_text: bui.Widget | None = None
|
self._lang_status_text: bui.Widget | None = None
|
||||||
|
|
||||||
@ -71,13 +69,11 @@ class AdvancedSettingsWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
2.06
|
2.06
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.4
|
else 1.4 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 1.0
|
stack_offset=(
|
||||||
|
(0, -25) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(0, -25)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (0, 0),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -202,30 +198,38 @@ class AdvancedSettingsWindow(bui.Window):
|
|||||||
up_to_date = bui.app.lang.language in self._complete_langs_list
|
up_to_date = bui.app.lang.language in self._complete_langs_list
|
||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
edit=self._lang_status_text,
|
edit=self._lang_status_text,
|
||||||
text=''
|
text=(
|
||||||
if bui.app.lang.language == 'Test'
|
''
|
||||||
else bui.Lstr(
|
if bui.app.lang.language == 'Test'
|
||||||
resource=f'{self._r}.translationNoUpdateNeededText'
|
else (
|
||||||
)
|
bui.Lstr(
|
||||||
if up_to_date
|
resource=f'{self._r}.translationNoUpdateNeededText'
|
||||||
else bui.Lstr(
|
)
|
||||||
resource=f'{self._r}.translationUpdateNeededText'
|
if up_to_date
|
||||||
|
else bui.Lstr(
|
||||||
|
resource=f'{self._r}.translationUpdateNeededText'
|
||||||
|
)
|
||||||
|
)
|
||||||
|
),
|
||||||
|
color=(
|
||||||
|
(0.2, 1.0, 0.2, 0.8) if up_to_date else (1.0, 0.2, 0.2, 0.8)
|
||||||
),
|
),
|
||||||
color=(0.2, 1.0, 0.2, 0.8)
|
|
||||||
if up_to_date
|
|
||||||
else (1.0, 0.2, 0.2, 0.8),
|
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
edit=self._lang_status_text,
|
edit=self._lang_status_text,
|
||||||
text=bui.Lstr(resource=f'{self._r}.translationFetchErrorText')
|
text=(
|
||||||
if self._complete_langs_error
|
bui.Lstr(resource=f'{self._r}.translationFetchErrorText')
|
||||||
else bui.Lstr(
|
if self._complete_langs_error
|
||||||
resource=f'{self._r}.translationFetchingStatusText'
|
else bui.Lstr(
|
||||||
|
resource=f'{self._r}.translationFetchingStatusText'
|
||||||
|
)
|
||||||
|
),
|
||||||
|
color=(
|
||||||
|
(1.0, 0.5, 0.2)
|
||||||
|
if self._complete_langs_error
|
||||||
|
else (0.7, 0.7, 0.7)
|
||||||
),
|
),
|
||||||
color=(1.0, 0.5, 0.2)
|
|
||||||
if self._complete_langs_error
|
|
||||||
else (0.7, 0.7, 0.7),
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def _rebuild(self) -> None:
|
def _rebuild(self) -> None:
|
||||||
|
|||||||
@ -56,13 +56,11 @@ class AllSettingsWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.75
|
1.75
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.35
|
else 1.35 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 1.0
|
stack_offset=(
|
||||||
|
(0, -8) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(0, -8)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (0, 0),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -63,9 +63,7 @@ class AudioSettingsWindow(bui.Window):
|
|||||||
base_scale = (
|
base_scale = (
|
||||||
2.05
|
2.05
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.6
|
else 1.6 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
)
|
)
|
||||||
popup_menu_scale = base_scale * 1.2
|
popup_menu_scale = base_scale * 1.2
|
||||||
|
|
||||||
@ -75,9 +73,9 @@ class AudioSettingsWindow(bui.Window):
|
|||||||
transition=transition,
|
transition=transition,
|
||||||
scale=base_scale,
|
scale=base_scale,
|
||||||
scale_origin_stack_offset=scale_origin,
|
scale_origin_stack_offset=scale_origin,
|
||||||
stack_offset=(0, -20)
|
stack_offset=(
|
||||||
if uiscale is bui.UIScale.SMALL
|
(0, -20) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
else (0, 0),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -124,9 +124,7 @@ class ControlsSettingsWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
smallscale
|
smallscale
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.5
|
else 1.5 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -53,13 +53,11 @@ class GamepadSettingsWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.63
|
1.63
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.35
|
else 1.35 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 1.0
|
stack_offset=(
|
||||||
|
(-20, -16) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(-20, -16)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (0, 0),
|
|
||||||
transition=transition,
|
transition=transition,
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -543,16 +541,12 @@ class GamepadSettingsWindow(bui.Window):
|
|||||||
sval1 = (
|
sval1 = (
|
||||||
self._settings['analogStickLR' + self._ext]
|
self._settings['analogStickLR' + self._ext]
|
||||||
if 'analogStickLR' + self._ext in self._settings
|
if 'analogStickLR' + self._ext in self._settings
|
||||||
else 5
|
else 5 if self._is_secondary else None
|
||||||
if self._is_secondary
|
|
||||||
else None
|
|
||||||
)
|
)
|
||||||
sval2 = (
|
sval2 = (
|
||||||
self._settings['analogStickUD' + self._ext]
|
self._settings['analogStickUD' + self._ext]
|
||||||
if 'analogStickUD' + self._ext in self._settings
|
if 'analogStickUD' + self._ext in self._settings
|
||||||
else 6
|
else 6 if self._is_secondary else None
|
||||||
if self._is_secondary
|
|
||||||
else None
|
|
||||||
)
|
)
|
||||||
assert isinstance(sval1, (int, type(None)))
|
assert isinstance(sval1, (int, type(None)))
|
||||||
assert isinstance(sval2, (int, type(None)))
|
assert isinstance(sval2, (int, type(None)))
|
||||||
@ -595,9 +589,7 @@ class GamepadSettingsWindow(bui.Window):
|
|||||||
dpadnum = (
|
dpadnum = (
|
||||||
self._settings['dpad' + self._ext]
|
self._settings['dpad' + self._ext]
|
||||||
if 'dpad' + self._ext in self._settings
|
if 'dpad' + self._ext in self._settings
|
||||||
else 2
|
else 2 if self._is_secondary else None
|
||||||
if self._is_secondary
|
|
||||||
else None
|
|
||||||
)
|
)
|
||||||
assert isinstance(dpadnum, (int, type(None)))
|
assert isinstance(dpadnum, (int, type(None)))
|
||||||
if dpadnum is not None:
|
if dpadnum is not None:
|
||||||
@ -893,9 +885,7 @@ class AwaitGamepadInputWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
2.0
|
2.0
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.9
|
else 1.9 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
),
|
),
|
||||||
size=(width, height),
|
size=(width, height),
|
||||||
transition='in_scale',
|
transition='in_scale',
|
||||||
|
|||||||
@ -42,13 +42,11 @@ class GamepadAdvancedSettingsWindow(bui.Window):
|
|||||||
* (
|
* (
|
||||||
1.85
|
1.85
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.35
|
else 1.35 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 1.0
|
stack_offset=(
|
||||||
|
(0, -25) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(0, -25)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (0, 0),
|
|
||||||
scale_origin_stack_offset=(advb.get_screen_space_center()),
|
scale_origin_stack_offset=(advb.get_screen_space_center()),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -45,9 +45,7 @@ def gamepad_configure_callback(event: dict[str, Any]) -> None:
|
|||||||
scale=(
|
scale=(
|
||||||
1.7
|
1.7
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.4
|
else 1.4 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
),
|
),
|
||||||
size=(width, height),
|
size=(width, height),
|
||||||
transition='in_right',
|
transition='in_right',
|
||||||
@ -122,9 +120,7 @@ class GamepadSelectWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
2.3
|
2.3
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.5
|
else 1.5 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
),
|
),
|
||||||
size=(width, height),
|
size=(width, height),
|
||||||
transition='in_right',
|
transition='in_right',
|
||||||
|
|||||||
@ -75,9 +75,7 @@ class GraphicsSettingsWindow(bui.Window):
|
|||||||
base_scale = (
|
base_scale = (
|
||||||
2.0
|
2.0
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.5
|
else 1.5 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
)
|
)
|
||||||
popup_menu_scale = base_scale * 1.2
|
popup_menu_scale = base_scale * 1.2
|
||||||
v = height - 50
|
v = height - 50
|
||||||
@ -88,9 +86,9 @@ class GraphicsSettingsWindow(bui.Window):
|
|||||||
transition=transition,
|
transition=transition,
|
||||||
scale_origin_stack_offset=scale_origin,
|
scale_origin_stack_offset=scale_origin,
|
||||||
scale=base_scale,
|
scale=base_scale,
|
||||||
stack_offset=(0, -30)
|
stack_offset=(
|
||||||
if uiscale is bui.UIScale.SMALL
|
(0, -30) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
else (0, 0),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -174,9 +172,11 @@ class GraphicsSettingsWindow(bui.Window):
|
|||||||
width=150,
|
width=150,
|
||||||
scale=popup_menu_scale,
|
scale=popup_menu_scale,
|
||||||
choices=['Auto', 'Higher', 'High', 'Medium', 'Low'],
|
choices=['Auto', 'Higher', 'High', 'Medium', 'Low'],
|
||||||
choices_disabled=['Higher', 'High']
|
choices_disabled=(
|
||||||
if bui.get_max_graphics_quality() == 'Medium'
|
['Higher', 'High']
|
||||||
else [],
|
if bui.get_max_graphics_quality() == 'Medium'
|
||||||
|
else []
|
||||||
|
),
|
||||||
choices_display=[
|
choices_display=[
|
||||||
bui.Lstr(resource='autoText'),
|
bui.Lstr(resource='autoText'),
|
||||||
bui.Lstr(resource=self._r + '.higherText'),
|
bui.Lstr(resource=self._r + '.higherText'),
|
||||||
|
|||||||
@ -39,9 +39,7 @@ class ConfigKeyboardWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.6
|
1.6
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.3
|
else 1.3 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
),
|
),
|
||||||
stack_offset=(0, 5) if uiscale is bui.UIScale.SMALL else (0, 0),
|
stack_offset=(0, 5) if uiscale is bui.UIScale.SMALL else (0, 0),
|
||||||
transition=transition,
|
transition=transition,
|
||||||
@ -70,10 +68,10 @@ class ConfigKeyboardWindow(bui.Window):
|
|||||||
'buttonLeft',
|
'buttonLeft',
|
||||||
'buttonRight',
|
'buttonRight',
|
||||||
]:
|
]:
|
||||||
self._settings[
|
self._settings[button] = (
|
||||||
button
|
bui.app.classic.get_input_device_mapped_value(
|
||||||
] = bui.app.classic.get_input_device_mapped_value(
|
self._input, button
|
||||||
self._input, button
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
cancel_button = bui.buttonwidget(
|
cancel_button = bui.buttonwidget(
|
||||||
@ -347,9 +345,7 @@ class AwaitKeyboardInputWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
2.0
|
2.0
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.5
|
else 1.5 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -37,9 +37,7 @@ class NetTestingWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.56
|
1.56
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.2
|
else 1.2 if uiscale is bui.UIScale.MEDIUM else 0.8
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 0.8
|
|
||||||
),
|
),
|
||||||
stack_offset=(0.0, -7 if uiscale is bui.UIScale.SMALL else 0.0),
|
stack_offset=(0.0, -7 if uiscale is bui.UIScale.SMALL else 0.0),
|
||||||
transition=transition,
|
transition=transition,
|
||||||
|
|||||||
@ -58,9 +58,7 @@ class PluginWindow(bui.Window):
|
|||||||
self._height = (
|
self._height = (
|
||||||
390.0
|
390.0
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 450.0
|
else 450.0 if uiscale is bui.UIScale.MEDIUM else 520.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 520.0
|
|
||||||
)
|
)
|
||||||
top_extra = 10 if uiscale is bui.UIScale.SMALL else 0
|
top_extra = 10 if uiscale is bui.UIScale.SMALL else 0
|
||||||
super().__init__(
|
super().__init__(
|
||||||
@ -72,13 +70,11 @@ class PluginWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
2.06
|
2.06
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.4
|
else 1.4 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 1.0
|
stack_offset=(
|
||||||
|
(0, -25) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(0, -25)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (0, 0),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -252,9 +248,7 @@ class PluginWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
2.3
|
2.3
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.65
|
else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.23
|
|
||||||
),
|
),
|
||||||
choices=[c.value for c in Category],
|
choices=[c.value for c in Category],
|
||||||
choices_display=[bui.Lstr(resource=c.resource) for c in Category],
|
choices_display=[bui.Lstr(resource=c.resource) for c in Category],
|
||||||
@ -365,9 +359,11 @@ class PluginWindow(bui.Window):
|
|||||||
textcolor=(
|
textcolor=(
|
||||||
(0.8, 0.3, 0.3)
|
(0.8, 0.3, 0.3)
|
||||||
if (plugspec.attempted_load and plugspec.plugin is None)
|
if (plugspec.attempted_load and plugspec.plugin is None)
|
||||||
else (0.6, 0.6, 0.6)
|
else (
|
||||||
if plugspec.plugin is None
|
(0.6, 0.6, 0.6)
|
||||||
else (0, 1, 0)
|
if plugspec.plugin is None
|
||||||
|
else (0, 1, 0)
|
||||||
|
)
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
# noinspection PyUnresolvedReferences
|
# noinspection PyUnresolvedReferences
|
||||||
|
|||||||
@ -22,9 +22,7 @@ class PluginSettingsWindow(bui.Window):
|
|||||||
height = (
|
height = (
|
||||||
365.0
|
365.0
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 300.0
|
else 300.0 if uiscale is bui.UIScale.MEDIUM else 370.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 370.0
|
|
||||||
)
|
)
|
||||||
top_extra = 10 if uiscale is bui.UIScale.SMALL else 0
|
top_extra = 10 if uiscale is bui.UIScale.SMALL else 0
|
||||||
|
|
||||||
@ -37,13 +35,11 @@ class PluginSettingsWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
2.06
|
2.06
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.4
|
else 1.4 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 1.0
|
stack_offset=(
|
||||||
|
(0, -25) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(0, -25)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (0, 0),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -24,13 +24,11 @@ class RemoteAppSettingsWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.85
|
1.85
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.3
|
else 1.3 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 1.0
|
stack_offset=(
|
||||||
|
(-10, 0) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(-10, 0)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (0, 0),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
btn = bui.buttonwidget(
|
btn = bui.buttonwidget(
|
||||||
|
|||||||
@ -36,13 +36,11 @@ class TestingWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
2.5
|
2.5
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.2
|
else 1.2 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 1.0
|
stack_offset=(
|
||||||
|
(0, -28) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(0, -28)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (0, 0),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
self._back_button = btn = bui.buttonwidget(
|
self._back_button = btn = bui.buttonwidget(
|
||||||
@ -114,9 +112,9 @@ class TestingWindow(bui.Window):
|
|||||||
# If we haven't yet, record the default value for this name so
|
# If we haven't yet, record the default value for this name so
|
||||||
# we can reset if we want..
|
# we can reset if we want..
|
||||||
if entry_name not in bui.app.classic.value_test_defaults:
|
if entry_name not in bui.app.classic.value_test_defaults:
|
||||||
bui.app.classic.value_test_defaults[
|
bui.app.classic.value_test_defaults[entry_name] = (
|
||||||
entry_name
|
bui.app.classic.value_test(entry_name)
|
||||||
] = bui.app.classic.value_test(entry_name)
|
)
|
||||||
|
|
||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
parent=self._subcontainer,
|
parent=self._subcontainer,
|
||||||
|
|||||||
@ -35,9 +35,7 @@ class TouchscreenSettingsWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.9
|
1.9
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.55
|
else 1.55 if uiscale is bui.UIScale.MEDIUM else 1.2
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.2
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -35,9 +35,7 @@ class SoundtrackEditWindow(bui.Window):
|
|||||||
self._height = (
|
self._height = (
|
||||||
395
|
395
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 450
|
else 450 if uiscale is bui.UIScale.MEDIUM else 560
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 560
|
|
||||||
)
|
)
|
||||||
super().__init__(
|
super().__init__(
|
||||||
root_widget=bui.containerwidget(
|
root_widget=bui.containerwidget(
|
||||||
@ -46,15 +44,13 @@ class SoundtrackEditWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
2.08
|
2.08
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.5
|
else 1.5 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 1.0
|
stack_offset=(
|
||||||
|
(0, -48)
|
||||||
|
if uiscale is bui.UIScale.SMALL
|
||||||
|
else (0, 15) if uiscale is bui.UIScale.MEDIUM else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(0, -48)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (0, 15)
|
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else (0, 0),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
cancel_button = bui.buttonwidget(
|
cancel_button = bui.buttonwidget(
|
||||||
@ -266,13 +262,11 @@ class SoundtrackEditWindow(bui.Window):
|
|||||||
icon=(
|
icon=(
|
||||||
self._file_tex
|
self._file_tex
|
||||||
if icon_type == 'file'
|
if icon_type == 'file'
|
||||||
else self._folder_tex
|
else self._folder_tex if icon_type == 'folder' else None
|
||||||
if icon_type == 'folder'
|
),
|
||||||
else None
|
icon_color=(
|
||||||
|
(1.1, 0.8, 0.2) if icon_type == 'folder' else (1, 1, 1)
|
||||||
),
|
),
|
||||||
icon_color=(1.1, 0.8, 0.2)
|
|
||||||
if icon_type == 'folder'
|
|
||||||
else (1, 1, 1),
|
|
||||||
left_widget=self._text_field,
|
left_widget=self._text_field,
|
||||||
iconscale=0.7,
|
iconscale=0.7,
|
||||||
autoselect=True,
|
autoselect=True,
|
||||||
@ -314,9 +308,11 @@ class SoundtrackEditWindow(bui.Window):
|
|||||||
label=bui.Lstr(resource=self._r + '.testText'),
|
label=bui.Lstr(resource=self._r + '.testText'),
|
||||||
text_scale=0.6,
|
text_scale=0.6,
|
||||||
on_activate_call=bui.Call(self._test, bs.MusicType(song_type)),
|
on_activate_call=bui.Call(self._test, bs.MusicType(song_type)),
|
||||||
up_widget=prev_test_button
|
up_widget=(
|
||||||
if prev_test_button is not None
|
prev_test_button
|
||||||
else self._text_field,
|
if prev_test_button is not None
|
||||||
|
else self._text_field
|
||||||
|
),
|
||||||
)
|
)
|
||||||
if prev_test_button is not None:
|
if prev_test_button is not None:
|
||||||
bui.widget(edit=prev_test_button, down_widget=btn)
|
bui.widget(edit=prev_test_button, down_widget=btn)
|
||||||
|
|||||||
@ -63,9 +63,7 @@ class SoundtrackEntryTypeSelectWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.7
|
1.7
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.4
|
else 1.4 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
cleanupcheck=False,
|
cleanupcheck=False,
|
||||||
|
|||||||
@ -86,13 +86,11 @@ class SpecialOfferWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.2
|
1.2
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.15
|
else 1.15 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 1.0
|
stack_offset=(
|
||||||
|
(0, -15) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(0, -15)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (0, 0),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
self._is_bundle_sale = False
|
self._is_bundle_sale = False
|
||||||
@ -310,9 +308,11 @@ class SpecialOfferWindow(bui.Window):
|
|||||||
|
|
||||||
self._cancel_button = bui.buttonwidget(
|
self._cancel_button = bui.buttonwidget(
|
||||||
parent=self._root_widget,
|
parent=self._root_widget,
|
||||||
position=(50, 40)
|
position=(
|
||||||
if self._is_bundle_sale
|
(50, 40)
|
||||||
else (self._width * 0.5 - 75, 40),
|
if self._is_bundle_sale
|
||||||
|
else (self._width * 0.5 - 75, 40)
|
||||||
|
),
|
||||||
size=(150, 60),
|
size=(150, 60),
|
||||||
scale=1.0,
|
scale=1.0,
|
||||||
on_activate_call=self._cancel,
|
on_activate_call=self._cancel,
|
||||||
@ -322,9 +322,11 @@ class SpecialOfferWindow(bui.Window):
|
|||||||
self._cancel_countdown_text = bui.textwidget(
|
self._cancel_countdown_text = bui.textwidget(
|
||||||
parent=self._root_widget,
|
parent=self._root_widget,
|
||||||
text='',
|
text='',
|
||||||
position=(50 + 150 + 20, 40 + 27)
|
position=(
|
||||||
if self._is_bundle_sale
|
(50 + 150 + 20, 40 + 27)
|
||||||
else (self._width * 0.5 - 75 + 150 + 20, 40 + 27),
|
if self._is_bundle_sale
|
||||||
|
else (self._width * 0.5 - 75 + 150 + 20, 40 + 27)
|
||||||
|
),
|
||||||
scale=1.1,
|
scale=1.1,
|
||||||
size=(0, 0),
|
size=(0, 0),
|
||||||
h_align='left',
|
h_align='left',
|
||||||
@ -349,12 +351,14 @@ class SpecialOfferWindow(bui.Window):
|
|||||||
bui.containerwidget(
|
bui.containerwidget(
|
||||||
edit=self._root_widget,
|
edit=self._root_widget,
|
||||||
cancel_button=self._cancel_button,
|
cancel_button=self._cancel_button,
|
||||||
start_button=self._purchase_button
|
start_button=(
|
||||||
if self._is_bundle_sale
|
self._purchase_button if self._is_bundle_sale else None
|
||||||
else None,
|
),
|
||||||
selected_child=self._purchase_button
|
selected_child=(
|
||||||
if self._is_bundle_sale
|
self._purchase_button
|
||||||
else display['button'],
|
if self._is_bundle_sale
|
||||||
|
else display['button']
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
def _stop_flashing(self) -> None:
|
def _stop_flashing(self) -> None:
|
||||||
@ -373,12 +377,12 @@ class SpecialOfferWindow(bui.Window):
|
|||||||
def _update_cancel_button_graphics(self) -> None:
|
def _update_cancel_button_graphics(self) -> None:
|
||||||
bui.buttonwidget(
|
bui.buttonwidget(
|
||||||
edit=self._cancel_button,
|
edit=self._cancel_button,
|
||||||
color=(0.5, 0.5, 0.5)
|
color=(
|
||||||
if self._cancel_delay > 0
|
(0.5, 0.5, 0.5) if self._cancel_delay > 0 else (0.7, 0.4, 0.34)
|
||||||
else (0.7, 0.4, 0.34),
|
),
|
||||||
textcolor=(0.5, 0.5, 0.5)
|
textcolor=(
|
||||||
if self._cancel_delay > 0
|
(0.5, 0.5, 0.5) if self._cancel_delay > 0 else (0.9, 0.9, 1.0)
|
||||||
else (0.9, 0.9, 1.0),
|
),
|
||||||
)
|
)
|
||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
edit=self._cancel_countdown_text,
|
edit=self._cancel_countdown_text,
|
||||||
|
|||||||
@ -81,9 +81,7 @@ class StoreBrowserWindow(bui.Window):
|
|||||||
self._height = (
|
self._height = (
|
||||||
578
|
578
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 645
|
else 645 if uiscale is bui.UIScale.MEDIUM else 800
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 800
|
|
||||||
)
|
)
|
||||||
self._current_tab: StoreBrowserWindow.TabID | None = None
|
self._current_tab: StoreBrowserWindow.TabID | None = None
|
||||||
extra_top = 30 if uiscale is bui.UIScale.SMALL else 0
|
extra_top = 30 if uiscale is bui.UIScale.SMALL else 0
|
||||||
@ -100,17 +98,13 @@ class StoreBrowserWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.3
|
1.3
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 0.9
|
else 0.9 if uiscale is bui.UIScale.MEDIUM else 0.8
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 0.8
|
|
||||||
),
|
),
|
||||||
scale_origin_stack_offset=scale_origin,
|
scale_origin_stack_offset=scale_origin,
|
||||||
stack_offset=(
|
stack_offset=(
|
||||||
(0, -5)
|
(0, -5)
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else (0, 0)
|
else (0, 0) if uiscale is bui.UIScale.MEDIUM else (0, 0)
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else (0, 0)
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@ -905,27 +899,23 @@ class StoreBrowserWindow(bui.Window):
|
|||||||
dummy_name = 'icons.foo'
|
dummy_name = 'icons.foo'
|
||||||
else:
|
else:
|
||||||
dummy_name = ''
|
dummy_name = ''
|
||||||
section[
|
section['button_size'] = (
|
||||||
'button_size'
|
cstore.get_store_item_display_size(dummy_name)
|
||||||
] = cstore.get_store_item_display_size(dummy_name)
|
)
|
||||||
section['v_spacing'] = (
|
section['v_spacing'] = (
|
||||||
-25
|
-25
|
||||||
if (
|
if (
|
||||||
self._tab == 'extras'
|
self._tab == 'extras'
|
||||||
and uiscale is bui.UIScale.SMALL
|
and uiscale is bui.UIScale.SMALL
|
||||||
)
|
)
|
||||||
else -17
|
else -17 if self._tab == 'characters' else 0
|
||||||
if self._tab == 'characters'
|
|
||||||
else 0
|
|
||||||
)
|
)
|
||||||
if 'title' not in section:
|
if 'title' not in section:
|
||||||
section['title'] = ''
|
section['title'] = ''
|
||||||
section['x_offs'] = (
|
section['x_offs'] = (
|
||||||
130
|
130
|
||||||
if self._tab == 'extras'
|
if self._tab == 'extras'
|
||||||
else 270
|
else 270 if self._tab == 'maps' else 0
|
||||||
if self._tab == 'maps'
|
|
||||||
else 0
|
|
||||||
)
|
)
|
||||||
section['y_offs'] = (
|
section['y_offs'] = (
|
||||||
20
|
20
|
||||||
@ -934,14 +924,14 @@ class StoreBrowserWindow(bui.Window):
|
|||||||
and uiscale is bui.UIScale.SMALL
|
and uiscale is bui.UIScale.SMALL
|
||||||
and bui.app.config.get('Merch Link')
|
and bui.app.config.get('Merch Link')
|
||||||
)
|
)
|
||||||
else 55
|
else (
|
||||||
if (
|
55
|
||||||
self._tab == 'extras'
|
if (
|
||||||
and uiscale is bui.UIScale.SMALL
|
self._tab == 'extras'
|
||||||
|
and uiscale is bui.UIScale.SMALL
|
||||||
|
)
|
||||||
|
else -20 if self._tab == 'icons' else 0
|
||||||
)
|
)
|
||||||
else -20
|
|
||||||
if self._tab == 'icons'
|
|
||||||
else 0
|
|
||||||
)
|
)
|
||||||
|
|
||||||
def instantiate(
|
def instantiate(
|
||||||
|
|||||||
@ -83,16 +83,20 @@ def instantiate_store_item_display(
|
|||||||
tint_color = (
|
tint_color = (
|
||||||
item_info['color']
|
item_info['color']
|
||||||
if 'color' in item_info
|
if 'color' in item_info
|
||||||
else character.default_color
|
else (
|
||||||
if character.default_color is not None
|
character.default_color
|
||||||
else (1, 1, 1)
|
if character.default_color is not None
|
||||||
|
else (1, 1, 1)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
tint2_color = (
|
tint2_color = (
|
||||||
item_info['highlight']
|
item_info['highlight']
|
||||||
if 'highlight' in item_info
|
if 'highlight' in item_info
|
||||||
else character.default_highlight
|
else (
|
||||||
if character.default_highlight is not None
|
character.default_highlight
|
||||||
else (1, 1, 1)
|
if character.default_highlight is not None
|
||||||
|
else (1, 1, 1)
|
||||||
|
)
|
||||||
)
|
)
|
||||||
icon_tex = character.icon_texture
|
icon_tex = character.icon_texture
|
||||||
tint_tex = character.icon_mask_texture
|
tint_tex = character.icon_mask_texture
|
||||||
|
|||||||
@ -33,9 +33,7 @@ class TeamNamesColorsWindow(PopupWindow):
|
|||||||
scale = (
|
scale = (
|
||||||
1.69
|
1.69
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.1
|
else 1.1 if uiscale is bui.UIScale.MEDIUM else 0.85
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 0.85
|
|
||||||
)
|
)
|
||||||
super().__init__(
|
super().__init__(
|
||||||
position=scale_origin, size=(self._width, self._height), scale=scale
|
position=scale_origin, size=(self._width, self._height), scale=scale
|
||||||
|
|||||||
@ -73,9 +73,7 @@ class TournamentEntryWindow(PopupWindow):
|
|||||||
scale = (
|
scale = (
|
||||||
2.3
|
2.3
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.65
|
else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.23
|
|
||||||
)
|
)
|
||||||
self._delegate = delegate
|
self._delegate = delegate
|
||||||
self._transitioning_out = False
|
self._transitioning_out = False
|
||||||
@ -203,9 +201,11 @@ class TournamentEntryWindow(PopupWindow):
|
|||||||
self._ad_text = bui.textwidget(
|
self._ad_text = bui.textwidget(
|
||||||
parent=self.root_widget,
|
parent=self.root_widget,
|
||||||
draw_controller=btn,
|
draw_controller=btn,
|
||||||
position=self._ad_text_position_remaining
|
position=(
|
||||||
if have_ad_tries_remaining
|
self._ad_text_position_remaining
|
||||||
else self._ad_text_position,
|
if have_ad_tries_remaining
|
||||||
|
else self._ad_text_position
|
||||||
|
),
|
||||||
size=(0, 0),
|
size=(0, 0),
|
||||||
h_align='center',
|
h_align='center',
|
||||||
v_align='center',
|
v_align='center',
|
||||||
@ -407,9 +407,11 @@ class TournamentEntryWindow(PopupWindow):
|
|||||||
):
|
):
|
||||||
plus.tournament_query(
|
plus.tournament_query(
|
||||||
args={
|
args={
|
||||||
'source': 'entry window'
|
'source': (
|
||||||
if self._tournament_activity is None
|
'entry window'
|
||||||
else 'retry entry window'
|
if self._tournament_activity is None
|
||||||
|
else 'retry entry window'
|
||||||
|
)
|
||||||
},
|
},
|
||||||
callback=bui.WeakCall(self._on_tournament_query_response),
|
callback=bui.WeakCall(self._on_tournament_query_response),
|
||||||
)
|
)
|
||||||
@ -448,35 +450,43 @@ class TournamentEntryWindow(PopupWindow):
|
|||||||
subs=[
|
subs=[
|
||||||
(
|
(
|
||||||
'${COUNT}',
|
'${COUNT}',
|
||||||
str(self._purchase_price)
|
(
|
||||||
if self._purchase_price is not None
|
str(self._purchase_price)
|
||||||
else '?',
|
if self._purchase_price is not None
|
||||||
|
else '?'
|
||||||
|
),
|
||||||
)
|
)
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
),
|
),
|
||||||
position=self._ticket_cost_text_position_free
|
position=(
|
||||||
if self._purchase_price == 0
|
self._ticket_cost_text_position_free
|
||||||
else self._ticket_cost_text_position,
|
if self._purchase_price == 0
|
||||||
|
else self._ticket_cost_text_position
|
||||||
|
),
|
||||||
scale=1.0 if self._purchase_price == 0 else 0.6,
|
scale=1.0 if self._purchase_price == 0 else 0.6,
|
||||||
)
|
)
|
||||||
|
|
||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
edit=self._free_plays_remaining_text,
|
edit=self._free_plays_remaining_text,
|
||||||
text=''
|
text=(
|
||||||
if (
|
''
|
||||||
self._tournament_info['freeTriesRemaining'] in [None, 0]
|
if (
|
||||||
or self._purchase_price != 0
|
self._tournament_info['freeTriesRemaining'] in [None, 0]
|
||||||
)
|
or self._purchase_price != 0
|
||||||
else '' + str(self._tournament_info['freeTriesRemaining']),
|
)
|
||||||
|
else '' + str(self._tournament_info['freeTriesRemaining'])
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
bui.imagewidget(
|
bui.imagewidget(
|
||||||
edit=self._ticket_img,
|
edit=self._ticket_img,
|
||||||
opacity=0.2 if self._purchase_price == 0 else 1.0,
|
opacity=0.2 if self._purchase_price == 0 else 1.0,
|
||||||
position=self._ticket_img_pos_free
|
position=(
|
||||||
if self._purchase_price == 0
|
self._ticket_img_pos_free
|
||||||
else self._ticket_img_pos,
|
if self._purchase_price == 0
|
||||||
|
else self._ticket_img_pos
|
||||||
|
),
|
||||||
)
|
)
|
||||||
|
|
||||||
if self._do_ad_btn:
|
if self._do_ad_btn:
|
||||||
@ -487,9 +497,11 @@ class TournamentEntryWindow(PopupWindow):
|
|||||||
)
|
)
|
||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
edit=self._ad_text,
|
edit=self._ad_text,
|
||||||
position=self._ad_text_position_remaining
|
position=(
|
||||||
if have_ad_tries_remaining
|
self._ad_text_position_remaining
|
||||||
else self._ad_text_position,
|
if have_ad_tries_remaining
|
||||||
|
else self._ad_text_position
|
||||||
|
),
|
||||||
color=(0, 1, 0) if enabled else (0.5, 0.5, 0.5),
|
color=(0, 1, 0) if enabled else (0.5, 0.5, 0.5),
|
||||||
)
|
)
|
||||||
bui.imagewidget(
|
bui.imagewidget(
|
||||||
@ -563,16 +575,18 @@ class TournamentEntryWindow(PopupWindow):
|
|||||||
bui.apptimer(0.1, bui.getsound('cashRegister').play)
|
bui.apptimer(0.1, bui.getsound('cashRegister').play)
|
||||||
bui.apptimer(
|
bui.apptimer(
|
||||||
1.0,
|
1.0,
|
||||||
lambda: bui.app.classic.launch_coop_game(
|
lambda: (
|
||||||
self._tournament_info['game'],
|
bui.app.classic.launch_coop_game(
|
||||||
args={
|
self._tournament_info['game'],
|
||||||
'min_players': self._tournament_info['minPlayers'],
|
args={
|
||||||
'max_players': self._tournament_info['maxPlayers'],
|
'min_players': self._tournament_info['minPlayers'],
|
||||||
'tournament_id': self._tournament_id,
|
'max_players': self._tournament_info['maxPlayers'],
|
||||||
},
|
'tournament_id': self._tournament_id,
|
||||||
)
|
},
|
||||||
if bui.app.classic is not None
|
)
|
||||||
else None,
|
if bui.app.classic is not None
|
||||||
|
else None
|
||||||
|
),
|
||||||
)
|
)
|
||||||
bui.apptimer(0.7, self._transition_out)
|
bui.apptimer(0.7, self._transition_out)
|
||||||
bui.screenmessage(
|
bui.screenmessage(
|
||||||
|
|||||||
@ -48,9 +48,7 @@ class TournamentScoresWindow(PopupWindow):
|
|||||||
scale = (
|
scale = (
|
||||||
2.3
|
2.3
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.65
|
else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.23
|
|
||||||
)
|
)
|
||||||
self._transitioning_out = False
|
self._transitioning_out = False
|
||||||
|
|
||||||
@ -58,9 +56,7 @@ class TournamentScoresWindow(PopupWindow):
|
|||||||
self._height = (
|
self._height = (
|
||||||
300
|
300
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 370
|
else 370 if uiscale is bui.UIScale.MEDIUM else 450
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 450
|
|
||||||
)
|
)
|
||||||
|
|
||||||
bg_color = (0.5, 0.4, 0.6)
|
bg_color = (0.5, 0.4, 0.6)
|
||||||
|
|||||||
@ -31,9 +31,7 @@ class TrophiesWindow(popup.PopupWindow):
|
|||||||
scale = (
|
scale = (
|
||||||
2.3
|
2.3
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.65
|
else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.23
|
|
||||||
)
|
)
|
||||||
self._transitioning_out = False
|
self._transitioning_out = False
|
||||||
self._width = 300
|
self._width = 300
|
||||||
@ -179,9 +177,9 @@ class TrophiesWindow(popup.PopupWindow):
|
|||||||
scale=0.4,
|
scale=0.4,
|
||||||
flatness=1.0,
|
flatness=1.0,
|
||||||
shadow=0.0,
|
shadow=0.0,
|
||||||
color=(0.63, 0.6, 0.75)
|
color=(
|
||||||
if (t_count > 0)
|
(0.63, 0.6, 0.75) if (t_count > 0) else (0.6, 0.6, 0.6, 0.4)
|
||||||
else (0.6, 0.6, 0.6, 0.4),
|
),
|
||||||
text=txt,
|
text=txt,
|
||||||
size=(0, 0),
|
size=(0, 0),
|
||||||
h_align='center',
|
h_align='center',
|
||||||
@ -193,9 +191,9 @@ class TrophiesWindow(popup.PopupWindow):
|
|||||||
parent=self._subcontainer,
|
parent=self._subcontainer,
|
||||||
position=(sub_width * 0.88, sub_height - 20 - incr * i),
|
position=(sub_width * 0.88, sub_height - 20 - incr * i),
|
||||||
maxwidth=sub_width * 0.3,
|
maxwidth=sub_width * 0.3,
|
||||||
color=(0.7, 0.8, 1.0)
|
color=(
|
||||||
if (t_count > 0)
|
(0.7, 0.8, 1.0) if (t_count > 0) else (0.9, 0.9, 1.0, 0.3)
|
||||||
else (0.9, 0.9, 1.0, 0.3),
|
),
|
||||||
flatness=1.0,
|
flatness=1.0,
|
||||||
shadow=0.0,
|
shadow=0.0,
|
||||||
scale=0.5,
|
scale=0.5,
|
||||||
|
|||||||
@ -27,9 +27,7 @@ class ShowURLWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.25
|
1.25
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.25
|
else 1.25 if uiscale is bui.UIScale.MEDIUM else 1.25
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.25
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -28,9 +28,7 @@ class V2UpgradeWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.25
|
1.25
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.25
|
else 1.25 if uiscale is bui.UIScale.MEDIUM else 1.25
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.25
|
|
||||||
),
|
),
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -60,9 +60,7 @@ class WatchWindow(bui.Window):
|
|||||||
self._height = (
|
self._height = (
|
||||||
578
|
578
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 670
|
else 670 if uiscale is bui.UIScale.MEDIUM else 800
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 800
|
|
||||||
)
|
)
|
||||||
self._current_tab: WatchWindow.TabID | None = None
|
self._current_tab: WatchWindow.TabID | None = None
|
||||||
extra_top = 20 if uiscale is bui.UIScale.SMALL else 0
|
extra_top = 20 if uiscale is bui.UIScale.SMALL else 0
|
||||||
@ -76,15 +74,13 @@ class WatchWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.3
|
1.3
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 0.97
|
else 0.97 if uiscale is bui.UIScale.MEDIUM else 0.8
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
),
|
||||||
else 0.8
|
stack_offset=(
|
||||||
|
(0, -10)
|
||||||
|
if uiscale is bui.UIScale.SMALL
|
||||||
|
else (0, 15) if uiscale is bui.UIScale.MEDIUM else (0, 0)
|
||||||
),
|
),
|
||||||
stack_offset=(0, -10)
|
|
||||||
if uiscale is bui.UIScale.SMALL
|
|
||||||
else (0, 15)
|
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else (0, 0),
|
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -249,16 +245,12 @@ class WatchWindow(bui.Window):
|
|||||||
b_height = (
|
b_height = (
|
||||||
107
|
107
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 142
|
else 142 if uiscale is bui.UIScale.MEDIUM else 190
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 190
|
|
||||||
)
|
)
|
||||||
b_space_extra = (
|
b_space_extra = (
|
||||||
0
|
0
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else -2
|
else -2 if uiscale is bui.UIScale.MEDIUM else -5
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else -5
|
|
||||||
)
|
)
|
||||||
|
|
||||||
b_color = (0.6, 0.53, 0.63)
|
b_color = (0.6, 0.53, 0.63)
|
||||||
@ -268,9 +260,7 @@ class WatchWindow(bui.Window):
|
|||||||
- (
|
- (
|
||||||
48
|
48
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 45
|
else 45 if uiscale is bui.UIScale.MEDIUM else 40
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 40
|
|
||||||
)
|
)
|
||||||
- b_height
|
- b_height
|
||||||
)
|
)
|
||||||
@ -393,9 +383,7 @@ class WatchWindow(bui.Window):
|
|||||||
scale=(
|
scale=(
|
||||||
1.8
|
1.8
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.55
|
else 1.55 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||||
if uiscale is bui.UIScale.MEDIUM
|
|
||||||
else 1.0
|
|
||||||
),
|
),
|
||||||
size=(c_width, c_height),
|
size=(c_width, c_height),
|
||||||
transition='in_scale',
|
transition='in_scale',
|
||||||
@ -581,9 +569,9 @@ class WatchWindow(bui.Window):
|
|||||||
parent=self._columnwidget,
|
parent=self._columnwidget,
|
||||||
size=(self._my_replays_scroll_width / t_scale, 30),
|
size=(self._my_replays_scroll_width / t_scale, 30),
|
||||||
selectable=True,
|
selectable=True,
|
||||||
color=(1.0, 1, 0.4)
|
color=(
|
||||||
if name == '__lastReplay.brp'
|
(1.0, 1, 0.4) if name == '__lastReplay.brp' else (1, 1, 1)
|
||||||
else (1, 1, 1),
|
),
|
||||||
always_highlight=True,
|
always_highlight=True,
|
||||||
on_select_call=bui.Call(self._on_my_replay_select, name),
|
on_select_call=bui.Call(self._on_my_replay_select, name),
|
||||||
on_activate_call=self._my_replays_watch_replay_button.activate,
|
on_activate_call=self._my_replays_watch_replay_button.activate,
|
||||||
|
|||||||
@ -699,8 +699,8 @@ auto Assets::GetPendingLoadCount() -> int {
|
|||||||
|
|
||||||
template <typename T>
|
template <typename T>
|
||||||
auto Assets::GetAssetPendingLoadCount(
|
auto Assets::GetAssetPendingLoadCount(
|
||||||
std::unordered_map<std::string, Object::Ref<T> >* t_list, AssetType type)
|
std::unordered_map<std::string, Object::Ref<T> >* t_list,
|
||||||
-> int {
|
AssetType type) -> int {
|
||||||
assert(g_base->InLogicThread());
|
assert(g_base->InLogicThread());
|
||||||
assert(asset_lists_locked_);
|
assert(asset_lists_locked_);
|
||||||
|
|
||||||
@ -1056,8 +1056,8 @@ void Assets::Prune(int level) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auto Assets::FindAssetFile(FileType type, const std::string& name)
|
auto Assets::FindAssetFile(FileType type,
|
||||||
-> std::string {
|
const std::string& name) -> std::string {
|
||||||
std::string file_out;
|
std::string file_out;
|
||||||
|
|
||||||
// We don't protect package-path access so make sure its always from here.
|
// We don't protect package-path access so make sure its always from here.
|
||||||
|
|||||||
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