mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-19 13:25:31 +08:00
settings window is now screen-size-responsive
This commit is contained in:
parent
83891bc753
commit
2a8612ed28
48
.efrocachemap
generated
48
.efrocachemap
generated
@ -4174,22 +4174,22 @@
|
||||
"build/assets/windows/Win32/ucrtbased.dll": "bfd1180c269d3950b76f35a63655e9e1",
|
||||
"build/assets/windows/Win32/vc_redist.x86.exe": "15a5f1f876503885adbdf5b3989b3718",
|
||||
"build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599",
|
||||
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "6a0e7ba71c73e69496220ce36aaa76b1",
|
||||
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "ac0e7cc649bd01ff4fb4030063c88d4b",
|
||||
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "61c38e20c1df867870ed20ad889a3479",
|
||||
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "6865c61539d13b6b15bb9984204a3bd7",
|
||||
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "bc9fb2fb09e767da2ec0292ea1bba49a",
|
||||
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "c36158d2a508fd071ae7f6aa3bd42e42",
|
||||
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "fe8a29a51301cab6378eac9610bcc660",
|
||||
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "2f5b53edbd5b2d50fc6bf5a49ed5b24f",
|
||||
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "329d6ff33a4f7f41cbef0b0bfc0a6736",
|
||||
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "2d9e89f4e2c77f7e435ada2c73e4e477",
|
||||
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "2c4b8c9e8e3c7a1c81e2a9aa66f3e66e",
|
||||
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "13647f95e775e511117135dc71bf1ad2",
|
||||
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "0739c351b408aafd52fae6502a69dbac",
|
||||
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "57e33ff2f29c4126804e82f95056a113",
|
||||
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "4cd1811d7425fbad0a254c6df36cf672",
|
||||
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "b346b354db7e5a2c98041a7e71082f55",
|
||||
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "bf27c876cc533bb0b444bb4d27fbc0c5",
|
||||
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "a6e1b57b3f35a20682ffeac484b35072",
|
||||
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "0aa38cf85d604f87316dbc64a77ab596",
|
||||
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "779c1acad5bc8d667d870dbdb049857a",
|
||||
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "7d33f9c6b1eac466e140212126acfe2c",
|
||||
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "099c6b091e7c6b50ef01372102c453f8",
|
||||
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "4609ee8aefbbe2fabd467e1600830938",
|
||||
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "cd5213a585776fd499a6273837c3c140",
|
||||
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "68d0d3642a0dbc73b4fe16b444f30804",
|
||||
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "4e06b1af4cead60bcdd1e47809c3d2e9",
|
||||
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "eb65be762e826b5d5c5174f104aef345",
|
||||
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "e146aec273872cd5285ca3210c3496f4",
|
||||
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "429f1fe47e67ca2a9dcf514792b84be1",
|
||||
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "69868dc1a8e6041e11ec0c7c198d5e5e",
|
||||
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "525eb603a46789f43fda4b57ad155343",
|
||||
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "833a304c39d99ad21b20bb4203269653",
|
||||
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "4d70703c4eba1a402fbc2d997d84aa93",
|
||||
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "bb64e2182b1a533679f93c5997f14584",
|
||||
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "4d70703c4eba1a402fbc2d997d84aa93",
|
||||
@ -4202,14 +4202,14 @@
|
||||
"build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "116b500c2d57caf06619408b2176e83b",
|
||||
"build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "e3e9d9c7a94f8cd22939839fd8fbc178",
|
||||
"build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "116b500c2d57caf06619408b2176e83b",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "832f94ea1291e6acc9a7ea198a9f6015",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "4075505def5490d75824e1bdce1b6014",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "ca07673b52035cb267b6637fcba128fd",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "816160843c0ddb8c466243b022d97a9e",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "e8a69aa6ed9f63d393d5b4276c5f81ab",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "cd387294d6939fffa24305d9eec7116d",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "9addbfac3f2719114ddf8599ef1f7bff",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "8de2faf55a4b716ee7b452326d35feed",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "83f8e54bae6a5ee4c9bb187806c1c154",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "8fa18ec784b59f9b5598c372f3b4856a",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "60181a48acfa4e8d2290f6d12559e748",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "b05b52b10a6b3b3abbe4982a853d5f71",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "1e98b894cdeaf679327b47f551ff9db6",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "4d31a7110bc1ac7511b47888b9515d44",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "084979bf93d7bdd9ba6a884244fc5e19",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "62555e2a160913f5b3b8b8389953cc09",
|
||||
"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": "06042d31df0ff9af96b99477162e2a91",
|
||||
|
||||
@ -1,4 +1,4 @@
|
||||
### 1.7.37 (build 22234, api 9, 2025-01-22)
|
||||
### 1.7.37 (build 22235, api 9, 2025-01-22)
|
||||
- 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.
|
||||
|
||||
@ -53,7 +53,7 @@ if TYPE_CHECKING:
|
||||
|
||||
# Build number and version of the ballistica binary we expect to be
|
||||
# using.
|
||||
TARGET_BALLISTICA_BUILD = 22234
|
||||
TARGET_BALLISTICA_BUILD = 22235
|
||||
TARGET_BALLISTICA_VERSION = '1.7.37'
|
||||
|
||||
|
||||
|
||||
@ -937,7 +937,7 @@ class AccountSettingsWindow(bui.MainWindow):
|
||||
self._leaderboards_button: bui.Widget | None
|
||||
if show_leaderboards_button:
|
||||
button_width = 300
|
||||
v -= leaderboards_button_space * 0.85
|
||||
v -= leaderboards_button_space
|
||||
self._leaderboards_button = btn = bui.buttonwidget(
|
||||
parent=self._subcontainer,
|
||||
position=((self._sub_width - button_width) * 0.5, v),
|
||||
@ -956,7 +956,6 @@ class AccountSettingsWindow(bui.MainWindow):
|
||||
edit=btn, right_widget=bui.get_special_widget('squad_button')
|
||||
)
|
||||
bui.widget(edit=btn, left_widget=bbtn)
|
||||
v -= leaderboards_button_space * 0.15
|
||||
else:
|
||||
self._leaderboards_button = None
|
||||
|
||||
|
||||
@ -74,7 +74,6 @@ class GatherWindow(bui.MainWindow):
|
||||
transition: str | None = 'in_right',
|
||||
origin_widget: bui.Widget | None = None,
|
||||
):
|
||||
# pylint: disable=too-many-statements
|
||||
# pylint: disable=too-many-locals
|
||||
# pylint: disable=cyclic-import
|
||||
from bauiv1lib.gather.abouttab import AboutGatherTab
|
||||
@ -202,13 +201,11 @@ class GatherWindow(bui.MainWindow):
|
||||
)
|
||||
|
||||
tab_inset = 250.0 if uiscale is bui.UIScale.SMALL else 100.0
|
||||
# tab_inset_extra_r = 150 if uiscale is bui.UIScale.SMALL else 0
|
||||
tab_inset_extra_r = 0
|
||||
|
||||
self._tab_row = TabRow(
|
||||
self._root_widget,
|
||||
tabdefs,
|
||||
size=(self._scroll_width - 2.0 * tab_inset - tab_inset_extra_r, 50),
|
||||
size=(self._scroll_width - 2.0 * tab_inset, 50),
|
||||
pos=(
|
||||
self._scroll_left + tab_inset,
|
||||
self._scroll_bottom + self._scroll_height - 4.0,
|
||||
|
||||
@ -31,29 +31,46 @@ class AllSettingsWindow(bui.MainWindow):
|
||||
assert bui.app.classic is not None
|
||||
uiscale = bui.app.ui_v1.uiscale
|
||||
width = 1000 if uiscale is bui.UIScale.SMALL else 900
|
||||
x_inset = 125 if uiscale is bui.UIScale.SMALL else 0
|
||||
height = 500 if uiscale is bui.UIScale.SMALL else 450
|
||||
height = 800 if uiscale is bui.UIScale.SMALL else 450
|
||||
self._r = 'settingsWindow'
|
||||
top_extra = 20 if uiscale is bui.UIScale.SMALL else 0
|
||||
yoffs = -30 if uiscale is bui.UIScale.SMALL else -30
|
||||
|
||||
uiscale = bui.app.ui_v1.uiscale
|
||||
|
||||
# Do some fancy math to fill all available screen area up to the
|
||||
# size of our backing container. This lets us fit to the exact
|
||||
# screen shape at small ui scale.
|
||||
screensize = bui.get_virtual_screen_size()
|
||||
scale = (
|
||||
1.5
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else 1.1 if uiscale is bui.UIScale.MEDIUM else 0.8
|
||||
)
|
||||
# Calc screen size in our local container space and clamp to a
|
||||
# bit smaller than our container size.
|
||||
target_height = min(height - 70, screensize[1] / scale)
|
||||
|
||||
# To get top/left coords, go to the center of our window and
|
||||
# offset by half the width/height of our target area.
|
||||
yoffs = 0.5 * height + 0.5 * target_height + 30.0
|
||||
|
||||
# scroll_width = target_width
|
||||
# scroll_height = target_height - 25
|
||||
# scroll_bottom = yoffs - 54 - scroll_height
|
||||
|
||||
super().__init__(
|
||||
root_widget=bui.containerwidget(
|
||||
size=(width, height + top_extra),
|
||||
size=(width, height),
|
||||
toolbar_visibility=(
|
||||
'menu_minimal'
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else 'menu_full'
|
||||
),
|
||||
scale=(
|
||||
1.5
|
||||
if uiscale is bui.UIScale.SMALL
|
||||
else 1.1 if uiscale is bui.UIScale.MEDIUM else 0.8
|
||||
),
|
||||
scale=scale,
|
||||
),
|
||||
transition=transition,
|
||||
origin_widget=origin_widget,
|
||||
# We're affected by screen size only at small ui-scale.
|
||||
refresh_on_screen_size_changes=uiscale is bui.UIScale.SMALL,
|
||||
)
|
||||
|
||||
if uiscale is bui.UIScale.SMALL:
|
||||
@ -65,7 +82,7 @@ class AllSettingsWindow(bui.MainWindow):
|
||||
self._back_button = btn = bui.buttonwidget(
|
||||
parent=self._root_widget,
|
||||
autoselect=True,
|
||||
position=(40 + x_inset, height - 60 + yoffs),
|
||||
position=(50, yoffs - 80.0),
|
||||
size=(70, 70),
|
||||
scale=0.8,
|
||||
text_scale=1.2,
|
||||
@ -77,7 +94,7 @@ class AllSettingsWindow(bui.MainWindow):
|
||||
|
||||
bui.textwidget(
|
||||
parent=self._root_widget,
|
||||
position=(0, height - 44 + yoffs),
|
||||
position=(0, yoffs - (70 if uiscale is bui.UIScale.SMALL else 60)),
|
||||
size=(width, 25),
|
||||
text=bui.Lstr(resource=f'{self._r}.titleText'),
|
||||
color=bui.app.ui_v1.title_color,
|
||||
@ -93,7 +110,7 @@ class AllSettingsWindow(bui.MainWindow):
|
||||
all_buttons_width = 4.0 * bwidth + 3.0 * margin
|
||||
|
||||
x = width * 0.5 - all_buttons_width * 0.5
|
||||
y = height + yoffs - 335.0
|
||||
y = height * 0.5 - bheight * 0.5 - 20.0
|
||||
|
||||
def _button(
|
||||
position: tuple[float, float],
|
||||
|
||||
@ -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 = 22234;
|
||||
const int kEngineBuildNumber = 22235;
|
||||
const char* kEngineVersion = "1.7.37";
|
||||
const int kEngineApiVersion = 9;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user