mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-19 13:25:31 +08:00
more ui work
This commit is contained in:
parent
88e2affed1
commit
690da5a3da
56
.efrocachemap
generated
56
.efrocachemap
generated
@ -2303,14 +2303,14 @@
|
|||||||
"build/assets/ba_data/textures/scorchBig.pvr": "a35c52bae0e4c3b787ae7ec075b022be",
|
"build/assets/ba_data/textures/scorchBig.pvr": "a35c52bae0e4c3b787ae7ec075b022be",
|
||||||
"build/assets/ba_data/textures/scorchBig_preview.png": "dabfeb58b47b9bc18f318954000e7b60",
|
"build/assets/ba_data/textures/scorchBig_preview.png": "dabfeb58b47b9bc18f318954000e7b60",
|
||||||
"build/assets/ba_data/textures/scorch_preview.png": "41931a131dd0e5bfc39b2778d64ee856",
|
"build/assets/ba_data/textures/scorch_preview.png": "41931a131dd0e5bfc39b2778d64ee856",
|
||||||
"build/assets/ba_data/textures/scrollWidget.dds": "06189c8c39cfbd2611afa65500cdec7d",
|
"build/assets/ba_data/textures/scrollWidget.dds": "973cc49dd5ef456cb3a2f7c376cf71ea",
|
||||||
"build/assets/ba_data/textures/scrollWidget.ktx": "c31f2240c43b4a166a6ff786772f4f35",
|
"build/assets/ba_data/textures/scrollWidget.ktx": "da663d8b4dad29717ca04d0a210fee1e",
|
||||||
"build/assets/ba_data/textures/scrollWidget.pvr": "4b0fccd31b5e7176650db786992c6ca6",
|
"build/assets/ba_data/textures/scrollWidget.pvr": "4194daf9f5be8f6774cd5c578d58a491",
|
||||||
"build/assets/ba_data/textures/scrollWidgetGlow.dds": "35cfa5b182b234fd193cb7ff1dbaa23b",
|
"build/assets/ba_data/textures/scrollWidgetGlow.dds": "35cfa5b182b234fd193cb7ff1dbaa23b",
|
||||||
"build/assets/ba_data/textures/scrollWidgetGlow.ktx": "ecc17e1824545b8c64510522b200ed3d",
|
"build/assets/ba_data/textures/scrollWidgetGlow.ktx": "ecc17e1824545b8c64510522b200ed3d",
|
||||||
"build/assets/ba_data/textures/scrollWidgetGlow.pvr": "9443f6d6a5530c88a9cb907357da48d5",
|
"build/assets/ba_data/textures/scrollWidgetGlow.pvr": "9443f6d6a5530c88a9cb907357da48d5",
|
||||||
"build/assets/ba_data/textures/scrollWidgetGlow_preview.png": "071937a6bc76b6dd8dc9fa4e3c9114f0",
|
"build/assets/ba_data/textures/scrollWidgetGlow_preview.png": "071937a6bc76b6dd8dc9fa4e3c9114f0",
|
||||||
"build/assets/ba_data/textures/scrollWidget_preview.png": "4bcb8b8b7595d35fbad54fe575dcbfc0",
|
"build/assets/ba_data/textures/scrollWidget_preview.png": "96477fe2f5294d4886bc95b77d7309f5",
|
||||||
"build/assets/ba_data/textures/settingsIcon.dds": "b2bde3d666e4751ab97086c04846e5bf",
|
"build/assets/ba_data/textures/settingsIcon.dds": "b2bde3d666e4751ab97086c04846e5bf",
|
||||||
"build/assets/ba_data/textures/settingsIcon.ktx": "c3123be94bde0a30604a97a30687c48c",
|
"build/assets/ba_data/textures/settingsIcon.ktx": "c3123be94bde0a30604a97a30687c48c",
|
||||||
"build/assets/ba_data/textures/settingsIcon.pvr": "1caecc02aac9c2161466a5c2c9f5f8b8",
|
"build/assets/ba_data/textures/settingsIcon.pvr": "1caecc02aac9c2161466a5c2c9f5f8b8",
|
||||||
@ -4103,22 +4103,22 @@
|
|||||||
"build/assets/windows/Win32/ucrtbased.dll": "bfd1180c269d3950b76f35a63655e9e1",
|
"build/assets/windows/Win32/ucrtbased.dll": "bfd1180c269d3950b76f35a63655e9e1",
|
||||||
"build/assets/windows/Win32/vc_redist.x86.exe": "15a5f1f876503885adbdf5b3989b3718",
|
"build/assets/windows/Win32/vc_redist.x86.exe": "15a5f1f876503885adbdf5b3989b3718",
|
||||||
"build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599",
|
"build/assets/windows/Win32/vcruntime140d.dll": "865b2af4d1e26a1a8073c89acb06e599",
|
||||||
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "5bf2fb190bf3a50a89f960334df4d305",
|
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "390472d8d44b0a650796bfd6022d0549",
|
||||||
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "ed8593ca6f1ff5b9e2531e050c709788",
|
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "23f27d6f139c653f23a15a0af7f7e02c",
|
||||||
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "172c306c8fc50fe4d688636772baa455",
|
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "097b082f8f5abb18d824b2044da1de78",
|
||||||
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "e9a020f503a89ccbbbe45e0d5b29b2f1",
|
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "c027478f038af2faedcc4103e75bc39d",
|
||||||
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "d9be694c1b7aba9796a17f81d7abccc8",
|
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "5c7f18d5ff9eb14421fe3743550ddf57",
|
||||||
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "9cb37831a43d787f34f587fbdfccf0c2",
|
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "cef0bc0d149a4c433c2e4bee5b47414a",
|
||||||
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "b73f382527c980e6187008a4fa7c3d84",
|
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "25546af5cf64a0e1e1d1f46b38298820",
|
||||||
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "4501a7c845060a3754dd2b7b9e937088",
|
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "7f172d6c531c371837302f370f77db08",
|
||||||
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "244be2eeecafbac57442bc88d5c35172",
|
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "0d79db47846defaffaa0bf97ec6b23fc",
|
||||||
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "d94961ab202eff037b0aca4305a646a1",
|
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "45373e10bb60989787e415ae938756fe",
|
||||||
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "224fb1f5cb77ce62fe755e8d6797cb18",
|
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "0cc3834e81761efdc50babed9e5c7151",
|
||||||
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "429a0a6b752cbe48cca155228f791916",
|
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "4e28c4abb0e7128d08f2b84a87d8a765",
|
||||||
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "15003e60d7f2633cd56766bc0af31b4e",
|
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "96b856d3db5d061527383b42e588a333",
|
||||||
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "86077c01bedaf0b9d4b727df1ffad14e",
|
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "124afb5eec04365e42b059b0c2ec98e7",
|
||||||
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "773eb771722c4fd86394ef1160db0a5a",
|
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "0271c53794bdb4a762ae7210d9828fb7",
|
||||||
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "ec8fa3c1077167307ebe8b5814ad8f9a",
|
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "f8b3744f90503502618130c8d28f1aa4",
|
||||||
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "33a0ae6f1ea5a0b0c60055ce01478488",
|
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "33a0ae6f1ea5a0b0c60055ce01478488",
|
||||||
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "aad882eaf2230b89973e2cf4f13c9759",
|
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "aad882eaf2230b89973e2cf4f13c9759",
|
||||||
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "33a0ae6f1ea5a0b0c60055ce01478488",
|
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "33a0ae6f1ea5a0b0c60055ce01478488",
|
||||||
@ -4131,14 +4131,14 @@
|
|||||||
"build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "ae4e3f563892f6b9311c4b7284f28c11",
|
"build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "ae4e3f563892f6b9311c4b7284f28c11",
|
||||||
"build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "01dab862a43d9e7c4ee4e49212442d42",
|
"build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "01dab862a43d9e7c4ee4e49212442d42",
|
||||||
"build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "ae4e3f563892f6b9311c4b7284f28c11",
|
"build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "ae4e3f563892f6b9311c4b7284f28c11",
|
||||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "eee9e6778b27ea4722efb65b573673a6",
|
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "2f581e3dead7038e5b94bc096a7b8c80",
|
||||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "18fdfa5978141a5b2f3ce553117f741e",
|
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "4538ad0d6b4794de96fb78742ebcdc84",
|
||||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "2296e1d8cbec0cc429a68cde4949b8b7",
|
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "0d1a2f2066ae412549034e981ae39e2c",
|
||||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "a35f0e217ab1a526852f96dba1b469cb",
|
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "55180e66455f91d3af8f15c0c81607a4",
|
||||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "91f829af919fd293012d9a1beccea706",
|
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "bb2c15187840ef373ae79cdf1623d3b5",
|
||||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "c323032fb0f5ba9e85e96b86d34919ba",
|
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "8ee1bb4440c364f9fa91791276d64b87",
|
||||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "71207aad7fb9de8eb6c77525c402b904",
|
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "863f70d88ab9b3c7c6910d94e26b6f35",
|
||||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "2d17014f6f47829e1dab77cc371f125c",
|
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "bb928df1aa05c84889b45f2a00544e64",
|
||||||
"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": "794d258d59fd17a61752843a9a0551ad",
|
"src/assets/ba_data/python/babase/_mgen/enums.py": "794d258d59fd17a61752843a9a0551ad",
|
||||||
"src/ballistica/base/mgen/pyembed/binding_base.inc": "06042d31df0ff9af96b99477162e2a91",
|
"src/ballistica/base/mgen/pyembed/binding_base.inc": "06042d31df0ff9af96b99477162e2a91",
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
### 1.7.37 (build 22152, api 9, 2024-12-30)
|
### 1.7.37 (build 22155, api 9, 2024-12-31)
|
||||||
- Bumping api version to 9. As you'll see below, there's some UI changes that
|
- 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
|
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.
|
touch UI stuff at all you can simply bump your api version and call it a day.
|
||||||
@ -171,6 +171,11 @@
|
|||||||
See 'Getter/Setter Function Names' in
|
See 'Getter/Setter Function Names' in
|
||||||
https://github.com/efroemling/ballistica/wiki/Coding-Style-Guide for more
|
https://github.com/efroemling/ballistica/wiki/Coding-Style-Guide for more
|
||||||
info.
|
info.
|
||||||
|
- Removed support for tab key navigation. This has been largely ignored for
|
||||||
|
years and behaved in a mostly broken way in all recent UIs. Keyboard users
|
||||||
|
should use arrow keys for navigation. To update any old UI code, search for
|
||||||
|
and remove any 'claims_tab' arguments to UI calls since that argument no
|
||||||
|
longer exists.
|
||||||
|
|
||||||
### 1.7.36 (build 21944, api 8, 2024-07-26)
|
### 1.7.36 (build 21944, api 8, 2024-07-26)
|
||||||
- Wired up Tokens, BombSquad's new purchasable currency. The first thing these
|
- Wired up Tokens, BombSquad's new purchasable currency. The first thing these
|
||||||
|
|||||||
@ -210,6 +210,14 @@ class ClassicAppMode(babase.AppMode):
|
|||||||
chest_1_appearance='',
|
chest_1_appearance='',
|
||||||
chest_2_appearance='',
|
chest_2_appearance='',
|
||||||
chest_3_appearance='',
|
chest_3_appearance='',
|
||||||
|
chest_0_unlock_time=-1.0,
|
||||||
|
chest_1_unlock_time=-1.0,
|
||||||
|
chest_2_unlock_time=-1.0,
|
||||||
|
chest_3_unlock_time=-1.0,
|
||||||
|
chest_0_ad_allow_time=-1.0,
|
||||||
|
chest_1_ad_allow_time=-1.0,
|
||||||
|
chest_2_ad_allow_time=-1.0,
|
||||||
|
chest_3_ad_allow_time=-1.0,
|
||||||
)
|
)
|
||||||
self._have_account_values = False
|
self._have_account_values = False
|
||||||
self._update_ui_live_state()
|
self._update_ui_live_state()
|
||||||
@ -281,6 +289,20 @@ class ClassicAppMode(babase.AppMode):
|
|||||||
chest_3_appearance=(
|
chest_3_appearance=(
|
||||||
'' if chest3 is None else chest3.appearance.value
|
'' if chest3 is None else chest3.appearance.value
|
||||||
),
|
),
|
||||||
|
chest_0_unlock_time=(
|
||||||
|
-1.0 if chest0 is None else chest0.unlock_time.timestamp()
|
||||||
|
),
|
||||||
|
chest_1_unlock_time=-1.0,
|
||||||
|
chest_2_unlock_time=-1.0,
|
||||||
|
chest_3_unlock_time=-1.0,
|
||||||
|
chest_0_ad_allow_time=(
|
||||||
|
-1.0
|
||||||
|
if chest0 is None or chest0.ad_allow_time is None
|
||||||
|
else chest0.ad_allow_time.timestamp()
|
||||||
|
),
|
||||||
|
chest_1_ad_allow_time=-1.0,
|
||||||
|
chest_2_ad_allow_time=-1.0,
|
||||||
|
chest_3_ad_allow_time=-1.0,
|
||||||
)
|
)
|
||||||
|
|
||||||
# Note that we have values and updated faded state accordingly.
|
# Note that we have values and updated faded state accordingly.
|
||||||
|
|||||||
@ -53,7 +53,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 = 22152
|
TARGET_BALLISTICA_BUILD = 22155
|
||||||
TARGET_BALLISTICA_VERSION = '1.7.37'
|
TARGET_BALLISTICA_VERSION = '1.7.37'
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -162,7 +162,6 @@ class AccountSettingsWindow(bui.MainWindow):
|
|||||||
),
|
),
|
||||||
size=(self._scroll_width, self._scroll_height),
|
size=(self._scroll_width, self._scroll_height),
|
||||||
claims_left_right=True,
|
claims_left_right=True,
|
||||||
claims_tab=True,
|
|
||||||
selection_loops_to_parent=True,
|
selection_loops_to_parent=True,
|
||||||
)
|
)
|
||||||
self._subcontainer: bui.Widget | None = None
|
self._subcontainer: bui.Widget | None = None
|
||||||
@ -452,7 +451,6 @@ class AccountSettingsWindow(bui.MainWindow):
|
|||||||
size=(self._sub_width, self._sub_height),
|
size=(self._sub_width, self._sub_height),
|
||||||
background=False,
|
background=False,
|
||||||
claims_left_right=True,
|
claims_left_right=True,
|
||||||
claims_tab=True,
|
|
||||||
selection_loops_to_parent=True,
|
selection_loops_to_parent=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -273,7 +273,6 @@ class CoopBrowserWindow(bui.MainWindow):
|
|||||||
size=(self._scroll_width, self._scroll_height),
|
size=(self._scroll_width, self._scroll_height),
|
||||||
simple_culling_v=10.0,
|
simple_culling_v=10.0,
|
||||||
claims_left_right=True,
|
claims_left_right=True,
|
||||||
claims_tab=True,
|
|
||||||
selection_loops_to_parent=True,
|
selection_loops_to_parent=True,
|
||||||
)
|
)
|
||||||
self._subcontainer: bui.Widget | None = None
|
self._subcontainer: bui.Widget | None = None
|
||||||
@ -717,7 +716,6 @@ class CoopBrowserWindow(bui.MainWindow):
|
|||||||
size=(self._subcontainerwidth, self._subcontainerheight),
|
size=(self._subcontainerwidth, self._subcontainerheight),
|
||||||
background=False,
|
background=False,
|
||||||
claims_left_right=True,
|
claims_left_right=True,
|
||||||
claims_tab=True,
|
|
||||||
selection_loops_to_parent=True,
|
selection_loops_to_parent=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -5,6 +5,7 @@
|
|||||||
from __future__ import annotations
|
from __future__ import annotations
|
||||||
|
|
||||||
import os
|
import os
|
||||||
|
import json
|
||||||
import logging
|
import logging
|
||||||
from typing import TYPE_CHECKING, override
|
from typing import TYPE_CHECKING, override
|
||||||
|
|
||||||
@ -24,7 +25,6 @@ class CreditsWindow(bui.MainWindow):
|
|||||||
):
|
):
|
||||||
# pylint: disable=too-many-locals
|
# pylint: disable=too-many-locals
|
||||||
# pylint: disable=too-many-statements
|
# pylint: disable=too-many-statements
|
||||||
import json
|
|
||||||
|
|
||||||
bui.set_analytics_screen('Credits Window')
|
bui.set_analytics_screen('Credits Window')
|
||||||
|
|
||||||
@ -332,7 +332,6 @@ class CreditsWindow(bui.MainWindow):
|
|||||||
size=(self._sub_width, self._sub_height),
|
size=(self._sub_width, self._sub_height),
|
||||||
background=False,
|
background=False,
|
||||||
claims_left_right=False,
|
claims_left_right=False,
|
||||||
claims_tab=False,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
voffs = 0
|
voffs = 0
|
||||||
|
|||||||
@ -387,12 +387,10 @@ class FileSelectorWindow(bui.MainWindow):
|
|||||||
bui.containerwidget(
|
bui.containerwidget(
|
||||||
edit=self._scrollwidget,
|
edit=self._scrollwidget,
|
||||||
claims_left_right=False,
|
claims_left_right=False,
|
||||||
claims_tab=False,
|
|
||||||
)
|
)
|
||||||
bui.containerwidget(
|
bui.containerwidget(
|
||||||
edit=self._subcontainer,
|
edit=self._subcontainer,
|
||||||
claims_left_right=False,
|
claims_left_right=False,
|
||||||
claims_tab=False,
|
|
||||||
selection_loops=False,
|
selection_loops=False,
|
||||||
print_list_exit_instructions=False,
|
print_list_exit_instructions=False,
|
||||||
)
|
)
|
||||||
|
|||||||
@ -137,7 +137,6 @@ class HelpWindow(bui.MainWindow):
|
|||||||
size=(self._sub_width, self._sub_height),
|
size=(self._sub_width, self._sub_height),
|
||||||
background=False,
|
background=False,
|
||||||
claims_left_right=False,
|
claims_left_right=False,
|
||||||
claims_tab=False,
|
|
||||||
)
|
)
|
||||||
|
|
||||||
spacing = 1.0
|
spacing = 1.0
|
||||||
|
|||||||
@ -205,7 +205,6 @@ class PlaylistEditGameWindow(bui.MainWindow):
|
|||||||
),
|
),
|
||||||
highlight=False,
|
highlight=False,
|
||||||
claims_left_right=True,
|
claims_left_right=True,
|
||||||
claims_tab=True,
|
|
||||||
selection_loops_to_parent=True,
|
selection_loops_to_parent=True,
|
||||||
)
|
)
|
||||||
self._subcontainer = bui.containerwidget(
|
self._subcontainer = bui.containerwidget(
|
||||||
@ -213,7 +212,6 @@ class PlaylistEditGameWindow(bui.MainWindow):
|
|||||||
size=(scroll_width, scroll_height),
|
size=(scroll_width, scroll_height),
|
||||||
background=False,
|
background=False,
|
||||||
claims_left_right=True,
|
claims_left_right=True,
|
||||||
claims_tab=True,
|
|
||||||
selection_loops_to_parent=True,
|
selection_loops_to_parent=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -99,7 +99,6 @@ class GamepadAdvancedSettingsWindow(bui.Window):
|
|||||||
),
|
),
|
||||||
size=(self._scroll_width, self._scroll_height),
|
size=(self._scroll_width, self._scroll_height),
|
||||||
claims_left_right=True,
|
claims_left_right=True,
|
||||||
claims_tab=True,
|
|
||||||
selection_loops_to_parent=True,
|
selection_loops_to_parent=True,
|
||||||
)
|
)
|
||||||
self._subcontainer = bui.containerwidget(
|
self._subcontainer = bui.containerwidget(
|
||||||
@ -107,7 +106,6 @@ class GamepadAdvancedSettingsWindow(bui.Window):
|
|||||||
size=(self._sub_width, self._sub_height),
|
size=(self._sub_width, self._sub_height),
|
||||||
background=False,
|
background=False,
|
||||||
claims_left_right=True,
|
claims_left_right=True,
|
||||||
claims_tab=True,
|
|
||||||
selection_loops_to_parent=True,
|
selection_loops_to_parent=True,
|
||||||
)
|
)
|
||||||
bui.containerwidget(
|
bui.containerwidget(
|
||||||
|
|||||||
@ -89,7 +89,6 @@ class TouchscreenSettingsWindow(bui.MainWindow):
|
|||||||
),
|
),
|
||||||
size=(self._scroll_width, self._scroll_height),
|
size=(self._scroll_width, self._scroll_height),
|
||||||
claims_left_right=True,
|
claims_left_right=True,
|
||||||
claims_tab=True,
|
|
||||||
selection_loops_to_parent=True,
|
selection_loops_to_parent=True,
|
||||||
)
|
)
|
||||||
self._subcontainer = bui.containerwidget(
|
self._subcontainer = bui.containerwidget(
|
||||||
@ -97,7 +96,6 @@ class TouchscreenSettingsWindow(bui.MainWindow):
|
|||||||
size=(self._sub_width, self._sub_height),
|
size=(self._sub_width, self._sub_height),
|
||||||
background=False,
|
background=False,
|
||||||
claims_left_right=True,
|
claims_left_right=True,
|
||||||
claims_tab=True,
|
|
||||||
selection_loops_to_parent=True,
|
selection_loops_to_parent=True,
|
||||||
)
|
)
|
||||||
self._build_gui()
|
self._build_gui()
|
||||||
|
|||||||
@ -177,14 +177,12 @@ class SoundtrackEditWindow(bui.MainWindow):
|
|||||||
size=(self._width - (80 + 2 * x_inset), scroll_height),
|
size=(self._width - (80 + 2 * x_inset), scroll_height),
|
||||||
simple_culling_v=10,
|
simple_culling_v=10,
|
||||||
claims_left_right=True,
|
claims_left_right=True,
|
||||||
claims_tab=True,
|
|
||||||
selection_loops_to_parent=True,
|
selection_loops_to_parent=True,
|
||||||
)
|
)
|
||||||
bui.widget(edit=self._text_field, down_widget=self._scrollwidget)
|
bui.widget(edit=self._text_field, down_widget=self._scrollwidget)
|
||||||
self._col = bui.columnwidget(
|
self._col = bui.columnwidget(
|
||||||
parent=scrollwidget,
|
parent=scrollwidget,
|
||||||
claims_left_right=True,
|
claims_left_right=True,
|
||||||
claims_tab=True,
|
|
||||||
selection_loops_to_parent=True,
|
selection_loops_to_parent=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -256,7 +254,6 @@ class SoundtrackEditWindow(bui.MainWindow):
|
|||||||
parent=self._col,
|
parent=self._col,
|
||||||
size=(self._width - 40, 40),
|
size=(self._width - 40, 40),
|
||||||
claims_left_right=True,
|
claims_left_right=True,
|
||||||
claims_tab=True,
|
|
||||||
selection_loops_to_parent=True,
|
selection_loops_to_parent=True,
|
||||||
)
|
)
|
||||||
type_name = type_names_translated.get(song_type, song_type)
|
type_name = type_names_translated.get(song_type, song_type)
|
||||||
|
|||||||
@ -65,13 +65,11 @@ class MacMusicAppPlaylistSelectWindow(bui.MainWindow):
|
|||||||
parent=self._root_widget,
|
parent=self._root_widget,
|
||||||
position=(40, v - 340),
|
position=(40, v - 340),
|
||||||
size=(self._width - 80, 400),
|
size=(self._width - 80, 400),
|
||||||
claims_tab=True,
|
|
||||||
selection_loops_to_parent=True,
|
selection_loops_to_parent=True,
|
||||||
)
|
)
|
||||||
bui.widget(edit=self._scrollwidget, right_widget=self._scrollwidget)
|
bui.widget(edit=self._scrollwidget, right_widget=self._scrollwidget)
|
||||||
self._column = bui.columnwidget(
|
self._column = bui.columnwidget(
|
||||||
parent=self._scrollwidget,
|
parent=self._scrollwidget,
|
||||||
claims_tab=True,
|
|
||||||
selection_loops_to_parent=True,
|
selection_loops_to_parent=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@ -349,7 +349,6 @@ class StoreBrowserWindow(bui.MainWindow):
|
|||||||
),
|
),
|
||||||
size=(self._scroll_width, self._scroll_height),
|
size=(self._scroll_width, self._scroll_height),
|
||||||
claims_left_right=True,
|
claims_left_right=True,
|
||||||
claims_tab=True,
|
|
||||||
selection_loops_to_parent=True,
|
selection_loops_to_parent=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -904,7 +903,6 @@ class StoreBrowserWindow(bui.MainWindow):
|
|||||||
size=(self._width, self._height),
|
size=(self._width, self._height),
|
||||||
background=False,
|
background=False,
|
||||||
claims_left_right=True,
|
claims_left_right=True,
|
||||||
claims_tab=True,
|
|
||||||
selection_loops_to_parent=True,
|
selection_loops_to_parent=True,
|
||||||
)
|
)
|
||||||
v = self._height - 20
|
v = self._height - 20
|
||||||
@ -1142,7 +1140,6 @@ class StoreBrowserWindow(bui.MainWindow):
|
|||||||
size=(self._scroll_width, self._scroll_height * 0.95),
|
size=(self._scroll_width, self._scroll_height * 0.95),
|
||||||
background=False,
|
background=False,
|
||||||
claims_left_right=True,
|
claims_left_right=True,
|
||||||
claims_tab=True,
|
|
||||||
selection_loops_to_parent=True,
|
selection_loops_to_parent=True,
|
||||||
)
|
)
|
||||||
self._status_textwidget = bui.textwidget(
|
self._status_textwidget = bui.textwidget(
|
||||||
|
|||||||
@ -57,11 +57,11 @@ auto KeyboardInput::HandleKey(const SDL_Keysym* keysym, bool down) -> bool {
|
|||||||
if (down) {
|
if (down) {
|
||||||
switch (keysym->sym) {
|
switch (keysym->sym) {
|
||||||
case SDLK_TAB:
|
case SDLK_TAB:
|
||||||
if (keysym->mod & KMOD_SHIFT) { // NOLINT (signed bitwise)
|
// if (keysym->mod & KMOD_SHIFT) { // NOLINT (signed bitwise)
|
||||||
c = WidgetMessage::Type::kTabPrev;
|
// c = WidgetMessage::Type::kTabPrev;
|
||||||
} else {
|
// } else {
|
||||||
c = WidgetMessage::Type::kTabNext;
|
// c = WidgetMessage::Type::kTabNext;
|
||||||
}
|
// }
|
||||||
pass = true;
|
pass = true;
|
||||||
break;
|
break;
|
||||||
case SDLK_LEFT:
|
case SDLK_LEFT:
|
||||||
|
|||||||
@ -24,8 +24,8 @@ struct WidgetMessage {
|
|||||||
// In order to work in all-joystick environments,
|
// In order to work in all-joystick environments,
|
||||||
// don't rely on the following to be available (they're just a luxury).
|
// don't rely on the following to be available (they're just a luxury).
|
||||||
kKey,
|
kKey,
|
||||||
kTabNext,
|
// kTabNext,
|
||||||
kTabPrev,
|
// kTabPrev,
|
||||||
kMouseDown,
|
kMouseDown,
|
||||||
kMouseUp,
|
kMouseUp,
|
||||||
kMouseWheel,
|
kMouseWheel,
|
||||||
|
|||||||
@ -308,6 +308,14 @@ static auto PySetRootUIAccountValues(PyObject* self, PyObject* args,
|
|||||||
const char* chest_1_appearance;
|
const char* chest_1_appearance;
|
||||||
const char* chest_2_appearance;
|
const char* chest_2_appearance;
|
||||||
const char* chest_3_appearance;
|
const char* chest_3_appearance;
|
||||||
|
float chest_0_unlock_time;
|
||||||
|
float chest_1_unlock_time;
|
||||||
|
float chest_2_unlock_time;
|
||||||
|
float chest_3_unlock_time;
|
||||||
|
float chest_0_ad_allow_time;
|
||||||
|
float chest_1_ad_allow_time;
|
||||||
|
float chest_2_ad_allow_time;
|
||||||
|
float chest_3_ad_allow_time;
|
||||||
int gold_pass{};
|
int gold_pass{};
|
||||||
|
|
||||||
static const char* kwlist[] = {"tickets_text",
|
static const char* kwlist[] = {"tickets_text",
|
||||||
@ -323,13 +331,24 @@ static auto PySetRootUIAccountValues(PyObject* self, PyObject* args,
|
|||||||
"chest_1_appearance",
|
"chest_1_appearance",
|
||||||
"chest_2_appearance",
|
"chest_2_appearance",
|
||||||
"chest_3_appearance",
|
"chest_3_appearance",
|
||||||
|
"chest_0_unlock_time",
|
||||||
|
"chest_1_unlock_time",
|
||||||
|
"chest_2_unlock_time",
|
||||||
|
"chest_3_unlock_time",
|
||||||
|
"chest_0_ad_allow_time",
|
||||||
|
"chest_1_ad_allow_time",
|
||||||
|
"chest_2_ad_allow_time",
|
||||||
|
"chest_3_ad_allow_time",
|
||||||
nullptr};
|
nullptr};
|
||||||
if (!PyArg_ParseTupleAndKeywords(
|
if (!PyArg_ParseTupleAndKeywords(
|
||||||
args, keywds, "sssssssspssss", const_cast<char**>(kwlist),
|
args, keywds, "sssssssspssssffffffff", const_cast<char**>(kwlist),
|
||||||
&tickets_text, &tokens_text, &league_rank_text, &league_type,
|
&tickets_text, &tokens_text, &league_rank_text, &league_type,
|
||||||
&achievements_percent_text, &level_text, &xp_text, &inbox_count_text,
|
&achievements_percent_text, &level_text, &xp_text, &inbox_count_text,
|
||||||
&gold_pass, &chest_0_appearance, &chest_1_appearance,
|
&gold_pass, &chest_0_appearance, &chest_1_appearance,
|
||||||
&chest_2_appearance, &chest_3_appearance)) {
|
&chest_2_appearance, &chest_3_appearance, &chest_0_unlock_time,
|
||||||
|
&chest_1_unlock_time, &chest_2_unlock_time, &chest_3_unlock_time,
|
||||||
|
&chest_0_ad_allow_time, &chest_1_ad_allow_time,
|
||||||
|
&chest_2_ad_allow_time, &chest_3_ad_allow_time)) {
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
BA_PRECONDITION(g_base->InLogicThread());
|
BA_PRECONDITION(g_base->InLogicThread());
|
||||||
@ -350,6 +369,8 @@ static auto PySetRootUIAccountValues(PyObject* self, PyObject* args,
|
|||||||
appmode->SetRootUIChests(chest_0_appearance, chest_1_appearance,
|
appmode->SetRootUIChests(chest_0_appearance, chest_1_appearance,
|
||||||
chest_2_appearance, chest_3_appearance);
|
chest_2_appearance, chest_3_appearance);
|
||||||
|
|
||||||
|
printf("WOULD SET TIMES TO %.2f %.2f\n", chest_0_unlock_time,
|
||||||
|
chest_0_ad_allow_time);
|
||||||
Py_RETURN_NONE;
|
Py_RETURN_NONE;
|
||||||
BA_PYTHON_CATCH;
|
BA_PYTHON_CATCH;
|
||||||
}
|
}
|
||||||
@ -373,6 +394,14 @@ static PyMethodDef PySetRootUIAccountValuesDef = {
|
|||||||
" chest_1_appearance: str,\n"
|
" chest_1_appearance: str,\n"
|
||||||
" chest_2_appearance: str,\n"
|
" chest_2_appearance: str,\n"
|
||||||
" chest_3_appearance: str,\n"
|
" chest_3_appearance: str,\n"
|
||||||
|
" chest_0_unlock_time: float,\n"
|
||||||
|
" chest_1_unlock_time: float,\n"
|
||||||
|
" chest_2_unlock_time: float,\n"
|
||||||
|
" chest_3_unlock_time: float,\n"
|
||||||
|
" chest_0_ad_allow_time: float,\n"
|
||||||
|
" chest_1_ad_allow_time: float,\n"
|
||||||
|
" chest_2_ad_allow_time: float,\n"
|
||||||
|
" chest_3_ad_allow_time: float,\n"
|
||||||
") -> None\n"
|
") -> None\n"
|
||||||
"\n"
|
"\n"
|
||||||
"(internal)",
|
"(internal)",
|
||||||
|
|||||||
@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int {
|
|||||||
namespace ballistica {
|
namespace ballistica {
|
||||||
|
|
||||||
// These are set automatically via script; don't modify them here.
|
// These are set automatically via script; don't modify them here.
|
||||||
const int kEngineBuildNumber = 22152;
|
const int kEngineBuildNumber = 22155;
|
||||||
const char* kEngineVersion = "1.7.37";
|
const char* kEngineVersion = "1.7.37";
|
||||||
const int kEngineApiVersion = 9;
|
const int kEngineApiVersion = 9;
|
||||||
|
|
||||||
|
|||||||
@ -924,7 +924,6 @@ static auto PyColumnWidget(PyObject* self, PyObject* args, PyObject* keywds)
|
|||||||
PyObject* border_obj{Py_None};
|
PyObject* border_obj{Py_None};
|
||||||
PyObject* margin_obj{Py_None};
|
PyObject* margin_obj{Py_None};
|
||||||
PyObject* claims_left_right_obj{Py_None};
|
PyObject* claims_left_right_obj{Py_None};
|
||||||
PyObject* claims_tab_obj{Py_None};
|
|
||||||
static const char* kwlist[] = {"edit",
|
static const char* kwlist[] = {"edit",
|
||||||
"parent",
|
"parent",
|
||||||
"size",
|
"size",
|
||||||
@ -941,15 +940,14 @@ static auto PyColumnWidget(PyObject* self, PyObject* args, PyObject* keywds)
|
|||||||
"border",
|
"border",
|
||||||
"margin",
|
"margin",
|
||||||
"claims_left_right",
|
"claims_left_right",
|
||||||
"claims_tab",
|
|
||||||
nullptr};
|
nullptr};
|
||||||
if (!PyArg_ParseTupleAndKeywords(
|
if (!PyArg_ParseTupleAndKeywords(
|
||||||
args, keywds, "|OOOOOOOOOOOOOOOOO", const_cast<char**>(kwlist),
|
args, keywds, "|OOOOOOOOOOOOOOOO", const_cast<char**>(kwlist),
|
||||||
&edit_obj, &parent_obj, &size_obj, &pos_obj, &background_obj,
|
&edit_obj, &parent_obj, &size_obj, &pos_obj, &background_obj,
|
||||||
&selected_child_obj, &visible_child_obj, &single_depth_obj,
|
&selected_child_obj, &visible_child_obj, &single_depth_obj,
|
||||||
&print_list_exit_instructions_obj, &left_border_obj, &top_border_obj,
|
&print_list_exit_instructions_obj, &left_border_obj, &top_border_obj,
|
||||||
&bottom_border_obj, &selection_loops_to_parent_obj, &border_obj,
|
&bottom_border_obj, &selection_loops_to_parent_obj, &border_obj,
|
||||||
&margin_obj, &claims_left_right_obj, &claims_tab_obj))
|
&margin_obj, &claims_left_right_obj))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
if (!g_base->CurrentContext().IsEmpty()) {
|
if (!g_base->CurrentContext().IsEmpty()) {
|
||||||
@ -1034,9 +1032,6 @@ static auto PyColumnWidget(PyObject* self, PyObject* args, PyObject* keywds)
|
|||||||
if (claims_left_right_obj != Py_None) {
|
if (claims_left_right_obj != Py_None) {
|
||||||
widget->set_claims_left_right(Python::GetPyBool(claims_left_right_obj));
|
widget->set_claims_left_right(Python::GetPyBool(claims_left_right_obj));
|
||||||
}
|
}
|
||||||
if (claims_tab_obj != Py_None) {
|
|
||||||
widget->set_claims_tab(Python::GetPyBool(claims_tab_obj));
|
|
||||||
}
|
|
||||||
|
|
||||||
// If making a new widget, add it at the end.
|
// If making a new widget, add it at the end.
|
||||||
if (edit_obj == Py_None) {
|
if (edit_obj == Py_None) {
|
||||||
@ -1072,8 +1067,7 @@ static PyMethodDef PyColumnWidgetDef = {
|
|||||||
" selection_loops_to_parent: bool | None = None,\n"
|
" selection_loops_to_parent: bool | None = None,\n"
|
||||||
" border: float | None = None,\n"
|
" border: float | None = None,\n"
|
||||||
" margin: float | None = None,\n"
|
" margin: float | None = None,\n"
|
||||||
" claims_left_right: bool | None = None,\n"
|
" claims_left_right: bool | None = None) -> bauiv1.Widget\n"
|
||||||
" claims_tab: bool | None = None) -> bauiv1.Widget\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
"Create or edit a column widget.\n"
|
"Create or edit a column widget.\n"
|
||||||
"\n"
|
"\n"
|
||||||
@ -1100,7 +1094,6 @@ static auto PyContainerWidget(PyObject* self, PyObject* args, PyObject* keywds)
|
|||||||
PyObject* on_activate_call_obj{Py_None};
|
PyObject* on_activate_call_obj{Py_None};
|
||||||
PyObject* claims_left_right_obj{Py_None};
|
PyObject* claims_left_right_obj{Py_None};
|
||||||
PyObject* claims_up_down_obj{Py_None};
|
PyObject* claims_up_down_obj{Py_None};
|
||||||
PyObject* claims_tab_obj{Py_None};
|
|
||||||
PyObject* selection_loops_obj{Py_None};
|
PyObject* selection_loops_obj{Py_None};
|
||||||
PyObject* selection_loops_to_parent_obj{Py_None};
|
PyObject* selection_loops_to_parent_obj{Py_None};
|
||||||
PyObject* scale_obj{Py_None};
|
PyObject* scale_obj{Py_None};
|
||||||
@ -1136,7 +1129,6 @@ static auto PyContainerWidget(PyObject* self, PyObject* args, PyObject* keywds)
|
|||||||
"root_selectable",
|
"root_selectable",
|
||||||
"on_activate_call",
|
"on_activate_call",
|
||||||
"claims_left_right",
|
"claims_left_right",
|
||||||
"claims_tab",
|
|
||||||
"selection_loops",
|
"selection_loops",
|
||||||
"selection_loops_to_parent",
|
"selection_loops_to_parent",
|
||||||
"scale",
|
"scale",
|
||||||
@ -1158,16 +1150,16 @@ static auto PyContainerWidget(PyObject* self, PyObject* args, PyObject* keywds)
|
|||||||
nullptr};
|
nullptr};
|
||||||
|
|
||||||
if (!PyArg_ParseTupleAndKeywords(
|
if (!PyArg_ParseTupleAndKeywords(
|
||||||
args, keywds, "|OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
|
args, keywds, "|OOOOOOOOOOOOOOOOOOOOOOOOOOOOOOO",
|
||||||
const_cast<char**>(kwlist), &edit_obj, &parent_obj, &id_obj,
|
const_cast<char**>(kwlist), &edit_obj, &parent_obj, &id_obj,
|
||||||
&size_obj, &pos_obj, &background_obj, &selected_child_obj,
|
&size_obj, &pos_obj, &background_obj, &selected_child_obj,
|
||||||
&transition_obj, &cancel_button_obj, &start_button_obj,
|
&transition_obj, &cancel_button_obj, &start_button_obj,
|
||||||
&root_selectable_obj, &on_activate_call_obj, &claims_left_right_obj,
|
&root_selectable_obj, &on_activate_call_obj, &claims_left_right_obj,
|
||||||
&claims_tab_obj, &selection_loops_obj, &selection_loops_to_parent_obj,
|
&selection_loops_obj, &selection_loops_to_parent_obj, &scale_obj,
|
||||||
&scale_obj, &on_outside_click_call_obj, &single_depth_obj,
|
&on_outside_click_call_obj, &single_depth_obj, &visible_child_obj,
|
||||||
&visible_child_obj, &stack_offset_obj, &color_obj,
|
&stack_offset_obj, &color_obj, &on_cancel_call_obj,
|
||||||
&on_cancel_call_obj, &print_list_exit_instructions_obj,
|
&print_list_exit_instructions_obj, &click_activate_obj,
|
||||||
&click_activate_obj, &always_highlight_obj, &selectable_obj,
|
&always_highlight_obj, &selectable_obj,
|
||||||
&scale_origin_stack_offset_obj, &toolbar_visibility_obj,
|
&scale_origin_stack_offset_obj, &toolbar_visibility_obj,
|
||||||
&on_select_call_obj, &claim_outside_clicks_obj,
|
&on_select_call_obj, &claim_outside_clicks_obj,
|
||||||
&claims_up_down_obj)) {
|
&claims_up_down_obj)) {
|
||||||
@ -1325,9 +1317,6 @@ static auto PyContainerWidget(PyObject* self, PyObject* args, PyObject* keywds)
|
|||||||
if (claims_up_down_obj != Py_None) {
|
if (claims_up_down_obj != Py_None) {
|
||||||
widget->set_claims_up_down(Python::GetPyBool(claims_up_down_obj));
|
widget->set_claims_up_down(Python::GetPyBool(claims_up_down_obj));
|
||||||
}
|
}
|
||||||
if (claims_tab_obj != Py_None) {
|
|
||||||
widget->set_claims_tab(Python::GetPyBool(claims_tab_obj));
|
|
||||||
}
|
|
||||||
if (selection_loops_obj != Py_None) {
|
if (selection_loops_obj != Py_None) {
|
||||||
widget->set_selection_loops(Python::GetPyBool(selection_loops_obj));
|
widget->set_selection_loops(Python::GetPyBool(selection_loops_obj));
|
||||||
}
|
}
|
||||||
@ -1410,7 +1399,6 @@ static PyMethodDef PyContainerWidgetDef = {
|
|||||||
" root_selectable: bool | None = None,\n"
|
" root_selectable: bool | None = None,\n"
|
||||||
" on_activate_call: Callable[[], None] | None = None,\n"
|
" on_activate_call: Callable[[], None] | None = None,\n"
|
||||||
" claims_left_right: bool | None = None,\n"
|
" claims_left_right: bool | None = None,\n"
|
||||||
" claims_tab: bool | None = None,\n"
|
|
||||||
" selection_loops: bool | None = None,\n"
|
" selection_loops: bool | None = None,\n"
|
||||||
" selection_loops_to_parent: bool | None = None,\n"
|
" selection_loops_to_parent: bool | None = None,\n"
|
||||||
" scale: float | None = None,\n"
|
" scale: float | None = None,\n"
|
||||||
@ -1465,21 +1453,24 @@ static auto PyRowWidget(PyObject* self, PyObject* args, PyObject* keywds)
|
|||||||
PyObject* edit_obj{Py_None};
|
PyObject* edit_obj{Py_None};
|
||||||
ContainerWidget* parent_widget{};
|
ContainerWidget* parent_widget{};
|
||||||
PyObject* claims_left_right_obj{Py_None};
|
PyObject* claims_left_right_obj{Py_None};
|
||||||
PyObject* claims_tab_obj{Py_None};
|
|
||||||
PyObject* selection_loops_to_parent_obj{Py_None};
|
PyObject* selection_loops_to_parent_obj{Py_None};
|
||||||
|
|
||||||
static const char* kwlist[] = {"edit", "parent",
|
static const char* kwlist[] = {"edit",
|
||||||
"size", "position",
|
"parent",
|
||||||
"background", "selected_child",
|
"size",
|
||||||
"visible_child", "claims_left_right",
|
"position",
|
||||||
"claims_tab", "selection_loops_to_parent",
|
"background",
|
||||||
|
"selected_child",
|
||||||
|
"visible_child",
|
||||||
|
"claims_left_right",
|
||||||
|
"selection_loops_to_parent",
|
||||||
nullptr};
|
nullptr};
|
||||||
|
|
||||||
if (!PyArg_ParseTupleAndKeywords(
|
if (!PyArg_ParseTupleAndKeywords(
|
||||||
args, keywds, "|OOOOOOOOOO", const_cast<char**>(kwlist), &edit_obj,
|
args, keywds, "|OOOOOOOOO", const_cast<char**>(kwlist), &edit_obj,
|
||||||
&parent_obj, &size_obj, &pos_obj, &background_obj,
|
&parent_obj, &size_obj, &pos_obj, &background_obj,
|
||||||
&selected_child_obj, &visible_child_obj, &claims_left_right_obj,
|
&selected_child_obj, &visible_child_obj, &claims_left_right_obj,
|
||||||
&claims_tab_obj, &selection_loops_to_parent_obj))
|
&selection_loops_to_parent_obj))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
if (!g_base->CurrentContext().IsEmpty()) {
|
if (!g_base->CurrentContext().IsEmpty()) {
|
||||||
@ -1533,9 +1524,6 @@ static auto PyRowWidget(PyObject* self, PyObject* args, PyObject* keywds)
|
|||||||
if (claims_left_right_obj != Py_None) {
|
if (claims_left_right_obj != Py_None) {
|
||||||
widget->set_claims_left_right(Python::GetPyBool(claims_left_right_obj));
|
widget->set_claims_left_right(Python::GetPyBool(claims_left_right_obj));
|
||||||
}
|
}
|
||||||
if (claims_tab_obj != Py_None) {
|
|
||||||
widget->set_claims_tab(Python::GetPyBool(claims_tab_obj));
|
|
||||||
}
|
|
||||||
if (selection_loops_to_parent_obj != Py_None) {
|
if (selection_loops_to_parent_obj != Py_None) {
|
||||||
widget->set_selection_loops_to_parent(
|
widget->set_selection_loops_to_parent(
|
||||||
Python::GetPyBool(selection_loops_to_parent_obj));
|
Python::GetPyBool(selection_loops_to_parent_obj));
|
||||||
@ -1567,7 +1555,6 @@ static PyMethodDef PyRowWidgetDef = {
|
|||||||
" selected_child: bauiv1.Widget | None = None,\n"
|
" selected_child: bauiv1.Widget | None = None,\n"
|
||||||
" visible_child: bauiv1.Widget | None = None,\n"
|
" visible_child: bauiv1.Widget | None = None,\n"
|
||||||
" claims_left_right: bool | None = None,\n"
|
" claims_left_right: bool | None = None,\n"
|
||||||
" claims_tab: bool | None = None,\n"
|
|
||||||
" selection_loops_to_parent: bool | None = None) -> bauiv1.Widget\n"
|
" selection_loops_to_parent: bool | None = None) -> bauiv1.Widget\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Create or edit a row widget.\n"
|
"Create or edit a row widget.\n"
|
||||||
@ -1601,7 +1588,6 @@ static auto PyScrollWidget(PyObject* self, PyObject* args, PyObject* keywds)
|
|||||||
PyObject* selection_loops_to_parent_obj{Py_None};
|
PyObject* selection_loops_to_parent_obj{Py_None};
|
||||||
PyObject* claims_left_right_obj{Py_None};
|
PyObject* claims_left_right_obj{Py_None};
|
||||||
PyObject* claims_up_down_obj{Py_None};
|
PyObject* claims_up_down_obj{Py_None};
|
||||||
PyObject* claims_tab_obj{Py_None};
|
|
||||||
PyObject* autoselect_obj{Py_None};
|
PyObject* autoselect_obj{Py_None};
|
||||||
|
|
||||||
static const char* kwlist[] = {"edit",
|
static const char* kwlist[] = {"edit",
|
||||||
@ -1620,18 +1606,17 @@ static auto PyScrollWidget(PyObject* self, PyObject* args, PyObject* keywds)
|
|||||||
"selection_loops_to_parent",
|
"selection_loops_to_parent",
|
||||||
"claims_left_right",
|
"claims_left_right",
|
||||||
"claims_up_down",
|
"claims_up_down",
|
||||||
"claims_tab",
|
|
||||||
"autoselect",
|
"autoselect",
|
||||||
nullptr};
|
nullptr};
|
||||||
|
|
||||||
if (!PyArg_ParseTupleAndKeywords(
|
if (!PyArg_ParseTupleAndKeywords(
|
||||||
args, keywds, "|OOOOOOOOOOOOOOOOOO", const_cast<char**>(kwlist),
|
args, keywds, "|OOOOOOOOOOOOOOOOO", const_cast<char**>(kwlist),
|
||||||
&edit_obj, &parent_obj, &size_obj, &pos_obj, &background_obj,
|
&edit_obj, &parent_obj, &size_obj, &pos_obj, &background_obj,
|
||||||
&selected_child_obj, &capture_arrows_obj, &on_select_call_obj,
|
&selected_child_obj, &capture_arrows_obj, &on_select_call_obj,
|
||||||
¢er_small_content_obj, &color_obj, &highlight_obj,
|
¢er_small_content_obj, &color_obj, &highlight_obj,
|
||||||
&border_opacity_obj, &simple_culling_v_obj,
|
&border_opacity_obj, &simple_culling_v_obj,
|
||||||
&selection_loops_to_parent_obj, &claims_left_right_obj,
|
&selection_loops_to_parent_obj, &claims_left_right_obj,
|
||||||
&claims_up_down_obj, &claims_tab_obj, &autoselect_obj))
|
&claims_up_down_obj, &autoselect_obj))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
if (!g_base->CurrentContext().IsEmpty()) {
|
if (!g_base->CurrentContext().IsEmpty()) {
|
||||||
@ -1714,9 +1699,6 @@ static auto PyScrollWidget(PyObject* self, PyObject* args, PyObject* keywds)
|
|||||||
if (claims_up_down_obj != Py_None) {
|
if (claims_up_down_obj != Py_None) {
|
||||||
widget->set_claims_up_down(Python::GetPyBool(claims_up_down_obj));
|
widget->set_claims_up_down(Python::GetPyBool(claims_up_down_obj));
|
||||||
}
|
}
|
||||||
if (claims_tab_obj != Py_None) {
|
|
||||||
widget->set_claims_tab(Python::GetPyBool(claims_tab_obj));
|
|
||||||
}
|
|
||||||
if (autoselect_obj != Py_None) {
|
if (autoselect_obj != Py_None) {
|
||||||
widget->set_auto_select(Python::GetPyBool(autoselect_obj));
|
widget->set_auto_select(Python::GetPyBool(autoselect_obj));
|
||||||
}
|
}
|
||||||
@ -1756,7 +1738,6 @@ static PyMethodDef PyScrollWidgetDef = {
|
|||||||
" selection_loops_to_parent: bool | None = None,\n"
|
" selection_loops_to_parent: bool | None = None,\n"
|
||||||
" claims_left_right: bool | None = None,\n"
|
" claims_left_right: bool | None = None,\n"
|
||||||
" claims_up_down: bool | None = None,\n"
|
" claims_up_down: bool | None = None,\n"
|
||||||
" claims_tab: bool | None = None,\n"
|
|
||||||
" autoselect: bool | None = None) -> bauiv1.Widget\n"
|
" autoselect: bool | None = None) -> bauiv1.Widget\n"
|
||||||
"\n"
|
"\n"
|
||||||
"Create or edit a scroll widget.\n"
|
"Create or edit a scroll widget.\n"
|
||||||
@ -1790,7 +1771,6 @@ static auto PyHScrollWidget(PyObject* self, PyObject* args, PyObject* keywds)
|
|||||||
PyObject* simple_culling_h_obj{Py_None};
|
PyObject* simple_culling_h_obj{Py_None};
|
||||||
PyObject* claims_left_right_obj{Py_None};
|
PyObject* claims_left_right_obj{Py_None};
|
||||||
PyObject* claims_up_down_obj{Py_None};
|
PyObject* claims_up_down_obj{Py_None};
|
||||||
PyObject* claims_tab_obj{Py_None};
|
|
||||||
PyObject* autoselect_obj{Py_None};
|
PyObject* autoselect_obj{Py_None};
|
||||||
|
|
||||||
static const char* kwlist[] = {"edit",
|
static const char* kwlist[] = {"edit",
|
||||||
@ -1808,17 +1788,16 @@ static auto PyHScrollWidget(PyObject* self, PyObject* args, PyObject* keywds)
|
|||||||
"simple_culling_h",
|
"simple_culling_h",
|
||||||
"claims_left_right",
|
"claims_left_right",
|
||||||
"claims_up_down",
|
"claims_up_down",
|
||||||
"claims_tab",
|
|
||||||
"autoselect",
|
"autoselect",
|
||||||
nullptr};
|
nullptr};
|
||||||
|
|
||||||
if (!PyArg_ParseTupleAndKeywords(
|
if (!PyArg_ParseTupleAndKeywords(
|
||||||
args, keywds, "|OOOOOOOOOOOOOOOO", const_cast<char**>(kwlist),
|
args, keywds, "|OOOOOOOOOOOOOOO", const_cast<char**>(kwlist),
|
||||||
&edit_obj, &parent_obj, &size_obj, &pos_obj, &background_obj,
|
&edit_obj, &parent_obj, &size_obj, &pos_obj, &background_obj,
|
||||||
&selected_child_obj, &capture_arrows_obj, &on_select_call_obj,
|
&selected_child_obj, &capture_arrows_obj, &on_select_call_obj,
|
||||||
¢er_small_content_obj, &color_obj, &highlight_obj,
|
¢er_small_content_obj, &color_obj, &highlight_obj,
|
||||||
&border_opacity_obj, &simple_culling_h_obj, &claims_left_right_obj,
|
&border_opacity_obj, &simple_culling_h_obj, &claims_left_right_obj,
|
||||||
&claims_up_down_obj, &claims_tab_obj, &autoselect_obj))
|
&claims_up_down_obj, &autoselect_obj))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
if (!g_base->CurrentContext().IsEmpty()) {
|
if (!g_base->CurrentContext().IsEmpty()) {
|
||||||
@ -1896,9 +1875,6 @@ static auto PyHScrollWidget(PyObject* self, PyObject* args, PyObject* keywds)
|
|||||||
if (claims_up_down_obj != Py_None) {
|
if (claims_up_down_obj != Py_None) {
|
||||||
widget->set_claims_up_down(Python::GetPyBool(claims_up_down_obj));
|
widget->set_claims_up_down(Python::GetPyBool(claims_up_down_obj));
|
||||||
}
|
}
|
||||||
if (claims_tab_obj != Py_None) {
|
|
||||||
widget->set_claims_tab(Python::GetPyBool(claims_tab_obj));
|
|
||||||
}
|
|
||||||
if (autoselect_obj != Py_None) {
|
if (autoselect_obj != Py_None) {
|
||||||
widget->set_auto_select(Python::GetPyBool(autoselect_obj));
|
widget->set_auto_select(Python::GetPyBool(autoselect_obj));
|
||||||
}
|
}
|
||||||
@ -1936,8 +1912,7 @@ static PyMethodDef PyHScrollWidgetDef = {
|
|||||||
" border_opacity: float | None = None,\n"
|
" border_opacity: float | None = None,\n"
|
||||||
" simple_culling_h: float | None = None,\n"
|
" simple_culling_h: float | None = None,\n"
|
||||||
" claims_left_right: bool | None = None,\n"
|
" claims_left_right: bool | None = None,\n"
|
||||||
" claims_up_down: bool | None = None,\n"
|
" claims_up_down: bool | None = None) -> bauiv1.Widget\n"
|
||||||
" claims_tab: bool | None = None) -> bauiv1.Widget\n"
|
|
||||||
"\n"
|
"\n"
|
||||||
"Create or edit a horizontal scroll widget.\n"
|
"Create or edit a horizontal scroll widget.\n"
|
||||||
"\n"
|
"\n"
|
||||||
|
|||||||
@ -7,7 +7,6 @@ namespace ballistica::ui_v1 {
|
|||||||
ColumnWidget::ColumnWidget() {
|
ColumnWidget::ColumnWidget() {
|
||||||
set_background(false); // Influences default event handling; ew.
|
set_background(false); // Influences default event handling; ew.
|
||||||
set_claims_left_right(false);
|
set_claims_left_right(false);
|
||||||
set_claims_tab(false);
|
|
||||||
set_draggable(false);
|
set_draggable(false);
|
||||||
set_selection_loops(false);
|
set_selection_loops(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -368,12 +368,9 @@ auto ContainerWidget::HandleMessage(const base::WidgetMessage& m) -> bool {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case base::WidgetMessage::Type::kTabNext:
|
// case base::WidgetMessage::Type::kTabNext:
|
||||||
case base::WidgetMessage::Type::kMoveRight:
|
case base::WidgetMessage::Type::kMoveRight:
|
||||||
case base::WidgetMessage::Type::kMoveDown: {
|
case base::WidgetMessage::Type::kMoveDown: {
|
||||||
if (m.type == base::WidgetMessage::Type::kTabNext && !claims_tab_) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (m.type == base::WidgetMessage::Type::kMoveRight
|
if (m.type == base::WidgetMessage::Type::kMoveRight
|
||||||
&& !claims_left_right_) {
|
&& !claims_left_right_) {
|
||||||
break;
|
break;
|
||||||
@ -404,12 +401,9 @@ auto ContainerWidget::HandleMessage(const base::WidgetMessage& m) -> bool {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
case base::WidgetMessage::Type::kTabPrev:
|
// case base::WidgetMessage::Type::kTabPrev:
|
||||||
case base::WidgetMessage::Type::kMoveLeft:
|
case base::WidgetMessage::Type::kMoveLeft:
|
||||||
case base::WidgetMessage::Type::kMoveUp: {
|
case base::WidgetMessage::Type::kMoveUp: {
|
||||||
if (m.type == base::WidgetMessage::Type::kTabPrev && !claims_tab_) {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if (m.type == base::WidgetMessage::Type::kMoveLeft
|
if (m.type == base::WidgetMessage::Type::kMoveLeft
|
||||||
&& !claims_left_right_) {
|
&& !claims_left_right_) {
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -127,8 +127,8 @@ class ContainerWidget : public Widget {
|
|||||||
|
|
||||||
void set_draggable(bool d) { draggable_ = d; }
|
void set_draggable(bool d) { draggable_ = d; }
|
||||||
|
|
||||||
auto claims_tab() const -> bool { return claims_tab_; }
|
// auto claims_tab() const -> bool { return claims_tab_; }
|
||||||
void set_claims_tab(bool c) { claims_tab_ = c; }
|
// void set_claims_tab(bool c) { claims_tab_ = c; }
|
||||||
|
|
||||||
auto claims_left_right() const -> bool { return claims_left_right_; }
|
auto claims_left_right() const -> bool { return claims_left_right_; }
|
||||||
void set_claims_left_right(bool c) { claims_left_right_ = c; }
|
void set_claims_left_right(bool c) { claims_left_right_ = c; }
|
||||||
|
|||||||
@ -19,7 +19,6 @@ HScrollWidget::HScrollWidget()
|
|||||||
: touch_mode_(!g_core->platform->IsRunningOnDesktop()) {
|
: touch_mode_(!g_core->platform->IsRunningOnDesktop()) {
|
||||||
set_draggable(false);
|
set_draggable(false);
|
||||||
set_claims_left_right(false);
|
set_claims_left_right(false);
|
||||||
set_claims_tab(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
HScrollWidget::~HScrollWidget() = default;
|
HScrollWidget::~HScrollWidget() = default;
|
||||||
|
|||||||
@ -730,7 +730,6 @@ void RootWidget::Setup() {
|
|||||||
b.h_align = 0.0f;
|
b.h_align = 0.0f;
|
||||||
b.v_align = VAlign_::kBottom;
|
b.v_align = VAlign_::kBottom;
|
||||||
b.width = b.height = 60.0f;
|
b.width = b.height = 60.0f;
|
||||||
// b.x = bx;
|
|
||||||
b.y = b.height * 0.5f + 2.0f;
|
b.y = b.height * 0.5f + 2.0f;
|
||||||
b.color_r = kBotLeftColorR;
|
b.color_r = kBotLeftColorR;
|
||||||
b.color_g = kBotLeftColorG;
|
b.color_g = kBotLeftColorG;
|
||||||
@ -741,7 +740,6 @@ void RootWidget::Setup() {
|
|||||||
| static_cast<uint32_t>(Widget::ToolbarVisibility::kMenuFullNoBack)
|
| static_cast<uint32_t>(Widget::ToolbarVisibility::kMenuFullNoBack)
|
||||||
| static_cast<uint32_t>(Widget::ToolbarVisibility::kMenuFullRoot));
|
| static_cast<uint32_t>(Widget::ToolbarVisibility::kMenuFullRoot));
|
||||||
AddButton_(b);
|
AddButton_(b);
|
||||||
// bx += 70.0f;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Settings button.
|
// Settings button.
|
||||||
@ -750,7 +748,6 @@ void RootWidget::Setup() {
|
|||||||
b.h_align = 0.0f;
|
b.h_align = 0.0f;
|
||||||
b.v_align = VAlign_::kBottom;
|
b.v_align = VAlign_::kBottom;
|
||||||
b.width = b.height = 60.0f;
|
b.width = b.height = 60.0f;
|
||||||
// b.x = bx;
|
|
||||||
b.y = b.height * 0.58f - 2.0f;
|
b.y = b.height * 0.58f - 2.0f;
|
||||||
b.color_r = kBotLeftColorR;
|
b.color_r = kBotLeftColorR;
|
||||||
b.color_g = kBotLeftColorG;
|
b.color_g = kBotLeftColorG;
|
||||||
@ -767,22 +764,8 @@ void RootWidget::Setup() {
|
|||||||
bottom_left_buttons_.push_back(settings_button_);
|
bottom_left_buttons_.push_back(settings_button_);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Chests.
|
// Chest slots.
|
||||||
{
|
{
|
||||||
float backing_r = 0.43f;
|
|
||||||
float backing_g = 0.40f;
|
|
||||||
float backing_b = 0.53f;
|
|
||||||
float backing_cover_r = backing_r;
|
|
||||||
float backing_cover_g = backing_g;
|
|
||||||
float backing_cover_b = backing_b;
|
|
||||||
float backing_a = 1.0f;
|
|
||||||
backing_r *= 1.1f;
|
|
||||||
backing_g *= 1.1f;
|
|
||||||
backing_b *= 1.1f;
|
|
||||||
backing_cover_r *= 1.1f;
|
|
||||||
backing_cover_g *= 1.1f;
|
|
||||||
backing_cover_b *= 1.1f;
|
|
||||||
|
|
||||||
// Bar backing.
|
// Bar backing.
|
||||||
{
|
{
|
||||||
ButtonDef_ bd;
|
ButtonDef_ bd;
|
||||||
@ -795,10 +778,10 @@ void RootWidget::Setup() {
|
|||||||
bd.img = "uiAtlas2";
|
bd.img = "uiAtlas2";
|
||||||
bd.mesh_transparent = "toolbarBackingBottom2";
|
bd.mesh_transparent = "toolbarBackingBottom2";
|
||||||
bd.selectable = false;
|
bd.selectable = false;
|
||||||
bd.color_r = backing_r;
|
bd.color_r = 0.473f;
|
||||||
bd.color_g = backing_g;
|
bd.color_g = 0.44f;
|
||||||
bd.color_b = backing_b;
|
bd.color_b = 0.583f;
|
||||||
bd.opacity = backing_a;
|
bd.opacity = 1.0f;
|
||||||
|
|
||||||
bd.depth_min = 0.2f;
|
bd.depth_min = 0.2f;
|
||||||
bd.call = UIV1Python::ObjID::kEmptyCall;
|
bd.call = UIV1Python::ObjID::kEmptyCall;
|
||||||
@ -810,6 +793,7 @@ void RootWidget::Setup() {
|
|||||||
chest_backing_ = AddButton_(bd);
|
chest_backing_ = AddButton_(bd);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Chest/Slot buttons.
|
||||||
ButtonDef_ b;
|
ButtonDef_ b;
|
||||||
b.h_align = 0.5f;
|
b.h_align = 0.5f;
|
||||||
b.v_align = VAlign_::kBottom;
|
b.v_align = VAlign_::kBottom;
|
||||||
@ -824,9 +808,6 @@ void RootWidget::Setup() {
|
|||||||
b.y = 44.0f;
|
b.y = 44.0f;
|
||||||
b.img = "chestIconEmpty";
|
b.img = "chestIconEmpty";
|
||||||
b.width = b.height = 80.0f;
|
b.width = b.height = 80.0f;
|
||||||
b.color_r = backing_cover_r;
|
|
||||||
b.color_g = backing_cover_g;
|
|
||||||
b.color_b = backing_cover_b;
|
|
||||||
b.opacity = 1.0f;
|
b.opacity = 1.0f;
|
||||||
|
|
||||||
b.call = UIV1Python::ObjID::kRootUIChestSlot0PressCall;
|
b.call = UIV1Python::ObjID::kRootUIChestSlot0PressCall;
|
||||||
@ -844,6 +825,57 @@ void RootWidget::Setup() {
|
|||||||
b.x = 1.5f * spacing;
|
b.x = 1.5f * spacing;
|
||||||
b.call = UIV1Python::ObjID::kRootUIChestSlot3PressCall;
|
b.call = UIV1Python::ObjID::kRootUIChestSlot3PressCall;
|
||||||
chest_3_button_ = AddButton_(b);
|
chest_3_button_ = AddButton_(b);
|
||||||
|
|
||||||
|
// Lock icons.
|
||||||
|
{
|
||||||
|
ImageDef_ imgd;
|
||||||
|
imgd.x = -45.0f;
|
||||||
|
imgd.y = -23.0f;
|
||||||
|
imgd.width = 32.0f;
|
||||||
|
imgd.height = 32.0f;
|
||||||
|
imgd.img = "lock";
|
||||||
|
imgd.depth_min = 0.3f;
|
||||||
|
|
||||||
|
imgd.button = chest_0_button_;
|
||||||
|
chest_0_lock_icon_ = AddImage_(imgd);
|
||||||
|
|
||||||
|
imgd.button = chest_1_button_;
|
||||||
|
chest_1_lock_icon_ = AddImage_(imgd);
|
||||||
|
|
||||||
|
imgd.button = chest_2_button_;
|
||||||
|
chest_2_lock_icon_ = AddImage_(imgd);
|
||||||
|
|
||||||
|
imgd.button = chest_3_button_;
|
||||||
|
chest_3_lock_icon_ = AddImage_(imgd);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Lock times.
|
||||||
|
{
|
||||||
|
TextDef_ td;
|
||||||
|
// td.width = 0.0f;
|
||||||
|
td.text = "3h 2m";
|
||||||
|
td.x = 0.0f;
|
||||||
|
td.y = 55.0f;
|
||||||
|
td.scale = 0.7f;
|
||||||
|
td.flatness = 1.0f;
|
||||||
|
td.shadow = 1.0f;
|
||||||
|
td.depth_min = 0.3f;
|
||||||
|
td.color_r = 0.6f;
|
||||||
|
td.color_g = 1.0f;
|
||||||
|
td.color_b = 0.6f;
|
||||||
|
|
||||||
|
td.button = chest_0_button_;
|
||||||
|
chest_0_time_text_ = AddText_(td);
|
||||||
|
|
||||||
|
td.button = chest_1_button_;
|
||||||
|
chest_1_time_text_ = AddText_(td);
|
||||||
|
|
||||||
|
td.button = chest_2_button_;
|
||||||
|
chest_2_time_text_ = AddText_(td);
|
||||||
|
|
||||||
|
td.button = chest_3_button_;
|
||||||
|
chest_3_time_text_ = AddText_(td);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Inventory button.
|
// Inventory button.
|
||||||
@ -873,7 +905,6 @@ void RootWidget::Setup() {
|
|||||||
b.h_align = 1.0f;
|
b.h_align = 1.0f;
|
||||||
b.v_align = VAlign_::kBottom;
|
b.v_align = VAlign_::kBottom;
|
||||||
b.width = b.height = 85.0f;
|
b.width = b.height = 85.0f;
|
||||||
// b.x = -206.0f;
|
|
||||||
b.y = b.height * 0.5f;
|
b.y = b.height * 0.5f;
|
||||||
b.img = "storeIcon";
|
b.img = "storeIcon";
|
||||||
b.call = UIV1Python::ObjID::kRootUIStoreButtonPressCall;
|
b.call = UIV1Python::ObjID::kRootUIStoreButtonPressCall;
|
||||||
@ -1526,42 +1557,66 @@ void RootWidget::SetChests(const std::string& chest_0_appearance,
|
|||||||
const std::string& chest_1_appearance,
|
const std::string& chest_1_appearance,
|
||||||
const std::string& chest_2_appearance,
|
const std::string& chest_2_appearance,
|
||||||
const std::string& chest_3_appearance) {
|
const std::string& chest_3_appearance) {
|
||||||
std::vector<std::pair<const std::string&, Button_*>> pairs = {
|
chest_0_appearance_ = chest_0_appearance;
|
||||||
{chest_0_appearance, chest_0_button_},
|
chest_1_appearance_ = chest_1_appearance;
|
||||||
{chest_1_appearance, chest_1_button_},
|
chest_2_appearance_ = chest_2_appearance;
|
||||||
{chest_2_appearance, chest_2_button_},
|
chest_3_appearance_ = chest_3_appearance;
|
||||||
{chest_3_appearance, chest_3_button_},
|
UpdateChests_();
|
||||||
};
|
}
|
||||||
|
|
||||||
|
void RootWidget::UpdateChests_() {
|
||||||
|
std::vector<std::tuple<const std::string&, Button_*, Image_*, Text_*>> slots =
|
||||||
|
// NOLINTNEXTLINE (clang-format's formatting here upsets cpplint).
|
||||||
|
{
|
||||||
|
{chest_0_appearance_, chest_0_button_, chest_0_lock_icon_,
|
||||||
|
chest_0_time_text_},
|
||||||
|
{chest_1_appearance_, chest_1_button_, chest_1_lock_icon_,
|
||||||
|
chest_1_time_text_},
|
||||||
|
{chest_2_appearance_, chest_2_button_, chest_2_lock_icon_,
|
||||||
|
chest_2_time_text_},
|
||||||
|
{chest_3_appearance_, chest_3_button_, chest_3_lock_icon_,
|
||||||
|
chest_3_time_text_},
|
||||||
|
};
|
||||||
|
|
||||||
|
// We drop the backing/slots down a bit if we have no chests.
|
||||||
auto have_chests{false};
|
auto have_chests{false};
|
||||||
for (const auto& [appearance, b] : pairs) {
|
for (const auto& [appearance, b, l, t] : slots) {
|
||||||
if (appearance != "") {
|
if (appearance != "") {
|
||||||
have_chests = true;
|
have_chests = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (const auto& [appearance, b] : pairs) {
|
for (const auto& [appearance, b, l, t] : slots) {
|
||||||
assert(b);
|
assert(b);
|
||||||
|
assert(l);
|
||||||
|
Object::Ref<base::TextureAsset> tex;
|
||||||
if (appearance == "") {
|
if (appearance == "") {
|
||||||
|
// Empty slot.
|
||||||
b->widget->set_color(0.473f, 0.44f, 0.583f);
|
b->widget->set_color(0.473f, 0.44f, 0.583f);
|
||||||
b->width = b->height = 80.0f;
|
b->width = b->height = 80.0f;
|
||||||
b->y = have_chests ? 44.0f : -2.0f;
|
b->y = have_chests ? 44.0f : -2.0f;
|
||||||
{
|
{
|
||||||
base::Assets::AssetListLock lock;
|
base::Assets::AssetListLock lock;
|
||||||
b->widget->SetTexture(
|
tex = g_base->assets->GetTexture("chestIconEmpty");
|
||||||
g_base->assets->GetTexture("chestIconEmpty").get());
|
|
||||||
}
|
}
|
||||||
|
l->visible = false;
|
||||||
|
t->visible = false;
|
||||||
} else {
|
} else {
|
||||||
|
// Chest in slot.
|
||||||
have_chests = true;
|
have_chests = true;
|
||||||
b->widget->set_color(1.0f, 1.0f, 1.0f);
|
b->widget->set_color(1.0f, 1.0f, 1.0f);
|
||||||
b->width = b->height = 110.0f;
|
b->width = b->height = 110.0f;
|
||||||
b->y = 44.0f;
|
b->y = 44.0f;
|
||||||
{
|
{
|
||||||
base::Assets::AssetListLock lock;
|
base::Assets::AssetListLock lock;
|
||||||
b->widget->SetTexture(g_base->assets->GetTexture("chestIcon").get());
|
tex = g_base->assets->GetTexture("chestIcon");
|
||||||
}
|
}
|
||||||
|
l->visible = true;
|
||||||
|
t->visible = true;
|
||||||
}
|
}
|
||||||
|
b->widget->SetTexture(tex.get());
|
||||||
}
|
}
|
||||||
|
|
||||||
assert(chest_backing_);
|
assert(chest_backing_);
|
||||||
chest_backing_->y = have_chests ? 41.0f : -15.0f;
|
chest_backing_->y = have_chests ? 41.0f : -15.0f;
|
||||||
|
|
||||||
|
|||||||
@ -65,6 +65,7 @@ class RootWidget : public ContainerWidget {
|
|||||||
enum class MeterType_ { kLevel, kTrophy, kTickets, kTokens };
|
enum class MeterType_ { kLevel, kTrophy, kTickets, kTokens };
|
||||||
enum class VAlign_ { kTop, kCenter, kBottom };
|
enum class VAlign_ { kTop, kCenter, kBottom };
|
||||||
|
|
||||||
|
void UpdateChests_();
|
||||||
void UpdateTokensMeterText_();
|
void UpdateTokensMeterText_();
|
||||||
void UpdateForFocusedWindow_(Widget* widget);
|
void UpdateForFocusedWindow_(Widget* widget);
|
||||||
auto AddButton_(const ButtonDef_& def) -> Button_*;
|
auto AddButton_(const ButtonDef_& def) -> Button_*;
|
||||||
@ -75,6 +76,10 @@ class RootWidget : public ContainerWidget {
|
|||||||
bool plus, const std::string& s);
|
bool plus, const std::string& s);
|
||||||
void UpdateTokensMeterTextColor_();
|
void UpdateTokensMeterTextColor_();
|
||||||
|
|
||||||
|
std::string chest_0_appearance_;
|
||||||
|
std::string chest_1_appearance_;
|
||||||
|
std::string chest_2_appearance_;
|
||||||
|
std::string chest_3_appearance_;
|
||||||
std::list<Button_> buttons_;
|
std::list<Button_> buttons_;
|
||||||
std::list<Text_> texts_;
|
std::list<Text_> texts_;
|
||||||
std::list<Image_> images_;
|
std::list<Image_> images_;
|
||||||
@ -107,6 +112,10 @@ class RootWidget : public ContainerWidget {
|
|||||||
Image_* tickets_meter_icon_{};
|
Image_* tickets_meter_icon_{};
|
||||||
Image_* tokens_meter_icon_{};
|
Image_* tokens_meter_icon_{};
|
||||||
Image_* inbox_count_backing_{};
|
Image_* inbox_count_backing_{};
|
||||||
|
Image_* chest_0_lock_icon_{};
|
||||||
|
Image_* chest_1_lock_icon_{};
|
||||||
|
Image_* chest_2_lock_icon_{};
|
||||||
|
Image_* chest_3_lock_icon_{};
|
||||||
Text_* squad_size_text_{};
|
Text_* squad_size_text_{};
|
||||||
Text_* account_name_text_{};
|
Text_* account_name_text_{};
|
||||||
Text_* tickets_meter_text_{};
|
Text_* tickets_meter_text_{};
|
||||||
@ -116,6 +125,10 @@ class RootWidget : public ContainerWidget {
|
|||||||
Text_* level_text_{};
|
Text_* level_text_{};
|
||||||
Text_* xp_text_{};
|
Text_* xp_text_{};
|
||||||
Text_* inbox_count_text_{};
|
Text_* inbox_count_text_{};
|
||||||
|
Text_* chest_0_time_text_{};
|
||||||
|
Text_* chest_1_time_text_{};
|
||||||
|
Text_* chest_2_time_text_{};
|
||||||
|
Text_* chest_3_time_text_{};
|
||||||
float base_scale_{1.0f};
|
float base_scale_{1.0f};
|
||||||
float bottom_left_height_{};
|
float bottom_left_height_{};
|
||||||
millisecs_t update_time_{};
|
millisecs_t update_time_{};
|
||||||
|
|||||||
@ -10,7 +10,6 @@ RowWidget::RowWidget() {
|
|||||||
set_background(false); // Influences default event handling.
|
set_background(false); // Influences default event handling.
|
||||||
set_draggable(false);
|
set_draggable(false);
|
||||||
set_claims_left_right(false);
|
set_claims_left_right(false);
|
||||||
set_claims_tab(false);
|
|
||||||
set_selection_loops_to_parent(true);
|
set_selection_loops_to_parent(true);
|
||||||
set_selection_loops(false);
|
set_selection_loops(false);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -19,7 +19,6 @@ ScrollWidget::ScrollWidget()
|
|||||||
set_background(false); // Influences default event handling.
|
set_background(false); // Influences default event handling.
|
||||||
set_draggable(false);
|
set_draggable(false);
|
||||||
set_claims_left_right(false);
|
set_claims_left_right(false);
|
||||||
set_claims_tab(false);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
ScrollWidget::~ScrollWidget() = default;
|
ScrollWidget::~ScrollWidget() = default;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user