mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-19 13:25:31 +08:00
cleaned up UIs to look decent on older less widescreen (16:9) phones
This commit is contained in:
parent
3f419c3233
commit
029dc1520c
56
.efrocachemap
generated
56
.efrocachemap
generated
@ -4096,26 +4096,26 @@
|
||||
"build/assets/windows/Win32/ucrtbased.dll": "2def5335207d41b21b9823f6805997f1",
|
||||
"build/assets/windows/Win32/vc_redist.x86.exe": "b08a55e2e77623fe657bea24f223a3ae",
|
||||
"build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599",
|
||||
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "009e9834589fdca68dad7af91b56a9ae",
|
||||
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "5f307993914ffd163b31824495103533",
|
||||
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "eb06b4b7905a67fb2b7e65d543872b8d",
|
||||
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "4fce2d86cf75558f089f8bc67476cd8e",
|
||||
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "954288b391c83f0c124d0ab9b2f3ef5b",
|
||||
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "1883286f80c4f53723f3d0338a3c3c31",
|
||||
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "ad63b8d21e6ae4fd0274875c4e66f6bf",
|
||||
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "f5c69292fa9b046ac86b9c938b139dbe",
|
||||
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "9e53108985b005b5c5403d992a8eb5bd",
|
||||
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "f5e9323ce05bdde512c4a853e0a46d71",
|
||||
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "1a572a5722992601bfc510499083d980",
|
||||
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "b26537fa8323d1fb159f4f07c035d0d3",
|
||||
"build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "a70a22456f7d6d3cc2826f27627f302d",
|
||||
"build/prefab/full/mac_x86_64_gui/release/ballisticakit": "868d55c194a4834d8a373c8d9300f4a1",
|
||||
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "1a35b2a949f8d900a1fb640592a6d5f9",
|
||||
"build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "f2465aed23f9dc56fe1ba17a8e528563",
|
||||
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "d32b49718718560b44ef3b4e99a1dd96",
|
||||
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "6ff6d0b91e51c4d3a8bb134be2bff23b",
|
||||
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "64c03fe1e1bc86b49079bf5dec74d484",
|
||||
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "b905501fa611121ae9e34db5fb841921",
|
||||
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "7fd769a5fba18ef66df318f3e37e997b",
|
||||
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "d1791e5fb831a8b2c9b57311e5150cfa",
|
||||
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "4ac30721dfa5733629e658b9c9f72c20",
|
||||
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "67efb133f38243baf802f50b675a5012",
|
||||
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "6422858d74bde927974f04650ef1dc42",
|
||||
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "c596fbb576be7d5a4a892423cbc38174",
|
||||
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "c7ca5174ea1aeeac78e6c08ee3d0a6fe",
|
||||
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "ba2405d69ae54d8cf94023c973fe0f9f",
|
||||
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "db91aff1e1646bd2bb0eab4281efe164",
|
||||
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "aab047ea9912fd75194c74ab91351a86",
|
||||
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "8b1a6d52494ec4430ca2431f6492663a",
|
||||
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "d8c3d60b782999942cdacb76c18dc33f",
|
||||
"build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "19d64c31b8c7e40bf81ca64b574eaf0c",
|
||||
"build/prefab/full/mac_x86_64_gui/release/ballisticakit": "7bfea504671ad515e4466fa8d79bc68c",
|
||||
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "92b49993780d368c00960887a96a18e5",
|
||||
"build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "99c3beebabf9ab885ba06b98131ad8f4",
|
||||
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "033636a6f1c6d4530ead7cb6e126b568",
|
||||
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "64223eac879a1b500564fa3e742dcd7e",
|
||||
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "0cc20eaf538e0cb0b98de0a3a55bba5c",
|
||||
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "a265f0275487fb15d30a050c8db145bf",
|
||||
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "ad908b297b41c2fdf13582e34c434245",
|
||||
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "086a2ce72497e44079ad6b747fc5439f",
|
||||
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "ad908b297b41c2fdf13582e34c434245",
|
||||
@ -4132,14 +4132,14 @@
|
||||
"build/prefab/lib/mac_x86_64_gui/release/libballisticaplus.a": "d7a1d4deb51b0792d083737477e6833b",
|
||||
"build/prefab/lib/mac_x86_64_server/debug/libballisticaplus.a": "4c11b81a574aa9af593f54db4d998e61",
|
||||
"build/prefab/lib/mac_x86_64_server/release/libballisticaplus.a": "d7a1d4deb51b0792d083737477e6833b",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "e900c88682cb4e25a3f36e798aa167db",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "d74de72b01b831df93e14a77f8351a75",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "44a8676feda50e8b831f707041b6053e",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "c7b6d06e55a914e94cf7ab84dd7ed617",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "cd7aab8432d4ba5eefd1d36261bc1928",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "1058ad3d671eb62dc52a971cf231f5e3",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "96908e3c333c66c2010136c11ac4fde6",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "d962d4f91a10bfae22e96c9e74466c4a",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "c454896ceaa45a8b17071e2640b3c05f",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "895bf9f6264abcafad739fd262105d4e",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "a35f999cae9384f769f5b159b4c4f6ae",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "862f051934a0f941800cf26b57aedc0f",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "0158bce6f4270a0e25ccffe8cde23215",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "a9d874c34cab4aa660cf607aca32363a",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "b65364291ce3784dbf5e873eeee0a41e",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "c91dfeeaa90ac17c3160cbe79dd468d5",
|
||||
"src/assets/ba_data/python/babase/_mgen/__init__.py": "f885fed7f2ed98ff2ba271f9dbe3391c",
|
||||
"src/assets/ba_data/python/babase/_mgen/enums.py": "794d258d59fd17a61752843a9a0551ad",
|
||||
"src/ballistica/base/mgen/pyembed/binding_base.inc": "efa61468cf098f77cc6a234461d8b86d",
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
### 1.7.37 (build 22012, api 9, 2024-09-24)
|
||||
### 1.7.37 (build 22013, api 9, 2024-09-25)
|
||||
- Bumping api version to 9. As you'll see below, there's some UI changes that
|
||||
will require a bit of work for any UI mods to adapt to. If your mods don't
|
||||
touch UI stuff at all you can simply bump your api version and call it a day.
|
||||
|
||||
@ -367,7 +367,6 @@
|
||||
"ba_data/python/bauiv1lib/__pycache__/__init__.cpython-312.opt-1.pyc",
|
||||
"ba_data/python/bauiv1lib/__pycache__/achievements.cpython-312.opt-1.pyc",
|
||||
"ba_data/python/bauiv1lib/__pycache__/appinvite.cpython-312.opt-1.pyc",
|
||||
"ba_data/python/bauiv1lib/__pycache__/benchmarks.cpython-312.opt-1.pyc",
|
||||
"ba_data/python/bauiv1lib/__pycache__/characterpicker.cpython-312.opt-1.pyc",
|
||||
"ba_data/python/bauiv1lib/__pycache__/colorpicker.cpython-312.opt-1.pyc",
|
||||
"ba_data/python/bauiv1lib/__pycache__/config.cpython-312.opt-1.pyc",
|
||||
@ -380,7 +379,7 @@
|
||||
"ba_data/python/bauiv1lib/__pycache__/fileselector.cpython-312.opt-1.pyc",
|
||||
"ba_data/python/bauiv1lib/__pycache__/getremote.cpython-312.opt-1.pyc",
|
||||
"ba_data/python/bauiv1lib/__pycache__/gettokens.cpython-312.opt-1.pyc",
|
||||
"ba_data/python/bauiv1lib/__pycache__/helpui.cpython-312.opt-1.pyc",
|
||||
"ba_data/python/bauiv1lib/__pycache__/help.cpython-312.opt-1.pyc",
|
||||
"ba_data/python/bauiv1lib/__pycache__/iconpicker.cpython-312.opt-1.pyc",
|
||||
"ba_data/python/bauiv1lib/__pycache__/inbox.cpython-312.opt-1.pyc",
|
||||
"ba_data/python/bauiv1lib/__pycache__/ingamemenu.cpython-312.opt-1.pyc",
|
||||
@ -421,7 +420,6 @@
|
||||
"ba_data/python/bauiv1lib/account/viewer.py",
|
||||
"ba_data/python/bauiv1lib/achievements.py",
|
||||
"ba_data/python/bauiv1lib/appinvite.py",
|
||||
"ba_data/python/bauiv1lib/benchmarks.py",
|
||||
"ba_data/python/bauiv1lib/characterpicker.py",
|
||||
"ba_data/python/bauiv1lib/colorpicker.py",
|
||||
"ba_data/python/bauiv1lib/config.py",
|
||||
@ -456,7 +454,7 @@
|
||||
"ba_data/python/bauiv1lib/gather/publictab.py",
|
||||
"ba_data/python/bauiv1lib/getremote.py",
|
||||
"ba_data/python/bauiv1lib/gettokens.py",
|
||||
"ba_data/python/bauiv1lib/helpui.py",
|
||||
"ba_data/python/bauiv1lib/help.py",
|
||||
"ba_data/python/bauiv1lib/iconpicker.py",
|
||||
"ba_data/python/bauiv1lib/inbox.py",
|
||||
"ba_data/python/bauiv1lib/ingamemenu.py",
|
||||
@ -516,6 +514,7 @@
|
||||
"ba_data/python/bauiv1lib/settings/__pycache__/advanced.cpython-312.opt-1.pyc",
|
||||
"ba_data/python/bauiv1lib/settings/__pycache__/allsettings.cpython-312.opt-1.pyc",
|
||||
"ba_data/python/bauiv1lib/settings/__pycache__/audio.cpython-312.opt-1.pyc",
|
||||
"ba_data/python/bauiv1lib/settings/__pycache__/benchmarks.cpython-312.opt-1.pyc",
|
||||
"ba_data/python/bauiv1lib/settings/__pycache__/controls.cpython-312.opt-1.pyc",
|
||||
"ba_data/python/bauiv1lib/settings/__pycache__/devtools.cpython-312.opt-1.pyc",
|
||||
"ba_data/python/bauiv1lib/settings/__pycache__/gamepad.cpython-312.opt-1.pyc",
|
||||
@ -533,6 +532,7 @@
|
||||
"ba_data/python/bauiv1lib/settings/advanced.py",
|
||||
"ba_data/python/bauiv1lib/settings/allsettings.py",
|
||||
"ba_data/python/bauiv1lib/settings/audio.py",
|
||||
"ba_data/python/bauiv1lib/settings/benchmarks.py",
|
||||
"ba_data/python/bauiv1lib/settings/controls.py",
|
||||
"ba_data/python/bauiv1lib/settings/devtools.py",
|
||||
"ba_data/python/bauiv1lib/settings/gamepad.py",
|
||||
|
||||
@ -341,7 +341,6 @@ SCRIPT_TARGETS_PY_PUBLIC = \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/account/viewer.py \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/achievements.py \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/appinvite.py \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/benchmarks.py \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/characterpicker.py \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/colorpicker.py \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/config.py \
|
||||
@ -365,7 +364,7 @@ SCRIPT_TARGETS_PY_PUBLIC = \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/gather/publictab.py \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/getremote.py \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/gettokens.py \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/helpui.py \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/help.py \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/iconpicker.py \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/inbox.py \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/ingamemenu.py \
|
||||
@ -406,6 +405,7 @@ SCRIPT_TARGETS_PY_PUBLIC = \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/settings/advanced.py \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/settings/allsettings.py \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/settings/audio.py \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/settings/benchmarks.py \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/settings/controls.py \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/settings/devtools.py \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/settings/gamepad.py \
|
||||
@ -619,7 +619,6 @@ SCRIPT_TARGETS_PYC_PUBLIC = \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/account/__pycache__/viewer.cpython-312.opt-1.pyc \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/__pycache__/achievements.cpython-312.opt-1.pyc \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/__pycache__/appinvite.cpython-312.opt-1.pyc \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/__pycache__/benchmarks.cpython-312.opt-1.pyc \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/__pycache__/characterpicker.cpython-312.opt-1.pyc \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/__pycache__/colorpicker.cpython-312.opt-1.pyc \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/__pycache__/config.cpython-312.opt-1.pyc \
|
||||
@ -643,7 +642,7 @@ SCRIPT_TARGETS_PYC_PUBLIC = \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/gather/__pycache__/publictab.cpython-312.opt-1.pyc \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/__pycache__/getremote.cpython-312.opt-1.pyc \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/__pycache__/gettokens.cpython-312.opt-1.pyc \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/__pycache__/helpui.cpython-312.opt-1.pyc \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/__pycache__/help.cpython-312.opt-1.pyc \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/__pycache__/iconpicker.cpython-312.opt-1.pyc \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/__pycache__/inbox.cpython-312.opt-1.pyc \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/__pycache__/ingamemenu.cpython-312.opt-1.pyc \
|
||||
@ -684,6 +683,7 @@ SCRIPT_TARGETS_PYC_PUBLIC = \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/settings/__pycache__/advanced.cpython-312.opt-1.pyc \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/settings/__pycache__/allsettings.cpython-312.opt-1.pyc \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/settings/__pycache__/audio.cpython-312.opt-1.pyc \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/settings/__pycache__/benchmarks.cpython-312.opt-1.pyc \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/settings/__pycache__/controls.cpython-312.opt-1.pyc \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/settings/__pycache__/devtools.cpython-312.opt-1.pyc \
|
||||
$(BUILD_DIR)/ba_data/python/bauiv1lib/settings/__pycache__/gamepad.cpython-312.opt-1.pyc \
|
||||
|
||||
@ -52,7 +52,7 @@ if TYPE_CHECKING:
|
||||
|
||||
# Build number and version of the ballistica binary we expect to be
|
||||
# using.
|
||||
TARGET_BALLISTICA_BUILD = 22012
|
||||
TARGET_BALLISTICA_BUILD = 22013
|
||||
TARGET_BALLISTICA_VERSION = '1.7.37'
|
||||
|
||||
|
||||
|
||||
@ -22,10 +22,11 @@ class AchievementsWindow(bui.MainWindow):
|
||||
uiscale = bui.app.ui_v1.uiscale
|
||||
self._width = 600 if uiscale is bui.UIScale.SMALL else 450
|
||||
self._height = (
|
||||
300
|
||||
380
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else 370 if uiscale is bui.UIScale.MEDIUM else 450
|
||||
)
|
||||
yoffs = -45 if uiscale is bui.UIScale.SMALL else 0
|
||||
|
||||
super().__init__(
|
||||
root_widget=bui.containerwidget(
|
||||
@ -41,7 +42,7 @@ class AchievementsWindow(bui.MainWindow):
|
||||
else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
|
||||
),
|
||||
stack_offset=(
|
||||
(0, -10)
|
||||
(0, 0)
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else (0, 0) if uiscale is bui.UIScale.MEDIUM else (0, 0)
|
||||
),
|
||||
@ -59,7 +60,7 @@ class AchievementsWindow(bui.MainWindow):
|
||||
self._back_button = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
autoselect=True,
|
||||
position=(50, self._height - 38),
|
||||
position=(50, self._height - 38 + yoffs),
|
||||
size=(60, 60),
|
||||
scale=0.6,
|
||||
label=bui.charstr(bui.SpecialChar.BACK),
|
||||
@ -84,7 +85,9 @@ class AchievementsWindow(bui.MainWindow):
|
||||
parent=self._root_widget,
|
||||
position=(
|
||||
self._width * 0.5,
|
||||
self._height - (27 if uiscale is bui.UIScale.SMALL else 20),
|
||||
self._height
|
||||
- (27 if uiscale is bui.UIScale.SMALL else 20)
|
||||
+ yoffs,
|
||||
),
|
||||
size=(0, 0),
|
||||
h_align='center',
|
||||
@ -97,8 +100,14 @@ class AchievementsWindow(bui.MainWindow):
|
||||
|
||||
self._scrollwidget = bui.scrollwidget(
|
||||
parent=self._root_widget,
|
||||
size=(self._width - 60, self._height - 70),
|
||||
position=(30, 30),
|
||||
size=(
|
||||
self._width - 60,
|
||||
self._height - (150 if uiscale is bui.UIScale.SMALL else 70),
|
||||
),
|
||||
position=(
|
||||
30,
|
||||
(110 if uiscale is bui.UIScale.SMALL else 30) + yoffs,
|
||||
),
|
||||
capture_arrows=True,
|
||||
simple_culling_v=10,
|
||||
)
|
||||
|
||||
@ -77,12 +77,12 @@ class CoopBrowserWindow(bui.MainWindow):
|
||||
self._width = 1520 if uiscale is bui.UIScale.SMALL else 1120
|
||||
self._x_inset = x_inset = 200 if uiscale is bui.UIScale.SMALL else 0
|
||||
self._height = (
|
||||
565
|
||||
600
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else 730 if uiscale is bui.UIScale.MEDIUM else 800
|
||||
)
|
||||
self._r = 'coopSelectWindow'
|
||||
top_extra = 20 if uiscale is bui.UIScale.SMALL else 0
|
||||
top_extra = 0 if uiscale is bui.UIScale.SMALL else 0
|
||||
|
||||
self._tourney_data_up_to_date = False
|
||||
|
||||
@ -109,7 +109,7 @@ class CoopBrowserWindow(bui.MainWindow):
|
||||
size=(self._width, self._height + top_extra),
|
||||
toolbar_visibility='menu_full',
|
||||
stack_offset=(
|
||||
(0, -17)
|
||||
(0, -8)
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else (0, 0) if uiscale is bui.UIScale.MEDIUM else (0, 0)
|
||||
),
|
||||
@ -256,7 +256,7 @@ class CoopBrowserWindow(bui.MainWindow):
|
||||
|
||||
self._scroll_width = self._width - (130 + 2 * x_inset)
|
||||
self._scroll_height = self._height - (
|
||||
185 if uiscale is bui.UIScale.SMALL else 160
|
||||
219 if uiscale is bui.UIScale.SMALL else 160
|
||||
)
|
||||
|
||||
self._subcontainerwidth = 800.0
|
||||
|
||||
@ -32,7 +32,7 @@ class CreditsWindow(bui.MainWindow):
|
||||
uiscale = bui.app.ui_v1.uiscale
|
||||
width = 990 if uiscale is bui.UIScale.SMALL else 670
|
||||
x_inset = 100 if uiscale is bui.UIScale.SMALL else 0
|
||||
height = 398 if uiscale is bui.UIScale.SMALL else 500
|
||||
height = 450 if uiscale is bui.UIScale.SMALL else 500
|
||||
|
||||
self._r = 'creditsWindow'
|
||||
super().__init__(
|
||||
@ -86,7 +86,7 @@ class CreditsWindow(bui.MainWindow):
|
||||
|
||||
bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(0, height - (65 if uiscale is bui.UIScale.SMALL else 54)),
|
||||
position=(0, height - (93 if uiscale is bui.UIScale.SMALL else 54)),
|
||||
size=(width, 30),
|
||||
scale=0.8 if uiscale is bui.UIScale.SMALL else 1.0,
|
||||
text=bui.Lstr(
|
||||
@ -101,8 +101,11 @@ class CreditsWindow(bui.MainWindow):
|
||||
|
||||
scroll = bui.scrollwidget(
|
||||
parent=self._root_widget,
|
||||
position=(40 + x_inset, 35),
|
||||
size=(width - (80 + 2 * x_inset), height - 100),
|
||||
position=(40 + x_inset, 62 if uiscale is bui.UIScale.SMALL else 35),
|
||||
size=(
|
||||
width - (80 + 2 * x_inset),
|
||||
height - (160 if uiscale is bui.UIScale.SMALL else 100),
|
||||
),
|
||||
capture_arrows=True,
|
||||
)
|
||||
|
||||
|
||||
@ -90,8 +90,9 @@ class GatherWindow(bui.MainWindow):
|
||||
uiscale = bui.app.ui_v1.uiscale
|
||||
self._width = 1640 if uiscale is bui.UIScale.SMALL else 1040
|
||||
x_offs = 200 if uiscale is bui.UIScale.SMALL else 0
|
||||
y_offs = -65 if uiscale is bui.UIScale.SMALL else 0
|
||||
self._height = (
|
||||
550
|
||||
650
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else 680 if uiscale is bui.UIScale.MEDIUM else 800
|
||||
)
|
||||
@ -113,7 +114,7 @@ class GatherWindow(bui.MainWindow):
|
||||
else 0.95 if uiscale is bui.UIScale.MEDIUM else 0.7
|
||||
),
|
||||
stack_offset=(
|
||||
(0, -20)
|
||||
(0, 0)
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else (0, 0) if uiscale is bui.UIScale.MEDIUM else (0, 0)
|
||||
),
|
||||
@ -130,7 +131,7 @@ class GatherWindow(bui.MainWindow):
|
||||
else:
|
||||
self._back_button = btn = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(70 + x_offs, self._height - 74),
|
||||
position=(70 + x_offs, self._height - 74 + y_offs),
|
||||
size=(140, 60),
|
||||
scale=1.1,
|
||||
autoselect=True,
|
||||
@ -153,7 +154,7 @@ class GatherWindow(bui.MainWindow):
|
||||
)
|
||||
bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(self._width * 0.5, self._height - 42 + t_offs_y),
|
||||
position=(self._width * 0.5, self._height - 42 + t_offs_y + y_offs),
|
||||
size=(0, 0),
|
||||
color=bui.app.ui_v1.title_color,
|
||||
scale=(
|
||||
@ -197,7 +198,10 @@ class GatherWindow(bui.MainWindow):
|
||||
self._tab_row = TabRow(
|
||||
self._root_widget,
|
||||
tabdefs,
|
||||
pos=(tab_buffer_h * 0.5, self._height - 130 + tabs_top_extra),
|
||||
pos=(
|
||||
tab_buffer_h * 0.5,
|
||||
self._height - 130 + tabs_top_extra + y_offs,
|
||||
),
|
||||
size=(self._width - tab_buffer_h, 50),
|
||||
on_select_call=bui.WeakCall(self._set_tab),
|
||||
)
|
||||
@ -227,11 +231,20 @@ class GatherWindow(bui.MainWindow):
|
||||
)
|
||||
|
||||
self._scroll_width = self._width - scroll_buffer_h
|
||||
self._scroll_height = self._height - 180.0 + tabs_top_extra
|
||||
self._scroll_height = (
|
||||
self._height
|
||||
- (270.0 if uiscale is bui.UIScale.SMALL else 180.0)
|
||||
+ tabs_top_extra
|
||||
)
|
||||
|
||||
self._scroll_left = (self._width - self._scroll_width) * 0.5
|
||||
self._scroll_bottom = (
|
||||
self._height - self._scroll_height - 79 - 48 + tabs_top_extra
|
||||
self._height
|
||||
- self._scroll_height
|
||||
- 79
|
||||
- 48
|
||||
+ tabs_top_extra
|
||||
+ y_offs
|
||||
)
|
||||
buffer_h = 10
|
||||
buffer_v = 4
|
||||
|
||||
@ -26,13 +26,14 @@ class HelpWindow(bui.MainWindow):
|
||||
|
||||
getres = bui.app.lang.get_resource
|
||||
|
||||
# self._main_menu = main_menu
|
||||
assert bui.app.classic is not None
|
||||
uiscale = bui.app.ui_v1.uiscale
|
||||
width = 1050 if uiscale is bui.UIScale.SMALL else 750
|
||||
x_offs = 70 if uiscale is bui.UIScale.SMALL else 0
|
||||
xoffs = 70 if uiscale is bui.UIScale.SMALL else 0
|
||||
yoffs = -33 if uiscale is bui.UIScale.SMALL else 0
|
||||
|
||||
height = (
|
||||
460
|
||||
500
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else 530 if uiscale is bui.UIScale.MEDIUM else 600
|
||||
)
|
||||
@ -51,7 +52,7 @@ class HelpWindow(bui.MainWindow):
|
||||
else 1.15 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||
),
|
||||
stack_offset=(
|
||||
(0, -24)
|
||||
(0, 0)
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else (0, 15) if uiscale is bui.UIScale.MEDIUM else (0, 0)
|
||||
),
|
||||
@ -62,7 +63,10 @@ class HelpWindow(bui.MainWindow):
|
||||
|
||||
bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(0, height - (50 if uiscale is bui.UIScale.SMALL else 45)),
|
||||
position=(
|
||||
0,
|
||||
height - (50 if uiscale is bui.UIScale.SMALL else 45) + yoffs,
|
||||
),
|
||||
size=(width, 25),
|
||||
text=bui.Lstr(
|
||||
resource=f'{self._r}.titleText',
|
||||
@ -75,11 +79,14 @@ class HelpWindow(bui.MainWindow):
|
||||
|
||||
self._scrollwidget = bui.scrollwidget(
|
||||
parent=self._root_widget,
|
||||
position=(44 + x_offs, 55 if uiscale is bui.UIScale.SMALL else 55),
|
||||
position=(
|
||||
44 + xoffs,
|
||||
(92 if uiscale is bui.UIScale.SMALL else 55) + yoffs,
|
||||
),
|
||||
simple_culling_v=100.0,
|
||||
size=(
|
||||
width - (88 + 2 * x_offs),
|
||||
height - 120 + (5 if uiscale is bui.UIScale.SMALL else 0),
|
||||
width - (88 + 2 * xoffs),
|
||||
height - (150 if uiscale is bui.UIScale.SMALL else 120),
|
||||
),
|
||||
capture_arrows=True,
|
||||
)
|
||||
@ -105,7 +112,7 @@ class HelpWindow(bui.MainWindow):
|
||||
else:
|
||||
btn = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(x_offs + 50, height - 55),
|
||||
position=(xoffs + 50, height - 55),
|
||||
size=(60, 55),
|
||||
scale=0.8,
|
||||
label=bui.charstr(bui.SpecialChar.BACK),
|
||||
@ -17,34 +17,17 @@ class InboxWindow(bui.MainWindow):
|
||||
self,
|
||||
transition: str | None = 'in_right',
|
||||
origin_widget: bui.Widget | None = None,
|
||||
# position: tuple[float, float],
|
||||
# scale: float | None = None,
|
||||
):
|
||||
assert bui.app.classic is not None
|
||||
uiscale = bui.app.ui_v1.uiscale
|
||||
# if scale is None:
|
||||
# scale = (
|
||||
# 2.3
|
||||
# if uiscale is bui.UIScale.SMALL
|
||||
# else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
|
||||
# )
|
||||
# self._transitioning_out = False
|
||||
self._width = 600 if uiscale is bui.UIScale.SMALL else 450
|
||||
self._height = (
|
||||
300
|
||||
380
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else 370 if uiscale is bui.UIScale.MEDIUM else 450
|
||||
)
|
||||
# bg_color = (0.5, 0.4, 0.6)
|
||||
yoffs = -45 if uiscale is bui.UIScale.SMALL else 0
|
||||
|
||||
# creates our _root_widget
|
||||
# super().__init__(
|
||||
# position=position,
|
||||
# size=(self._width, self._height),
|
||||
# scale=scale,
|
||||
# bg_color=bg_color,
|
||||
# edge_buffer_scale=4.0, # Try to keep button unobscured.
|
||||
# )
|
||||
super().__init__(
|
||||
root_widget=bui.containerwidget(
|
||||
size=(self._width, self._height),
|
||||
@ -59,7 +42,7 @@ class InboxWindow(bui.MainWindow):
|
||||
else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
|
||||
),
|
||||
stack_offset=(
|
||||
(0, -10)
|
||||
(0, 0)
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else (0, 0) if uiscale is bui.UIScale.MEDIUM else (0, 0)
|
||||
),
|
||||
@ -77,7 +60,7 @@ class InboxWindow(bui.MainWindow):
|
||||
self._back_button = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
autoselect=True,
|
||||
position=(50, self._height - 38),
|
||||
position=(50, self._height - 38 + yoffs),
|
||||
size=(60, 60),
|
||||
scale=0.6,
|
||||
label=bui.charstr(bui.SpecialChar.BACK),
|
||||
@ -88,24 +71,13 @@ class InboxWindow(bui.MainWindow):
|
||||
edit=self._root_widget, cancel_button=self._back_button
|
||||
)
|
||||
|
||||
# self._cancel_button = bui.buttonwidget(
|
||||
# parent=self.root_widget,
|
||||
# position=(50, self._height - 30),
|
||||
# size=(50, 50),
|
||||
# scale=0.5,
|
||||
# label='',
|
||||
# color=bg_color,
|
||||
# on_activate_call=self._on_cancel_press,
|
||||
# autoselect=True,
|
||||
# icon=bui.gettexture('crossOut'),
|
||||
# iconscale=1.2,
|
||||
# )
|
||||
|
||||
self._title_text = bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(
|
||||
self._width * 0.5,
|
||||
self._height - (27 if uiscale is bui.UIScale.SMALL else 20),
|
||||
self._height
|
||||
- (27 if uiscale is bui.UIScale.SMALL else 20)
|
||||
+ yoffs,
|
||||
),
|
||||
size=(0, 0),
|
||||
h_align='center',
|
||||
@ -118,8 +90,14 @@ class InboxWindow(bui.MainWindow):
|
||||
|
||||
self._scrollwidget = bui.scrollwidget(
|
||||
parent=self._root_widget,
|
||||
size=(self._width - 60, self._height - 70),
|
||||
position=(30, 30),
|
||||
size=(
|
||||
self._width - 60,
|
||||
self._height - (150 if uiscale is bui.UIScale.SMALL else 70),
|
||||
),
|
||||
position=(
|
||||
30,
|
||||
(110 if uiscale is bui.UIScale.SMALL else 30) + yoffs,
|
||||
),
|
||||
capture_arrows=True,
|
||||
simple_culling_v=10,
|
||||
)
|
||||
|
||||
@ -24,11 +24,12 @@ class InventoryWindow(bui.MainWindow):
|
||||
uiscale = bui.app.ui_v1.uiscale
|
||||
width = 1050 if uiscale is bui.UIScale.SMALL else 750
|
||||
height = (
|
||||
460
|
||||
500
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else 530 if uiscale is bui.UIScale.MEDIUM else 600
|
||||
)
|
||||
x_offs = 70 if uiscale is bui.UIScale.SMALL else 0
|
||||
yoffs = -45 if uiscale is bui.UIScale.SMALL else 0
|
||||
|
||||
super().__init__(
|
||||
root_widget=bui.containerwidget(
|
||||
@ -44,7 +45,7 @@ class InventoryWindow(bui.MainWindow):
|
||||
else 1.15 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||
),
|
||||
stack_offset=(
|
||||
(0, -24)
|
||||
(0, 0)
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else (0, 15) if uiscale is bui.UIScale.MEDIUM else (0, 0)
|
||||
),
|
||||
@ -55,7 +56,7 @@ class InventoryWindow(bui.MainWindow):
|
||||
|
||||
bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(0, height - (50 if uiscale is bui.UIScale.SMALL else 45)),
|
||||
position=(0, height - 45 + yoffs),
|
||||
size=(width, 25),
|
||||
text='INVENTORY',
|
||||
color=bui.app.ui_v1.title_color,
|
||||
@ -70,7 +71,7 @@ class InventoryWindow(bui.MainWindow):
|
||||
else:
|
||||
btn = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(x_offs + 50, height - 55),
|
||||
position=(x_offs + 50, height - 55 + yoffs),
|
||||
size=(60, 55),
|
||||
scale=0.8,
|
||||
label=bui.charstr(bui.SpecialChar.BACK),
|
||||
@ -83,7 +84,7 @@ class InventoryWindow(bui.MainWindow):
|
||||
|
||||
bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(0, height - 120),
|
||||
position=(0, height - 120 + yoffs),
|
||||
size=(width, 25),
|
||||
text='(under construction)',
|
||||
scale=0.7,
|
||||
@ -94,7 +95,7 @@ class InventoryWindow(bui.MainWindow):
|
||||
button_width = 300
|
||||
self._player_profiles_button = btn = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=((width - button_width) * 0.5, height - 200),
|
||||
position=((width - button_width) * 0.5, height - 200 + yoffs),
|
||||
autoselect=True,
|
||||
size=(button_width, 60),
|
||||
label=bui.Lstr(resource='playerProfilesWindow.titleText'),
|
||||
|
||||
@ -91,7 +91,7 @@ class MainMenuWindow(bui.MainWindow):
|
||||
import bauiv1lib.account.settings as _unused5
|
||||
import bauiv1lib.store.browser as _unused6
|
||||
import bauiv1lib.credits as _unused7
|
||||
import bauiv1lib.helpui as _unused8
|
||||
import bauiv1lib.help as _unused8
|
||||
import bauiv1lib.settings.allsettings as _unused9
|
||||
import bauiv1lib.gather as _unused10
|
||||
import bauiv1lib.watch as _unused11
|
||||
@ -524,7 +524,7 @@ class MainMenuWindow(bui.MainWindow):
|
||||
|
||||
def _howtoplay(self) -> None:
|
||||
# pylint: disable=cyclic-import
|
||||
from bauiv1lib.helpui import HelpWindow
|
||||
from bauiv1lib.help import HelpWindow
|
||||
|
||||
# no-op if we're not currently in control.
|
||||
if not self.main_window_has_control():
|
||||
|
||||
@ -28,17 +28,18 @@ class PlaylistAddGameWindow(bui.MainWindow):
|
||||
uiscale = bui.app.ui_v1.uiscale
|
||||
self._width = 750 if uiscale is bui.UIScale.SMALL else 650
|
||||
x_inset = 50 if uiscale is bui.UIScale.SMALL else 0
|
||||
yoffs = -44 if uiscale is bui.UIScale.SMALL else 0
|
||||
|
||||
self._height = (
|
||||
346
|
||||
400
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else 380 if uiscale is bui.UIScale.MEDIUM else 440
|
||||
else 400 if uiscale is bui.UIScale.MEDIUM else 460
|
||||
)
|
||||
top_extra = 30 if uiscale is bui.UIScale.SMALL else 20
|
||||
self._scroll_width = 210
|
||||
|
||||
super().__init__(
|
||||
root_widget=bui.containerwidget(
|
||||
size=(self._width, self._height + top_extra),
|
||||
size=(self._width, self._height),
|
||||
scale=(
|
||||
1.95
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
@ -56,7 +57,7 @@ class PlaylistAddGameWindow(bui.MainWindow):
|
||||
else:
|
||||
self._back_button = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(58 + x_inset, self._height - 53),
|
||||
position=(58 + x_inset, self._height - 53 + yoffs),
|
||||
size=(60, 48),
|
||||
label=bui.charstr(bui.SpecialChar.BACK),
|
||||
autoselect=True,
|
||||
@ -65,7 +66,7 @@ class PlaylistAddGameWindow(bui.MainWindow):
|
||||
)
|
||||
self._select_button = select_button = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(self._width - (172 + x_inset), self._height - 50),
|
||||
position=(self._width - (172 + x_inset), self._height - 50 + yoffs),
|
||||
autoselect=True,
|
||||
size=(160, 60),
|
||||
scale=0.75,
|
||||
@ -81,7 +82,7 @@ class PlaylistAddGameWindow(bui.MainWindow):
|
||||
|
||||
bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(self._width * 0.5, self._height - 28),
|
||||
position=(self._width * 0.5, self._height - 28 + yoffs),
|
||||
size=(0, 0),
|
||||
scale=1.0,
|
||||
text=bui.Lstr(resource=f'{self._r}.titleText'),
|
||||
@ -90,7 +91,7 @@ class PlaylistAddGameWindow(bui.MainWindow):
|
||||
maxwidth=250,
|
||||
v_align='center',
|
||||
)
|
||||
v = self._height - 64
|
||||
v = self._height - 64 + yoffs
|
||||
|
||||
self._selected_title_text = bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
@ -114,9 +115,11 @@ class PlaylistAddGameWindow(bui.MainWindow):
|
||||
h_align='left',
|
||||
)
|
||||
|
||||
scroll_height = self._height - 100
|
||||
scroll_height = self._height - (
|
||||
160 if uiscale is bui.UIScale.SMALL else 100
|
||||
)
|
||||
|
||||
v = self._height - 60
|
||||
v = self._height - 60 + yoffs
|
||||
|
||||
self._scrollwidget = bui.scrollwidget(
|
||||
parent=self._root_widget,
|
||||
|
||||
@ -61,7 +61,7 @@ class PlaylistBrowserWindow(bui.MainWindow):
|
||||
else 510 if uiscale is bui.UIScale.MEDIUM else 580
|
||||
)
|
||||
|
||||
top_extra = 20 if uiscale is bui.UIScale.SMALL else 0
|
||||
top_extra = 30 if uiscale is bui.UIScale.SMALL else 0
|
||||
|
||||
super().__init__(
|
||||
root_widget=bui.containerwidget(
|
||||
@ -80,7 +80,7 @@ class PlaylistBrowserWindow(bui.MainWindow):
|
||||
else 1.05 if uiscale is bui.UIScale.MEDIUM else 0.9
|
||||
),
|
||||
stack_offset=(
|
||||
(0, -56) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||
(0, -46) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||
),
|
||||
),
|
||||
transition=transition,
|
||||
|
||||
@ -45,20 +45,20 @@ class PlaylistCustomizeBrowserWindow(bui.MainWindow):
|
||||
uiscale = bui.app.ui_v1.uiscale
|
||||
self._width = 970.0 if uiscale is bui.UIScale.SMALL else 650.0
|
||||
x_inset = 100.0 if uiscale is bui.UIScale.SMALL else 0.0
|
||||
yoffs = -51 if uiscale is bui.UIScale.SMALL else 0.0
|
||||
self._height = (
|
||||
380.0
|
||||
440.0
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else 420.0 if uiscale is bui.UIScale.MEDIUM else 500.0
|
||||
)
|
||||
top_extra = 20.0 if uiscale is bui.UIScale.SMALL else 0.0
|
||||
|
||||
super().__init__(
|
||||
root_widget=bui.containerwidget(
|
||||
size=(self._width, self._height + top_extra),
|
||||
size=(self._width, self._height),
|
||||
scale=(
|
||||
1.83
|
||||
1.8
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else 1.5 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||
else 1.4 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||
),
|
||||
toolbar_visibility=(
|
||||
'menu_minimal'
|
||||
@ -66,7 +66,7 @@ class PlaylistCustomizeBrowserWindow(bui.MainWindow):
|
||||
else 'menu_full'
|
||||
),
|
||||
stack_offset=(
|
||||
(0, -10) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||
(0, 0) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||
),
|
||||
),
|
||||
transition=transition,
|
||||
@ -82,7 +82,7 @@ class PlaylistCustomizeBrowserWindow(bui.MainWindow):
|
||||
else:
|
||||
self._back_button = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(43 + x_inset, self._height - 60),
|
||||
position=(43 + x_inset, self._height - 60 + yoffs),
|
||||
size=(160, 68),
|
||||
scale=0.77,
|
||||
autoselect=True,
|
||||
@ -99,7 +99,12 @@ class PlaylistCustomizeBrowserWindow(bui.MainWindow):
|
||||
|
||||
bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(0, self._height - 47),
|
||||
position=(
|
||||
0,
|
||||
self._height
|
||||
- (47 if uiscale is bui.UIScale.SMALL else 47)
|
||||
+ yoffs,
|
||||
),
|
||||
size=(self._width, 25),
|
||||
text=bui.Lstr(
|
||||
resource=f'{self._r}.titleText',
|
||||
@ -111,7 +116,7 @@ class PlaylistCustomizeBrowserWindow(bui.MainWindow):
|
||||
v_align='center',
|
||||
)
|
||||
|
||||
v = self._height - 59.0
|
||||
v = self._height - 59.0 + yoffs
|
||||
h = 41 + x_inset
|
||||
b_color = (0.6, 0.53, 0.63)
|
||||
b_textcolor = (0.75, 0.7, 0.8)
|
||||
@ -260,8 +265,10 @@ class PlaylistCustomizeBrowserWindow(bui.MainWindow):
|
||||
)
|
||||
)
|
||||
|
||||
v = self._height - 75
|
||||
self._scroll_height = self._height - 119
|
||||
v = self._height - 75 + yoffs
|
||||
self._scroll_height = self._height - (
|
||||
180 if uiscale is bui.UIScale.SMALL else 119
|
||||
)
|
||||
scrollwidget = bui.scrollwidget(
|
||||
parent=self._root_widget,
|
||||
position=(140 + x_inset, v - self._scroll_height),
|
||||
|
||||
@ -35,22 +35,22 @@ class PlaylistEditWindow(bui.MainWindow):
|
||||
self._width = 870 if uiscale is bui.UIScale.SMALL else 670
|
||||
x_inset = 100 if uiscale is bui.UIScale.SMALL else 0
|
||||
self._height = (
|
||||
400
|
||||
500
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else 470 if uiscale is bui.UIScale.MEDIUM else 540
|
||||
)
|
||||
yoffs = -68 if uiscale is bui.UIScale.SMALL else 0
|
||||
|
||||
top_extra = 20 if uiscale is bui.UIScale.SMALL else 0
|
||||
super().__init__(
|
||||
root_widget=bui.containerwidget(
|
||||
size=(self._width, self._height + top_extra),
|
||||
size=(self._width, self._height),
|
||||
scale=(
|
||||
1.8
|
||||
1.76
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else 1.3 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||
),
|
||||
stack_offset=(
|
||||
(0, -16) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||
(0, 0) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||
),
|
||||
),
|
||||
transition=transition,
|
||||
@ -58,7 +58,7 @@ class PlaylistEditWindow(bui.MainWindow):
|
||||
)
|
||||
cancel_button = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(35 + x_inset, self._height - 60),
|
||||
position=(35 + x_inset, self._height - 60 + yoffs),
|
||||
scale=0.8,
|
||||
size=(175, 60),
|
||||
autoselect=True,
|
||||
@ -67,7 +67,7 @@ class PlaylistEditWindow(bui.MainWindow):
|
||||
)
|
||||
save_button = btn = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(self._width - (195 + x_inset), self._height - 60),
|
||||
position=(self._width - (195 + x_inset), self._height - 60 + yoffs),
|
||||
scale=0.8,
|
||||
size=(190, 60),
|
||||
autoselect=True,
|
||||
@ -89,7 +89,7 @@ class PlaylistEditWindow(bui.MainWindow):
|
||||
|
||||
bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(-10, self._height - 50),
|
||||
position=(-10, self._height - 50 + yoffs),
|
||||
size=(self._width, 25),
|
||||
text=bui.Lstr(resource=f'{self._r}.titleText'),
|
||||
color=bui.app.ui_v1.title_color,
|
||||
@ -99,7 +99,7 @@ class PlaylistEditWindow(bui.MainWindow):
|
||||
maxwidth=270,
|
||||
)
|
||||
|
||||
v = self._height - 115.0
|
||||
v = self._height - 115.0 + yoffs
|
||||
|
||||
self._scroll_width = self._width - (205 + 2 * x_inset)
|
||||
|
||||
@ -136,7 +136,7 @@ class PlaylistEditWindow(bui.MainWindow):
|
||||
self._list_widgets: list[bui.Widget] = []
|
||||
|
||||
h = 40 + x_inset
|
||||
v = self._height - 172.0
|
||||
v = self._height - 172.0 + yoffs
|
||||
|
||||
b_color = (0.6, 0.53, 0.63)
|
||||
b_textcolor = (0.75, 0.7, 0.8)
|
||||
@ -222,8 +222,10 @@ class PlaylistEditWindow(bui.MainWindow):
|
||||
repeat=True,
|
||||
)
|
||||
|
||||
v = self._height - 100
|
||||
scroll_height = self._height - 155
|
||||
v = self._height - 100 + yoffs
|
||||
scroll_height = self._height - (
|
||||
250 if uiscale is bui.UIScale.SMALL else 155
|
||||
)
|
||||
scrollwidget = bui.scrollwidget(
|
||||
parent=self._root_widget,
|
||||
position=(160 + x_inset, v - scroll_height),
|
||||
|
||||
@ -109,13 +109,14 @@ class PlaylistEditGameWindow(bui.MainWindow):
|
||||
width = 820 if uiscale is bui.UIScale.SMALL else 620
|
||||
x_inset = 100 if uiscale is bui.UIScale.SMALL else 0
|
||||
height = (
|
||||
365
|
||||
400
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else 460 if uiscale is bui.UIScale.MEDIUM else 550
|
||||
)
|
||||
spacing = 52
|
||||
y_extra = 15
|
||||
y_extra2 = 21
|
||||
yoffs = -30 if uiscale is bui.UIScale.SMALL else 0
|
||||
|
||||
map_tex_name = get_map_class(self._map).get_preview_texture_name()
|
||||
if map_tex_name is None:
|
||||
@ -132,7 +133,7 @@ class PlaylistEditGameWindow(bui.MainWindow):
|
||||
else 1.35 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||
),
|
||||
stack_offset=(
|
||||
(0, -17) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||
(0, 0) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||
),
|
||||
),
|
||||
transition=transition,
|
||||
@ -141,7 +142,7 @@ class PlaylistEditGameWindow(bui.MainWindow):
|
||||
|
||||
btn = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(45 + x_inset, height - 82 + y_extra2),
|
||||
position=(45 + x_inset, height - 82 + y_extra2 + yoffs),
|
||||
size=(60, 48) if is_add else (180, 65),
|
||||
label=(
|
||||
bui.charstr(bui.SpecialChar.BACK)
|
||||
@ -158,7 +159,7 @@ class PlaylistEditGameWindow(bui.MainWindow):
|
||||
|
||||
add_button = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(width - (193 + x_inset), height - 82 + y_extra2),
|
||||
position=(width - (193 + x_inset), height - 82 + y_extra2 + yoffs),
|
||||
size=(200, 65),
|
||||
scale=0.75,
|
||||
text_scale=1.3,
|
||||
@ -174,7 +175,7 @@ class PlaylistEditGameWindow(bui.MainWindow):
|
||||
|
||||
bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(-8, height - 70 + y_extra2),
|
||||
position=(-8, height - 70 + y_extra2 + yoffs),
|
||||
size=(width, 25),
|
||||
text=gametype.get_display_string(),
|
||||
color=bui.app.ui_v1.title_color,
|
||||
@ -194,8 +195,14 @@ class PlaylistEditGameWindow(bui.MainWindow):
|
||||
scroll_width = width - (86 + 2 * x_inset)
|
||||
self._scrollwidget = bui.scrollwidget(
|
||||
parent=self._root_widget,
|
||||
position=(44 + x_inset, 35 + y_extra),
|
||||
size=(scroll_width, height - 116),
|
||||
position=(
|
||||
44 + x_inset,
|
||||
(80 if uiscale is bui.UIScale.SMALL else 35) + y_extra + yoffs,
|
||||
),
|
||||
size=(
|
||||
scroll_width,
|
||||
height - (166 if uiscale is bui.UIScale.SMALL else 116),
|
||||
),
|
||||
highlight=False,
|
||||
claims_left_right=True,
|
||||
claims_tab=True,
|
||||
|
||||
@ -53,22 +53,22 @@ class PlaylistMapSelectWindow(bui.MainWindow):
|
||||
width = 815 if uiscale is bui.UIScale.SMALL else 615
|
||||
x_inset = 100 if uiscale is bui.UIScale.SMALL else 0
|
||||
height = (
|
||||
400
|
||||
420
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else 480 if uiscale is bui.UIScale.MEDIUM else 600
|
||||
)
|
||||
yoffs = -37 if uiscale is bui.UIScale.SMALL else 0
|
||||
|
||||
top_extra = 20 if uiscale is bui.UIScale.SMALL else 0
|
||||
super().__init__(
|
||||
root_widget=bui.containerwidget(
|
||||
size=(width, height + top_extra),
|
||||
size=(width, height),
|
||||
scale=(
|
||||
1.95
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else 1.3 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||
),
|
||||
stack_offset=(
|
||||
(0, -27) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||
(0, 0) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||
),
|
||||
),
|
||||
transition=transition,
|
||||
@ -77,7 +77,7 @@ class PlaylistMapSelectWindow(bui.MainWindow):
|
||||
|
||||
self._cancel_button = btn = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(38 + x_inset, height - 67),
|
||||
position=(38 + x_inset, height - 67 + yoffs),
|
||||
size=(140, 50),
|
||||
scale=0.9,
|
||||
text_scale=1.0,
|
||||
@ -89,7 +89,7 @@ class PlaylistMapSelectWindow(bui.MainWindow):
|
||||
bui.containerwidget(edit=self._root_widget, cancel_button=btn)
|
||||
bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(width * 0.5, height - 46),
|
||||
position=(width * 0.5, height - 46 + yoffs),
|
||||
size=(0, 0),
|
||||
maxwidth=260,
|
||||
scale=1.1,
|
||||
@ -101,9 +101,11 @@ class PlaylistMapSelectWindow(bui.MainWindow):
|
||||
h_align='center',
|
||||
v_align='center',
|
||||
)
|
||||
v = height - 70
|
||||
v = height - 70 + yoffs
|
||||
self._scroll_width = width - (80 + 2 * x_inset)
|
||||
self._scroll_height = height - 140
|
||||
self._scroll_height = height - (
|
||||
170 if uiscale is bui.UIScale.SMALL else 140
|
||||
)
|
||||
|
||||
self._scrollwidget = bui.scrollwidget(
|
||||
parent=self._root_widget,
|
||||
|
||||
@ -81,7 +81,9 @@ class AdvancedSettingsWindow(bui.MainWindow):
|
||||
self._show_always_use_internal_keyboard = not app.env.vr
|
||||
|
||||
self._scroll_width = self._width - (100 + 2 * x_inset)
|
||||
self._scroll_height = self._height - 115.0
|
||||
self._scroll_height = self._height - (
|
||||
125.0 if uiscale is bui.UIScale.SMALL else 115.0
|
||||
)
|
||||
self._sub_width = self._scroll_width * 0.95
|
||||
self._sub_height = 870.0
|
||||
|
||||
@ -129,10 +131,10 @@ class AdvancedSettingsWindow(bui.MainWindow):
|
||||
parent=self._root_widget,
|
||||
position=(
|
||||
self._width * 0.5,
|
||||
self._height - (57 if uiscale is bui.UIScale.SMALL else 40),
|
||||
self._height - (61 if uiscale is bui.UIScale.SMALL else 40),
|
||||
),
|
||||
size=(0, 0),
|
||||
scale=0.65 if uiscale is bui.UIScale.SMALL else 1.0,
|
||||
scale=0.85 if uiscale is bui.UIScale.SMALL else 1.0,
|
||||
text=bui.Lstr(resource=f'{self._r}.titleText'),
|
||||
color=app.ui_v1.title_color,
|
||||
h_align='center',
|
||||
@ -201,7 +203,7 @@ class AdvancedSettingsWindow(bui.MainWindow):
|
||||
from bauiv1lib import appinvite as _unused5
|
||||
from bauiv1lib import account as _unused6
|
||||
from bauiv1lib import sendinfo as _unused7
|
||||
from bauiv1lib import benchmarks as _unused8
|
||||
from bauiv1lib.settings import benchmarks as _unused8
|
||||
from bauiv1lib.settings import plugins as _unused9
|
||||
from bauiv1lib.settings import devtools as _unused10
|
||||
|
||||
@ -783,7 +785,7 @@ class AdvancedSettingsWindow(bui.MainWindow):
|
||||
)
|
||||
|
||||
def _on_benchmark_press(self) -> None:
|
||||
from bauiv1lib.benchmarks import BenchmarksAndStressTestsWindow
|
||||
from bauiv1lib.settings.benchmarks import BenchmarksAndStressTestsWindow
|
||||
|
||||
# no-op if we're not in control.
|
||||
if not self.main_window_has_control():
|
||||
|
||||
@ -33,9 +33,10 @@ class AllSettingsWindow(bui.MainWindow):
|
||||
uiscale = bui.app.ui_v1.uiscale
|
||||
width = 1000 if uiscale is bui.UIScale.SMALL else 580
|
||||
x_inset = 125 if uiscale is bui.UIScale.SMALL else 0
|
||||
height = 435
|
||||
height = 500 if uiscale is bui.UIScale.SMALL else 435
|
||||
self._r = 'settingsWindow'
|
||||
top_extra = 20 if uiscale is bui.UIScale.SMALL else 0
|
||||
yoffs = -30 if uiscale is bui.UIScale.SMALL else 0
|
||||
|
||||
uiscale = bui.app.ui_v1.uiscale
|
||||
super().__init__(
|
||||
@ -68,7 +69,7 @@ class AllSettingsWindow(bui.MainWindow):
|
||||
self._back_button = btn = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
autoselect=True,
|
||||
position=(40 + x_inset, height - 55),
|
||||
position=(40 + x_inset, height - 55 + yoffs),
|
||||
size=(130, 60),
|
||||
scale=0.8,
|
||||
text_scale=1.2,
|
||||
@ -80,7 +81,7 @@ class AllSettingsWindow(bui.MainWindow):
|
||||
|
||||
bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(0, height - 44),
|
||||
position=(0, height - 44 + yoffs),
|
||||
size=(width, 25),
|
||||
text=bui.Lstr(resource=f'{self._r}.titleText'),
|
||||
color=bui.app.ui_v1.title_color,
|
||||
@ -97,7 +98,7 @@ class AllSettingsWindow(bui.MainWindow):
|
||||
label=bui.charstr(bui.SpecialChar.BACK),
|
||||
)
|
||||
|
||||
v = height - 80
|
||||
v = height - 80 + yoffs
|
||||
v -= 145
|
||||
|
||||
basew = 280 if uiscale is bui.UIScale.SMALL else 230
|
||||
|
||||
@ -25,13 +25,16 @@ class BenchmarksAndStressTestsWindow(bui.MainWindow):
|
||||
uiscale = bui.app.ui_v1.uiscale
|
||||
self._width = width = 650 if uiscale is bui.UIScale.SMALL else 580
|
||||
self._height = height = (
|
||||
330
|
||||
400
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else 420 if uiscale is bui.UIScale.MEDIUM else 520
|
||||
)
|
||||
yoffs = -30 if uiscale is bui.UIScale.SMALL else 0
|
||||
|
||||
self._scroll_width = self._width - 100
|
||||
self._scroll_height = self._height - 120
|
||||
self._scroll_height = self._height - (
|
||||
180 if uiscale is bui.UIScale.SMALL else 120
|
||||
)
|
||||
|
||||
self._sub_width = self._scroll_width * 0.95
|
||||
self._sub_height = 520
|
||||
@ -72,7 +75,7 @@ class BenchmarksAndStressTestsWindow(bui.MainWindow):
|
||||
else:
|
||||
self._done_button = btn = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(40, height - 67),
|
||||
position=(40, height - 67 + yoffs),
|
||||
size=(120, 60),
|
||||
scale=0.8,
|
||||
autoselect=True,
|
||||
@ -83,7 +86,7 @@ class BenchmarksAndStressTestsWindow(bui.MainWindow):
|
||||
|
||||
bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(0, height - 60),
|
||||
position=(0, height - 60 + yoffs),
|
||||
size=(width, 30),
|
||||
text=bui.Lstr(resource=f'{self._r}.titleText'),
|
||||
h_align='center',
|
||||
@ -96,7 +99,10 @@ class BenchmarksAndStressTestsWindow(bui.MainWindow):
|
||||
parent=self._root_widget,
|
||||
highlight=False,
|
||||
size=(self._scroll_width, self._scroll_height),
|
||||
position=((self._width - self._scroll_width) * 0.5, 50),
|
||||
position=(
|
||||
(self._width - self._scroll_width) * 0.5,
|
||||
(115 if uiscale is bui.UIScale.SMALL else 50) + yoffs,
|
||||
),
|
||||
)
|
||||
bui.containerwidget(edit=self._scrollwidget, claims_left_right=True)
|
||||
|
||||
@ -150,7 +150,7 @@ class ControlsSettingsWindow(bui.MainWindow):
|
||||
parent=self._root_widget,
|
||||
position=(
|
||||
0,
|
||||
height + yoffs - (75 if uiscale is bui.UIScale.SMALL else 50),
|
||||
height + yoffs - (53 if uiscale is bui.UIScale.SMALL else 50),
|
||||
),
|
||||
size=(width, 25),
|
||||
text=bui.Lstr(resource=f'{self._r}.titleText'),
|
||||
@ -159,7 +159,7 @@ class ControlsSettingsWindow(bui.MainWindow):
|
||||
v_align='top',
|
||||
)
|
||||
|
||||
v = height - 75 + yoffs
|
||||
v = height - (85 if uiscale is bui.UIScale.SMALL else 75) + yoffs
|
||||
v -= spacing
|
||||
|
||||
if show_touch:
|
||||
|
||||
@ -92,7 +92,7 @@ class DevToolsWindow(bui.MainWindow):
|
||||
self._height - (64 if uiscale is bui.UIScale.SMALL else 48),
|
||||
),
|
||||
size=(0, 25),
|
||||
scale=(0.6 if uiscale is bui.UIScale.SMALL else 1.0),
|
||||
scale=(0.8 if uiscale is bui.UIScale.SMALL else 1.0),
|
||||
maxwidth=self._width - 200,
|
||||
text=bui.Lstr(resource='settingsWindowAdvanced.devToolsText'),
|
||||
color=app.ui_v1.title_color,
|
||||
|
||||
@ -32,7 +32,9 @@ class NetTestingWindow(bui.MainWindow):
|
||||
):
|
||||
uiscale = bui.app.ui_v1.uiscale
|
||||
self._width = 820
|
||||
self._height = 400 if uiscale is bui.UIScale.SMALL else 500
|
||||
self._height = 500 if uiscale is bui.UIScale.SMALL else 500
|
||||
yoffs = -50 if uiscale is bui.UIScale.SMALL else 0
|
||||
|
||||
self._printed_lines: list[str] = []
|
||||
assert bui.app.classic is not None
|
||||
super().__init__(
|
||||
@ -53,23 +55,33 @@ class NetTestingWindow(bui.MainWindow):
|
||||
transition=transition,
|
||||
origin_widget=origin_widget,
|
||||
)
|
||||
self._done_button: bui.Widget | None = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(46, self._height - 77),
|
||||
size=(60, 60),
|
||||
scale=0.9,
|
||||
label=bui.charstr(bui.SpecialChar.BACK),
|
||||
button_type='backSmall',
|
||||
autoselect=True,
|
||||
on_activate_call=self.main_window_back,
|
||||
)
|
||||
self._done_button: bui.Widget | None
|
||||
if uiscale is bui.UIScale.SMALL:
|
||||
bui.containerwidget(
|
||||
edit=self._root_widget, on_cancel_call=self.main_window_back
|
||||
)
|
||||
self._done_button = None
|
||||
else:
|
||||
self._done_button = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(46, self._height - 77 + yoffs),
|
||||
size=(60, 60),
|
||||
scale=0.9,
|
||||
label=bui.charstr(bui.SpecialChar.BACK),
|
||||
button_type='backSmall',
|
||||
autoselect=True,
|
||||
on_activate_call=self.main_window_back,
|
||||
)
|
||||
bui.containerwidget(
|
||||
edit=self._root_widget, cancel_button=self._done_button
|
||||
)
|
||||
|
||||
# Avoid squads button on small mode.
|
||||
xinset = -50 if uiscale is bui.UIScale.SMALL else 0
|
||||
|
||||
self._copy_button = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(self._width - 200 + xinset, self._height - 77),
|
||||
position=(self._width - 200 + xinset, self._height - 77 + yoffs),
|
||||
size=(100, 60),
|
||||
scale=0.8,
|
||||
autoselect=True,
|
||||
@ -79,7 +91,7 @@ class NetTestingWindow(bui.MainWindow):
|
||||
|
||||
self._settings_button = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(self._width - 100 + xinset, self._height - 77),
|
||||
position=(self._width - 100 + xinset, self._height - 77 + yoffs),
|
||||
size=(60, 60),
|
||||
scale=0.8,
|
||||
autoselect=True,
|
||||
@ -90,7 +102,7 @@ class NetTestingWindow(bui.MainWindow):
|
||||
twidth = self._width - 540
|
||||
bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(self._width * 0.5, self._height - 55),
|
||||
position=(self._width * 0.5, self._height - 55 + yoffs),
|
||||
size=(0, 0),
|
||||
text=bui.Lstr(resource='settingsWindowAdvanced.netTestingText'),
|
||||
color=(0.8, 0.8, 0.8, 1.0),
|
||||
@ -101,24 +113,19 @@ class NetTestingWindow(bui.MainWindow):
|
||||
|
||||
self._scroll = bui.scrollwidget(
|
||||
parent=self._root_widget,
|
||||
position=(50, 50),
|
||||
size=(self._width - 100, self._height - 140),
|
||||
position=(
|
||||
50,
|
||||
(140 if uiscale is bui.UIScale.SMALL else 50) + yoffs,
|
||||
),
|
||||
size=(
|
||||
self._width - 100,
|
||||
self._height - (220 if uiscale is bui.UIScale.SMALL else 140),
|
||||
),
|
||||
capture_arrows=True,
|
||||
autoselect=True,
|
||||
)
|
||||
self._rows = bui.columnwidget(parent=self._scroll)
|
||||
|
||||
if uiscale is bui.UIScale.SMALL:
|
||||
bui.containerwidget(
|
||||
edit=self._root_widget, on_cancel_call=self.main_window_back
|
||||
)
|
||||
self._done_button.delete()
|
||||
self._done_button = None
|
||||
else:
|
||||
bui.containerwidget(
|
||||
edit=self._root_widget, cancel_button=self._done_button
|
||||
)
|
||||
|
||||
# Now kick off the tests.
|
||||
# Pass a weak-ref to this window so we don't keep it alive
|
||||
# if we back out before it completes. Also set is as daemon
|
||||
@ -169,7 +176,7 @@ class NetTestingWindow(bui.MainWindow):
|
||||
if not self.main_window_has_control():
|
||||
return
|
||||
|
||||
self.main_window_replace(NetValTestingWindow())
|
||||
self.main_window_replace(get_net_val_testing_window())
|
||||
|
||||
|
||||
def _run_diagnostics(weakwin: weakref.ref[NetTestingWindow]) -> None:
|
||||
@ -461,26 +468,48 @@ def _test_nearby_zone_ping(nearest_zone: tuple[str, float] | None) -> None:
|
||||
raise RuntimeError('Ping too high.')
|
||||
|
||||
|
||||
class NetValTestingWindow(TestingWindow):
|
||||
"""Window to test network related settings."""
|
||||
def get_net_val_testing_window() -> TestingWindow:
|
||||
"""Create a window for testing net values."""
|
||||
entries = [
|
||||
{'name': 'bufferTime', 'label': 'Buffer Time', 'increment': 1.0},
|
||||
{
|
||||
'name': 'delaySampling',
|
||||
'label': 'Delay Sampling',
|
||||
'increment': 1.0,
|
||||
},
|
||||
{
|
||||
'name': 'dynamicsSyncTime',
|
||||
'label': 'Dynamics Sync Time',
|
||||
'increment': 10,
|
||||
},
|
||||
{'name': 'showNetInfo', 'label': 'Show Net Info', 'increment': 1},
|
||||
]
|
||||
return TestingWindow(
|
||||
title=bui.Lstr(resource='settingsWindowAdvanced.netTestingText'),
|
||||
entries=entries,
|
||||
)
|
||||
|
||||
def __init__(self, transition: str = 'in_right'):
|
||||
entries = [
|
||||
{'name': 'bufferTime', 'label': 'Buffer Time', 'increment': 1.0},
|
||||
{
|
||||
'name': 'delaySampling',
|
||||
'label': 'Delay Sampling',
|
||||
'increment': 1.0,
|
||||
},
|
||||
{
|
||||
'name': 'dynamicsSyncTime',
|
||||
'label': 'Dynamics Sync Time',
|
||||
'increment': 10,
|
||||
},
|
||||
{'name': 'showNetInfo', 'label': 'Show Net Info', 'increment': 1},
|
||||
]
|
||||
super().__init__(
|
||||
title=bui.Lstr(resource='settingsWindowAdvanced.netTestingText'),
|
||||
entries=entries,
|
||||
transition=transition,
|
||||
)
|
||||
|
||||
# class NetValTestingWindow(TestingWindow):
|
||||
# """Window to test network related settings."""
|
||||
|
||||
# def __init__(self, transition: str = 'in_right'):
|
||||
# entries = [
|
||||
# {'name': 'bufferTime', 'label': 'Buffer Time', 'increment': 1.0},
|
||||
# {
|
||||
# 'name': 'delaySampling',
|
||||
# 'label': 'Delay Sampling',
|
||||
# 'increment': 1.0,
|
||||
# },
|
||||
# {
|
||||
# 'name': 'dynamicsSyncTime',
|
||||
# 'label': 'Dynamics Sync Time',
|
||||
# 'increment': 10,
|
||||
# },
|
||||
# {'name': 'showNetInfo', 'label': 'Show Net Info', 'increment': 1},
|
||||
# ]
|
||||
# super().__init__(
|
||||
# title=bui.Lstr(resource='settingsWindowAdvanced.netTestingText'),
|
||||
# entries=entries,
|
||||
# transition=transition,
|
||||
# )
|
||||
|
||||
@ -44,12 +44,13 @@ class PluginWindow(bui.MainWindow):
|
||||
uiscale = bui.app.ui_v1.uiscale
|
||||
self._width = 870.0 if uiscale is bui.UIScale.SMALL else 670.0
|
||||
x_inset = 100 if uiscale is bui.UIScale.SMALL else 0
|
||||
yoffs = -55.0 if uiscale is bui.UIScale.SMALL else 0
|
||||
self._height = (
|
||||
370.0
|
||||
450.0
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else 450.0 if uiscale is bui.UIScale.MEDIUM else 520.0
|
||||
)
|
||||
top_extra = 10 if uiscale is bui.UIScale.SMALL else 0
|
||||
top_extra = 0 if uiscale is bui.UIScale.SMALL else 0
|
||||
super().__init__(
|
||||
root_widget=bui.containerwidget(
|
||||
size=(self._width, self._height + top_extra),
|
||||
@ -64,7 +65,7 @@ class PluginWindow(bui.MainWindow):
|
||||
else 1.4 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||
),
|
||||
stack_offset=(
|
||||
(0, -25) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||
(0, 0) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||
),
|
||||
),
|
||||
transition=transition,
|
||||
@ -72,7 +73,9 @@ class PluginWindow(bui.MainWindow):
|
||||
)
|
||||
|
||||
self._scroll_width = self._width - (100 + 2 * x_inset)
|
||||
self._scroll_height = self._height - 115.0
|
||||
self._scroll_height = self._height - (
|
||||
200.0 if uiscale is bui.UIScale.SMALL else 115.0
|
||||
)
|
||||
self._sub_width = self._scroll_width * 0.95
|
||||
self._sub_height = 724.0
|
||||
|
||||
@ -85,7 +88,7 @@ class PluginWindow(bui.MainWindow):
|
||||
else:
|
||||
self._back_button = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(53 + x_inset, self._height - 60),
|
||||
position=(53 + x_inset, self._height - 60 + yoffs),
|
||||
size=(140, 60),
|
||||
scale=0.8,
|
||||
autoselect=True,
|
||||
@ -99,7 +102,7 @@ class PluginWindow(bui.MainWindow):
|
||||
|
||||
self._title_text = bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(self._width * 0.5, self._height - 41),
|
||||
position=(self._width * 0.5, self._height - 41 + yoffs),
|
||||
size=(0, 0),
|
||||
text=bui.Lstr(resource='pluginsText'),
|
||||
color=app.ui_v1.title_color,
|
||||
@ -120,7 +123,7 @@ class PluginWindow(bui.MainWindow):
|
||||
|
||||
self._num_plugins_text = bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(settings_button_x - 130, self._height - 41),
|
||||
position=(settings_button_x - 130, self._height - 41 + yoffs),
|
||||
size=(0, 0),
|
||||
text='',
|
||||
h_align='center',
|
||||
@ -130,7 +133,7 @@ class PluginWindow(bui.MainWindow):
|
||||
self._category_button = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
scale=0.7,
|
||||
position=(settings_button_x - 105, self._height - 60),
|
||||
position=(settings_button_x - 105, self._height - 60 + yoffs),
|
||||
size=(130, 60),
|
||||
label=bui.Lstr(resource='allText'),
|
||||
autoselect=True,
|
||||
@ -141,7 +144,7 @@ class PluginWindow(bui.MainWindow):
|
||||
|
||||
self._settings_button = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(settings_button_x, self._height - 58),
|
||||
position=(settings_button_x, self._height - 58 + yoffs),
|
||||
size=(40, 40),
|
||||
label='',
|
||||
on_activate_call=self._open_settings,
|
||||
@ -149,7 +152,7 @@ class PluginWindow(bui.MainWindow):
|
||||
|
||||
bui.imagewidget(
|
||||
parent=self._root_widget,
|
||||
position=(settings_button_x + 3, self._height - 57),
|
||||
position=(settings_button_x + 3, self._height - 57 + yoffs),
|
||||
draw_controller=self._settings_button,
|
||||
size=(35, 35),
|
||||
texture=bui.gettexture('settingsIcon'),
|
||||
@ -163,7 +166,10 @@ class PluginWindow(bui.MainWindow):
|
||||
|
||||
self._scrollwidget = bui.scrollwidget(
|
||||
parent=self._root_widget,
|
||||
position=(50 + x_inset, 50),
|
||||
position=(
|
||||
50 + x_inset,
|
||||
(135 if uiscale is bui.UIScale.SMALL else 50) + yoffs,
|
||||
),
|
||||
simple_culling_v=20.0,
|
||||
highlight=False,
|
||||
size=(self._scroll_width, self._scroll_height),
|
||||
|
||||
@ -21,17 +21,13 @@ class PluginSettingsWindow(bui.MainWindow):
|
||||
|
||||
assert bui.app.classic is not None
|
||||
uiscale = bui.app.ui_v1.uiscale
|
||||
width = 670.0 if uiscale is bui.UIScale.SMALL else 470.0
|
||||
height = (
|
||||
365.0
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else 300.0 if uiscale is bui.UIScale.MEDIUM else 370.0
|
||||
)
|
||||
top_extra = 10 if uiscale is bui.UIScale.SMALL else 0
|
||||
width = 750.0 if uiscale is bui.UIScale.SMALL else 470.0
|
||||
height = 400.0 if uiscale is bui.UIScale.SMALL else 300.0
|
||||
yoffs = -20 if uiscale is bui.UIScale.SMALL else 0
|
||||
|
||||
super().__init__(
|
||||
root_widget=bui.containerwidget(
|
||||
size=(width, height + top_extra),
|
||||
size=(width, height),
|
||||
toolbar_visibility=(
|
||||
'menu_minimal'
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
@ -43,7 +39,7 @@ class PluginSettingsWindow(bui.MainWindow):
|
||||
else 1.4 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||
),
|
||||
stack_offset=(
|
||||
(0, -25) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||
(0, 0) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||
),
|
||||
),
|
||||
transition=transition,
|
||||
@ -51,7 +47,7 @@ class PluginSettingsWindow(bui.MainWindow):
|
||||
)
|
||||
|
||||
if uiscale is bui.UIScale.SMALL:
|
||||
xoffs = 90
|
||||
xoffs = 135
|
||||
self._back_button = bui.get_special_widget('back_button')
|
||||
bui.containerwidget(
|
||||
edit=self._root_widget, on_cancel_call=self.main_window_back
|
||||
@ -60,7 +56,7 @@ class PluginSettingsWindow(bui.MainWindow):
|
||||
xoffs = 0
|
||||
self._back_button = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(53, height - 60),
|
||||
position=(53, height - 60 + yoffs),
|
||||
size=(60, 60),
|
||||
scale=0.8,
|
||||
autoselect=True,
|
||||
@ -76,7 +72,7 @@ class PluginSettingsWindow(bui.MainWindow):
|
||||
parent=self._root_widget,
|
||||
position=(
|
||||
width * 0.5,
|
||||
height - (45 if uiscale is bui.UIScale.SMALL else 35),
|
||||
height - (55 if uiscale is bui.UIScale.SMALL else 35) + yoffs,
|
||||
),
|
||||
size=(0, 0),
|
||||
text=bui.Lstr(resource='pluginSettingsText'),
|
||||
@ -85,10 +81,10 @@ class PluginSettingsWindow(bui.MainWindow):
|
||||
v_align='center',
|
||||
)
|
||||
|
||||
self._y_position = 170 if uiscale is bui.UIScale.MEDIUM else 205
|
||||
self._y_position = height - 140 + yoffs
|
||||
self._enable_plugins_button = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(xoffs + 65, self._y_position),
|
||||
position=(xoffs + 65, self._y_position + yoffs),
|
||||
size=(350, 60),
|
||||
autoselect=True,
|
||||
label=bui.Lstr(resource='pluginsEnableAllText'),
|
||||
@ -101,7 +97,7 @@ class PluginSettingsWindow(bui.MainWindow):
|
||||
self._y_position -= 70
|
||||
self._disable_plugins_button = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(xoffs + 65, self._y_position),
|
||||
position=(xoffs + 65, self._y_position + yoffs),
|
||||
size=(350, 60),
|
||||
autoselect=True,
|
||||
label=bui.Lstr(resource='pluginsDisableAllText'),
|
||||
@ -114,7 +110,7 @@ class PluginSettingsWindow(bui.MainWindow):
|
||||
self._y_position -= 70
|
||||
self._enable_new_plugins_check_box = bui.checkboxwidget(
|
||||
parent=self._root_widget,
|
||||
position=(xoffs + 65, self._y_position),
|
||||
position=(xoffs + 65, self._y_position + yoffs),
|
||||
size=(350, 60),
|
||||
value=bui.app.config.get(
|
||||
bui.app.plugins.AUTO_ENABLE_NEW_PLUGINS_CONFIG_KEY,
|
||||
|
||||
@ -21,7 +21,8 @@ class RemoteAppSettingsWindow(bui.MainWindow):
|
||||
app = bui.app
|
||||
uiscale = app.ui_v1.uiscale
|
||||
width = 800 if uiscale is bui.UIScale.SMALL else 700
|
||||
height = 390
|
||||
height = 480 if uiscale is bui.UIScale.SMALL else 390
|
||||
yoffs = -48 if uiscale is bui.UIScale.SMALL else 0
|
||||
spacing = 40
|
||||
assert bui.app.classic is not None
|
||||
super().__init__(
|
||||
@ -33,12 +34,12 @@ class RemoteAppSettingsWindow(bui.MainWindow):
|
||||
else 'menu_full'
|
||||
),
|
||||
scale=(
|
||||
1.76
|
||||
1.75
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else 1.3 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||
),
|
||||
stack_offset=(
|
||||
(-10, 0) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||
(0, 0) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||
),
|
||||
),
|
||||
transition=transition,
|
||||
@ -52,7 +53,7 @@ class RemoteAppSettingsWindow(bui.MainWindow):
|
||||
else:
|
||||
btn = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(40, height - 67),
|
||||
position=(40, height - 67 + yoffs),
|
||||
size=(140, 65),
|
||||
scale=0.8,
|
||||
label=bui.Lstr(resource='backText'),
|
||||
@ -71,7 +72,7 @@ class RemoteAppSettingsWindow(bui.MainWindow):
|
||||
|
||||
bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(width * 0.5, height - 42),
|
||||
position=(width * 0.5, height - 42 + yoffs),
|
||||
size=(0, 0),
|
||||
text=bui.Lstr(resource=f'{self._r}.titleText'),
|
||||
maxwidth=370,
|
||||
@ -85,7 +86,7 @@ class RemoteAppSettingsWindow(bui.MainWindow):
|
||||
v -= spacing * 1.2
|
||||
bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(15, v - 26),
|
||||
position=(15, v - 26 + yoffs),
|
||||
size=(width - 30, 30),
|
||||
maxwidth=width * 0.95,
|
||||
color=(0.7, 0.9, 0.7, 1.0),
|
||||
@ -106,7 +107,7 @@ class RemoteAppSettingsWindow(bui.MainWindow):
|
||||
# Update: now we just show link to the remote webpage.
|
||||
bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(width * 0.5, v + 5),
|
||||
position=(width * 0.5, v + 5 + yoffs),
|
||||
size=(0, 0),
|
||||
color=(0.7, 0.9, 0.7, 1.0),
|
||||
scale=1.4,
|
||||
@ -120,7 +121,7 @@ class RemoteAppSettingsWindow(bui.MainWindow):
|
||||
|
||||
bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(width * 0.5, v - 35),
|
||||
position=(width * 0.5, v - 35 + yoffs),
|
||||
size=(0, 0),
|
||||
color=(0.7, 0.9, 0.7, 0.8),
|
||||
scale=0.65,
|
||||
@ -133,7 +134,7 @@ class RemoteAppSettingsWindow(bui.MainWindow):
|
||||
|
||||
bui.checkboxwidget(
|
||||
parent=self._root_widget,
|
||||
position=(width * 0.5 - 150, v - 116),
|
||||
position=(width * 0.5 - 150, v - 116 + yoffs),
|
||||
size=(300, 30),
|
||||
maxwidth=300,
|
||||
scale=0.8,
|
||||
|
||||
@ -5,7 +5,7 @@
|
||||
from __future__ import annotations
|
||||
|
||||
import copy
|
||||
from typing import TYPE_CHECKING
|
||||
from typing import TYPE_CHECKING, override
|
||||
|
||||
import bauiv1 as bui
|
||||
|
||||
@ -25,9 +25,12 @@ class TestingWindow(bui.MainWindow):
|
||||
):
|
||||
assert bui.app.classic is not None
|
||||
uiscale = bui.app.ui_v1.uiscale
|
||||
self._width = 700 if uiscale is bui.UIScale.SMALL else 600
|
||||
self._height = 324 if uiscale is bui.UIScale.SMALL else 400
|
||||
self._width = 690 if uiscale is bui.UIScale.SMALL else 600
|
||||
self._height = 400 if uiscale is bui.UIScale.SMALL else 400
|
||||
self._entries_orig = copy.deepcopy(entries)
|
||||
self._entries = copy.deepcopy(entries)
|
||||
yoffs = -50 if uiscale is bui.UIScale.SMALL else 0
|
||||
|
||||
super().__init__(
|
||||
root_widget=bui.containerwidget(
|
||||
size=(self._width, self._height),
|
||||
@ -37,7 +40,7 @@ class TestingWindow(bui.MainWindow):
|
||||
else 1.2 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||
),
|
||||
stack_offset=(
|
||||
(0, -20) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||
(0, 0) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||
),
|
||||
toolbar_visibility=(
|
||||
'menu_minimal'
|
||||
@ -58,7 +61,7 @@ class TestingWindow(bui.MainWindow):
|
||||
self._back_button = btn = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
autoselect=True,
|
||||
position=(65, self._height - 59),
|
||||
position=(65, self._height - 59 + yoffs),
|
||||
size=(130, 60),
|
||||
scale=0.8,
|
||||
text_scale=1.2,
|
||||
@ -74,25 +77,30 @@ class TestingWindow(bui.MainWindow):
|
||||
)
|
||||
bui.containerwidget(edit=self._root_widget, cancel_button=btn)
|
||||
|
||||
self.title = title
|
||||
bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(
|
||||
self._width * 0.5,
|
||||
self._height - (42 if uiscale is bui.UIScale.SMALL else 35),
|
||||
self._height
|
||||
- (42 if uiscale is bui.UIScale.SMALL else 35)
|
||||
+ yoffs,
|
||||
),
|
||||
size=(0, 0),
|
||||
color=bui.app.ui_v1.title_color,
|
||||
h_align='center',
|
||||
v_align='center',
|
||||
maxwidth=245,
|
||||
text=title,
|
||||
text=self.title,
|
||||
)
|
||||
|
||||
bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(
|
||||
self._width * 0.5,
|
||||
self._height - (80 if uiscale is bui.UIScale.SMALL else 80),
|
||||
self._height
|
||||
- (80 if uiscale is bui.UIScale.SMALL else 80)
|
||||
+ yoffs,
|
||||
),
|
||||
size=(0, 0),
|
||||
color=bui.app.ui_v1.infotextcolor,
|
||||
@ -102,12 +110,17 @@ class TestingWindow(bui.MainWindow):
|
||||
text=bui.Lstr(resource='settingsWindowAdvanced.forTestingText'),
|
||||
)
|
||||
self._scroll_width = self._width - 130
|
||||
self._scroll_height = self._height - 140
|
||||
self._scroll_height = self._height - (
|
||||
220 if uiscale is bui.UIScale.SMALL else 140
|
||||
)
|
||||
self._scrollwidget = bui.scrollwidget(
|
||||
parent=self._root_widget,
|
||||
size=(self._scroll_width, self._scroll_height),
|
||||
highlight=False,
|
||||
position=((self._width - self._scroll_width) * 0.5, 40),
|
||||
position=(
|
||||
(self._width - self._scroll_width) * 0.5,
|
||||
(120 if uiscale is bui.UIScale.SMALL else 40) + yoffs,
|
||||
),
|
||||
)
|
||||
bui.containerwidget(edit=self._scrollwidget, claims_left_right=True)
|
||||
|
||||
@ -226,3 +239,22 @@ class TestingWindow(bui.MainWindow):
|
||||
edit=entry['widget'],
|
||||
text='%.4g' % bui.app.classic.value_test(entry['name']),
|
||||
)
|
||||
|
||||
@override
|
||||
def get_main_window_state(self) -> bui.MainWindowState:
|
||||
# Support recreating our window for back/refresh purposes.
|
||||
cls = type(self)
|
||||
|
||||
# Pull values from self here; if we do it in the lambda we'll keep
|
||||
# self alive which we don't want.
|
||||
title = self.title
|
||||
entries = self._entries_orig
|
||||
|
||||
return bui.BasicMainWindowState(
|
||||
create_call=lambda transition, origin_widget: cls(
|
||||
title=title,
|
||||
entries=entries,
|
||||
transition=transition,
|
||||
origin_widget=origin_widget,
|
||||
)
|
||||
)
|
||||
|
||||
@ -25,19 +25,21 @@ class SoundtrackBrowserWindow(bui.MainWindow):
|
||||
origin_widget: bui.Widget | None = None,
|
||||
):
|
||||
# pylint: disable=too-many-statements
|
||||
# pylint: disable=too-many-locals
|
||||
|
||||
self._r = 'editSoundtrackWindow'
|
||||
assert bui.app.classic is not None
|
||||
uiscale = bui.app.ui_v1.uiscale
|
||||
self._width = 800 if uiscale is bui.UIScale.SMALL else 600
|
||||
x_inset = 100 if uiscale is bui.UIScale.SMALL else 0
|
||||
yoffs = -30 if uiscale is bui.UIScale.SMALL else 0
|
||||
self._height = (
|
||||
340
|
||||
400
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else 370 if uiscale is bui.UIScale.MEDIUM else 440
|
||||
)
|
||||
spacing = 40.0
|
||||
v = self._height - 40.0
|
||||
v = self._height - 40.0 + yoffs
|
||||
v -= spacing * 1.0
|
||||
|
||||
super().__init__(
|
||||
@ -54,7 +56,7 @@ class SoundtrackBrowserWindow(bui.MainWindow):
|
||||
else 1.6 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||
),
|
||||
stack_offset=(
|
||||
(0, -18) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||
(0, 0) if uiscale is bui.UIScale.SMALL else (0, 0)
|
||||
),
|
||||
),
|
||||
transition=transition,
|
||||
@ -67,7 +69,7 @@ class SoundtrackBrowserWindow(bui.MainWindow):
|
||||
else:
|
||||
self._back_button = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(45 + x_inset, self._height - 60),
|
||||
position=(45 + x_inset, self._height - 60 + yoffs),
|
||||
size=(120, 60),
|
||||
scale=0.8,
|
||||
label=bui.Lstr(resource='backText'),
|
||||
@ -82,7 +84,12 @@ class SoundtrackBrowserWindow(bui.MainWindow):
|
||||
)
|
||||
bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(self._width * 0.5, self._height - 35),
|
||||
position=(
|
||||
self._width * 0.5,
|
||||
self._height
|
||||
- (46 if uiscale is bui.UIScale.SMALL else 35)
|
||||
+ yoffs,
|
||||
),
|
||||
size=(0, 0),
|
||||
maxwidth=300,
|
||||
text=bui.Lstr(resource=f'{self._r}.titleText'),
|
||||
@ -92,7 +99,7 @@ class SoundtrackBrowserWindow(bui.MainWindow):
|
||||
)
|
||||
|
||||
h = 43 + x_inset
|
||||
v = self._height - 60
|
||||
v = self._height - 60 + yoffs
|
||||
b_color = (0.6, 0.53, 0.63)
|
||||
b_textcolor = (0.75, 0.7, 0.8)
|
||||
lock_tex = bui.gettexture('lock')
|
||||
@ -222,8 +229,10 @@ class SoundtrackBrowserWindow(bui.MainWindow):
|
||||
)
|
||||
self._update()
|
||||
|
||||
v = self._height - 65
|
||||
scroll_height = self._height - 105
|
||||
v = self._height - 65 + yoffs
|
||||
scroll_height = self._height - (
|
||||
160 if uiscale is bui.UIScale.SMALL else 105
|
||||
)
|
||||
v -= scroll_height
|
||||
self._scrollwidget = scrollwidget = bui.scrollwidget(
|
||||
parent=self._root_widget,
|
||||
|
||||
@ -35,10 +35,12 @@ class SoundtrackEditWindow(bui.MainWindow):
|
||||
self._width = 900 if uiscale is bui.UIScale.SMALL else 648
|
||||
x_inset = 100 if uiscale is bui.UIScale.SMALL else 0
|
||||
self._height = (
|
||||
395
|
||||
450
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else 450 if uiscale is bui.UIScale.MEDIUM else 560
|
||||
)
|
||||
yoffs = -48 if uiscale is bui.UIScale.SMALL else 0
|
||||
|
||||
super().__init__(
|
||||
root_widget=bui.containerwidget(
|
||||
size=(self._width, self._height),
|
||||
@ -48,7 +50,7 @@ class SoundtrackEditWindow(bui.MainWindow):
|
||||
else 1.5 if uiscale is bui.UIScale.MEDIUM else 1.0
|
||||
),
|
||||
stack_offset=(
|
||||
(0, -37)
|
||||
(0, 0)
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else (0, 15) if uiscale is bui.UIScale.MEDIUM else (0, 0)
|
||||
),
|
||||
@ -58,7 +60,7 @@ class SoundtrackEditWindow(bui.MainWindow):
|
||||
)
|
||||
cancel_button = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(38 + x_inset, self._height - 60),
|
||||
position=(38 + x_inset, self._height - 60 + yoffs),
|
||||
size=(160, 60),
|
||||
autoselect=True,
|
||||
label=bui.Lstr(resource='cancelText'),
|
||||
@ -66,7 +68,7 @@ class SoundtrackEditWindow(bui.MainWindow):
|
||||
)
|
||||
save_button = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
position=(self._width - (168 + x_inset), self._height - 60),
|
||||
position=(self._width - (168 + x_inset), self._height - 60 + yoffs),
|
||||
autoselect=True,
|
||||
size=(160, 60),
|
||||
label=bui.Lstr(resource='saveText'),
|
||||
@ -76,7 +78,7 @@ class SoundtrackEditWindow(bui.MainWindow):
|
||||
bui.widget(edit=cancel_button, right_widget=save_button)
|
||||
bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(0, self._height - 50),
|
||||
position=(0, self._height - 50 + yoffs),
|
||||
size=(self._width, 25),
|
||||
text=bui.Lstr(
|
||||
resource=self._r
|
||||
@ -91,7 +93,7 @@ class SoundtrackEditWindow(bui.MainWindow):
|
||||
v_align='center',
|
||||
maxwidth=280,
|
||||
)
|
||||
v = self._height - 110
|
||||
v = self._height - 110 + yoffs
|
||||
if 'Soundtracks' not in appconfig:
|
||||
appconfig['Soundtracks'] = {}
|
||||
|
||||
@ -165,7 +167,9 @@ class SoundtrackEditWindow(bui.MainWindow):
|
||||
on_return_press_call=self._do_it_with_sound,
|
||||
)
|
||||
|
||||
scroll_height = self._height - 180
|
||||
scroll_height = self._height - (
|
||||
230 if uiscale is bui.UIScale.SMALL else 180
|
||||
)
|
||||
self._scrollwidget = scrollwidget = bui.scrollwidget(
|
||||
parent=self._root_widget,
|
||||
highlight=False,
|
||||
|
||||
@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int {
|
||||
namespace ballistica {
|
||||
|
||||
// These are set automatically via script; don't modify them here.
|
||||
const int kEngineBuildNumber = 22012;
|
||||
const int kEngineBuildNumber = 22013;
|
||||
const char* kEngineVersion = "1.7.37";
|
||||
const int kEngineApiVersion = 9;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user