mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-02-08 00:30:22 +08:00
achievements now reward chests instead of tickets
This commit is contained in:
parent
e8ff80c0dd
commit
6ed8303bac
48
.efrocachemap
generated
48
.efrocachemap
generated
@ -4174,22 +4174,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": "f476e40f3ede3c25330bbb1ea6bf155d",
|
"build/prefab/full/linux_arm64_gui/debug/ballisticakit": "2a98e8537d1be14b704320178401dcb0",
|
||||||
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "fe0b773103bc46eb5fa47c548f183a84",
|
"build/prefab/full/linux_arm64_gui/release/ballisticakit": "b2912201caff5a99e2d529996f9acd13",
|
||||||
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "bcfce7dfcec3d5dbba02b074107e7c62",
|
"build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "7850d4b60c26d9f7ec15d114300da092",
|
||||||
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "e14c49f2ea7de894013d8dc08c348029",
|
"build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "f372e8a06b3a9db75a7af166ee880961",
|
||||||
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "aa1dbddf6ea08f85fada1e18dcf14ca8",
|
"build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "4c5a477096ea81f7a45462d5902c50f0",
|
||||||
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "749846cc9bcb40d56974f531439ae1aa",
|
"build/prefab/full/linux_x86_64_gui/release/ballisticakit": "c043a1d836f859030df99f81743a3ee9",
|
||||||
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "8ecd4f62295759b1e0030db7e8f7f47e",
|
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "9837a541f38e3c9a1a17153d24b160fb",
|
||||||
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "140477033f5c6afbec5b9e69578e91d0",
|
"build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "657d984e5180b9559100cfed1deb2459",
|
||||||
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "f0cd7f0df81de17a78439a2645dd9efc",
|
"build/prefab/full/mac_arm64_gui/debug/ballisticakit": "e5f0be59869b894e35836a3f6cdd8c2d",
|
||||||
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "40b415329a5259398c16f86a41180719",
|
"build/prefab/full/mac_arm64_gui/release/ballisticakit": "9f2c90595bb7b11c19d7ced2ac317722",
|
||||||
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "7e8cf4f91c975e4b56bd42aba3c2b50a",
|
"build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "9c6a512c50d287416ea05c88f0695640",
|
||||||
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "06a72d193f6df9a85ea46d4fed48e4a4",
|
"build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "8371b2a3e5e4362c07bbb230993fb56d",
|
||||||
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "629c86d69544ce68a163de61294390e9",
|
"build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "bc230cabc3f3a4f8de64ce55a5ca8a7e",
|
||||||
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "b6e63ea23ffd5d80f05f7590224bb927",
|
"build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "4a927d9678e5c5b34e7428a04ee30f8f",
|
||||||
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "1f3106422e9b66a5b1da402cbc434d6c",
|
"build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "8990a1a485c45cd3cfda5c2af83814ab",
|
||||||
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "bcf8af5bf06a37fc887076841fad8ff3",
|
"build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "caba2c16bcf7b163960b48cfb82ccc43",
|
||||||
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "7497894d2943b75b6ac830cdba8481af",
|
"build/prefab/lib/linux_arm64_gui/debug/libballisticaplus.a": "7497894d2943b75b6ac830cdba8481af",
|
||||||
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "273a6f64cac5a233694223b85cd0f22b",
|
"build/prefab/lib/linux_arm64_gui/release/libballisticaplus.a": "273a6f64cac5a233694223b85cd0f22b",
|
||||||
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "7497894d2943b75b6ac830cdba8481af",
|
"build/prefab/lib/linux_arm64_server/debug/libballisticaplus.a": "7497894d2943b75b6ac830cdba8481af",
|
||||||
@ -4202,14 +4202,14 @@
|
|||||||
"build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "7e071962108a8d1727525fb331b70ee4",
|
"build/prefab/lib/mac_arm64_gui/release/libballisticaplus.a": "7e071962108a8d1727525fb331b70ee4",
|
||||||
"build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "55a2b0c2d1db4d70627c901471d05fc7",
|
"build/prefab/lib/mac_arm64_server/debug/libballisticaplus.a": "55a2b0c2d1db4d70627c901471d05fc7",
|
||||||
"build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "7e071962108a8d1727525fb331b70ee4",
|
"build/prefab/lib/mac_arm64_server/release/libballisticaplus.a": "7e071962108a8d1727525fb331b70ee4",
|
||||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "241f03051eb9d75ec538dda179980706",
|
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.lib": "3c53269a93fff94ea2d31f74305c1897",
|
||||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "9e465dfecd8dd4a1cb14bcdb59895942",
|
"build/prefab/lib/windows/Debug_Win32/BallisticaKitGenericPlus.pdb": "46ec17f61bd2372ccf8ab2d0d5d13784",
|
||||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "6cec133582ad66ec1bb2e80f2e7f81cc",
|
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.lib": "ab25d2b558b4dd924caf3151aa7b723b",
|
||||||
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "f6a5f5154d91bb7b34eefefc7d3df7a9",
|
"build/prefab/lib/windows/Debug_Win32/BallisticaKitHeadlessPlus.pdb": "708f8082d98c943ee89cc213d52d2a27",
|
||||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "584659bd114ad5fb5a6f2f3e10de4d9d",
|
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.lib": "615dfac46d57c604d4bfc8c0e2f56495",
|
||||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "0abefcd3c092a30a8b62903bfcd49dc6",
|
"build/prefab/lib/windows/Release_Win32/BallisticaKitGenericPlus.pdb": "dabcb300673400ebbeda8edc4110c49e",
|
||||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "9cff421668aeba53035369a5620a6c06",
|
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.lib": "e5c18e9be721e812f1288908e55fa9fc",
|
||||||
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "41d882665240d037aaff8d2c23d37239",
|
"build/prefab/lib/windows/Release_Win32/BallisticaKitHeadlessPlus.pdb": "df392ed0dc9455826223b77904758b5f",
|
||||||
"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 22207, api 9, 2025-01-18)
|
### 1.7.37 (build 22209, api 9, 2025-01-18)
|
||||||
- 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.
|
||||||
|
|||||||
@ -6,7 +6,11 @@ from __future__ import annotations
|
|||||||
import logging
|
import logging
|
||||||
from typing import TYPE_CHECKING
|
from typing import TYPE_CHECKING
|
||||||
|
|
||||||
# from bacommon.bs import ClassicChestAppearance
|
from bacommon.bs import ClassicChestAppearance
|
||||||
|
from baclassic._chest import (
|
||||||
|
CHEST_APPEARANCE_DISPLAY_INFOS,
|
||||||
|
CHEST_APPEARANCE_DISPLAY_INFO_DEFAULT,
|
||||||
|
)
|
||||||
import babase
|
import babase
|
||||||
import bascenev1
|
import bascenev1
|
||||||
import bauiv1
|
import bauiv1
|
||||||
@ -93,56 +97,56 @@ class AchievementSubsystem:
|
|||||||
'achievementInControl',
|
'achievementInControl',
|
||||||
(1, 1, 1),
|
(1, 1, 1),
|
||||||
'',
|
'',
|
||||||
ticket_award=5,
|
award=5,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
'Sharing is Caring',
|
'Sharing is Caring',
|
||||||
'achievementSharingIsCaring',
|
'achievementSharingIsCaring',
|
||||||
(1, 1, 1),
|
(1, 1, 1),
|
||||||
'',
|
'',
|
||||||
ticket_award=15,
|
award=15,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
'Dual Wielding',
|
'Dual Wielding',
|
||||||
'achievementDualWielding',
|
'achievementDualWielding',
|
||||||
(1, 1, 1),
|
(1, 1, 1),
|
||||||
'',
|
'',
|
||||||
ticket_award=10,
|
award=10,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
'Free Loader',
|
'Free Loader',
|
||||||
'achievementFreeLoader',
|
'achievementFreeLoader',
|
||||||
(1, 1, 1),
|
(1, 1, 1),
|
||||||
'',
|
'',
|
||||||
ticket_award=10,
|
award=10,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
'Team Player',
|
'Team Player',
|
||||||
'achievementTeamPlayer',
|
'achievementTeamPlayer',
|
||||||
(1, 1, 1),
|
(1, 1, 1),
|
||||||
'',
|
'',
|
||||||
ticket_award=20,
|
award=20,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
'Onslaught Training Victory',
|
'Onslaught Training Victory',
|
||||||
'achievementOnslaught',
|
'achievementOnslaught',
|
||||||
(1, 1, 1),
|
(1, 1, 1),
|
||||||
'Default:Onslaught Training',
|
'Default:Onslaught Training',
|
||||||
ticket_award=5,
|
award=5,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
'Off You Go Then',
|
'Off You Go Then',
|
||||||
'achievementOffYouGo',
|
'achievementOffYouGo',
|
||||||
(1, 1.1, 1.3),
|
(1, 1.1, 1.3),
|
||||||
'Default:Onslaught Training',
|
'Default:Onslaught Training',
|
||||||
ticket_award=5,
|
award=5,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
'Boxer',
|
'Boxer',
|
||||||
'achievementBoxer',
|
'achievementBoxer',
|
||||||
(1, 0.6, 0.6),
|
(1, 0.6, 0.6),
|
||||||
'Default:Onslaught Training',
|
'Default:Onslaught Training',
|
||||||
ticket_award=10,
|
award=10,
|
||||||
hard_mode_only=True,
|
hard_mode_only=True,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
@ -150,21 +154,21 @@ class AchievementSubsystem:
|
|||||||
'achievementOnslaught',
|
'achievementOnslaught',
|
||||||
(0.5, 1.4, 0.6),
|
(0.5, 1.4, 0.6),
|
||||||
'Default:Rookie Onslaught',
|
'Default:Rookie Onslaught',
|
||||||
ticket_award=10,
|
award=10,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
'Mine Games',
|
'Mine Games',
|
||||||
'achievementMine',
|
'achievementMine',
|
||||||
(1, 1, 1.4),
|
(1, 1, 1.4),
|
||||||
'Default:Rookie Onslaught',
|
'Default:Rookie Onslaught',
|
||||||
ticket_award=10,
|
award=10,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
'Flawless Victory',
|
'Flawless Victory',
|
||||||
'achievementFlawlessVictory',
|
'achievementFlawlessVictory',
|
||||||
(1, 1, 1),
|
(1, 1, 1),
|
||||||
'Default:Rookie Onslaught',
|
'Default:Rookie Onslaught',
|
||||||
ticket_award=15,
|
award=15,
|
||||||
hard_mode_only=True,
|
hard_mode_only=True,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
@ -172,21 +176,21 @@ class AchievementSubsystem:
|
|||||||
'achievementFootballVictory',
|
'achievementFootballVictory',
|
||||||
(1.0, 1, 0.6),
|
(1.0, 1, 0.6),
|
||||||
'Default:Rookie Football',
|
'Default:Rookie Football',
|
||||||
ticket_award=10,
|
award=10,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
'Super Punch',
|
'Super Punch',
|
||||||
'achievementSuperPunch',
|
'achievementSuperPunch',
|
||||||
(1, 1, 1.8),
|
(1, 1, 1.8),
|
||||||
'Default:Rookie Football',
|
'Default:Rookie Football',
|
||||||
ticket_award=10,
|
award=10,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
'Rookie Football Shutout',
|
'Rookie Football Shutout',
|
||||||
'achievementFootballShutout',
|
'achievementFootballShutout',
|
||||||
(1, 1, 1),
|
(1, 1, 1),
|
||||||
'Default:Rookie Football',
|
'Default:Rookie Football',
|
||||||
ticket_award=15,
|
award=15,
|
||||||
hard_mode_only=True,
|
hard_mode_only=True,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
@ -194,21 +198,21 @@ class AchievementSubsystem:
|
|||||||
'achievementOnslaught',
|
'achievementOnslaught',
|
||||||
(0.3, 1, 2.0),
|
(0.3, 1, 2.0),
|
||||||
'Default:Pro Onslaught',
|
'Default:Pro Onslaught',
|
||||||
ticket_award=15,
|
award=15,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
'Boom Goes the Dynamite',
|
'Boom Goes the Dynamite',
|
||||||
'achievementTNT',
|
'achievementTNT',
|
||||||
(1.4, 1.2, 0.8),
|
(1.4, 1.2, 0.8),
|
||||||
'Default:Pro Onslaught',
|
'Default:Pro Onslaught',
|
||||||
ticket_award=15,
|
award=15,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
'Pro Boxer',
|
'Pro Boxer',
|
||||||
'achievementBoxer',
|
'achievementBoxer',
|
||||||
(2, 2, 0),
|
(2, 2, 0),
|
||||||
'Default:Pro Onslaught',
|
'Default:Pro Onslaught',
|
||||||
ticket_award=20,
|
award=20,
|
||||||
hard_mode_only=True,
|
hard_mode_only=True,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
@ -216,21 +220,21 @@ class AchievementSubsystem:
|
|||||||
'achievementFootballVictory',
|
'achievementFootballVictory',
|
||||||
(1.3, 1.3, 2.0),
|
(1.3, 1.3, 2.0),
|
||||||
'Default:Pro Football',
|
'Default:Pro Football',
|
||||||
ticket_award=15,
|
award=15,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
'Super Mega Punch',
|
'Super Mega Punch',
|
||||||
'achievementSuperPunch',
|
'achievementSuperPunch',
|
||||||
(2, 1, 0.6),
|
(2, 1, 0.6),
|
||||||
'Default:Pro Football',
|
'Default:Pro Football',
|
||||||
ticket_award=15,
|
award=15,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
'Pro Football Shutout',
|
'Pro Football Shutout',
|
||||||
'achievementFootballShutout',
|
'achievementFootballShutout',
|
||||||
(0.7, 0.7, 2.0),
|
(0.7, 0.7, 2.0),
|
||||||
'Default:Pro Football',
|
'Default:Pro Football',
|
||||||
ticket_award=20,
|
award=20,
|
||||||
hard_mode_only=True,
|
hard_mode_only=True,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
@ -238,14 +242,14 @@ class AchievementSubsystem:
|
|||||||
'achievementRunaround',
|
'achievementRunaround',
|
||||||
(1, 1, 1),
|
(1, 1, 1),
|
||||||
'Default:Pro Runaround',
|
'Default:Pro Runaround',
|
||||||
ticket_award=15,
|
award=15,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
'Precision Bombing',
|
'Precision Bombing',
|
||||||
'achievementCrossHair',
|
'achievementCrossHair',
|
||||||
(1, 1, 1.3),
|
(1, 1, 1.3),
|
||||||
'Default:Pro Runaround',
|
'Default:Pro Runaround',
|
||||||
ticket_award=20,
|
award=20,
|
||||||
hard_mode_only=True,
|
hard_mode_only=True,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
@ -253,7 +257,7 @@ class AchievementSubsystem:
|
|||||||
'achievementWall',
|
'achievementWall',
|
||||||
(1, 0.7, 0.7),
|
(1, 0.7, 0.7),
|
||||||
'Default:Pro Runaround',
|
'Default:Pro Runaround',
|
||||||
ticket_award=25,
|
award=25,
|
||||||
hard_mode_only=True,
|
hard_mode_only=True,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
@ -261,14 +265,14 @@ class AchievementSubsystem:
|
|||||||
'achievementOnslaught',
|
'achievementOnslaught',
|
||||||
(2, 2, 1),
|
(2, 2, 1),
|
||||||
'Default:Uber Onslaught',
|
'Default:Uber Onslaught',
|
||||||
ticket_award=30,
|
award=30,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
'Gold Miner',
|
'Gold Miner',
|
||||||
'achievementMine',
|
'achievementMine',
|
||||||
(2, 1.6, 0.2),
|
(2, 1.6, 0.2),
|
||||||
'Default:Uber Onslaught',
|
'Default:Uber Onslaught',
|
||||||
ticket_award=30,
|
award=30,
|
||||||
hard_mode_only=True,
|
hard_mode_only=True,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
@ -276,7 +280,7 @@ class AchievementSubsystem:
|
|||||||
'achievementTNT',
|
'achievementTNT',
|
||||||
(2, 1.8, 0.3),
|
(2, 1.8, 0.3),
|
||||||
'Default:Uber Onslaught',
|
'Default:Uber Onslaught',
|
||||||
ticket_award=30,
|
award=30,
|
||||||
hard_mode_only=True,
|
hard_mode_only=True,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
@ -284,14 +288,14 @@ class AchievementSubsystem:
|
|||||||
'achievementFootballVictory',
|
'achievementFootballVictory',
|
||||||
(1.8, 1.4, 0.3),
|
(1.8, 1.4, 0.3),
|
||||||
'Default:Uber Football',
|
'Default:Uber Football',
|
||||||
ticket_award=30,
|
award=30,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
'Got the Moves',
|
'Got the Moves',
|
||||||
'achievementGotTheMoves',
|
'achievementGotTheMoves',
|
||||||
(2, 1, 0),
|
(2, 1, 0),
|
||||||
'Default:Uber Football',
|
'Default:Uber Football',
|
||||||
ticket_award=30,
|
award=30,
|
||||||
hard_mode_only=True,
|
hard_mode_only=True,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
@ -299,7 +303,7 @@ class AchievementSubsystem:
|
|||||||
'achievementFootballShutout',
|
'achievementFootballShutout',
|
||||||
(2, 2, 0),
|
(2, 2, 0),
|
||||||
'Default:Uber Football',
|
'Default:Uber Football',
|
||||||
ticket_award=40,
|
award=40,
|
||||||
hard_mode_only=True,
|
hard_mode_only=True,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
@ -307,14 +311,14 @@ class AchievementSubsystem:
|
|||||||
'achievementRunaround',
|
'achievementRunaround',
|
||||||
(1.5, 1.2, 0.2),
|
(1.5, 1.2, 0.2),
|
||||||
'Default:Uber Runaround',
|
'Default:Uber Runaround',
|
||||||
ticket_award=30,
|
award=30,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
'The Great Wall',
|
'The Great Wall',
|
||||||
'achievementWall',
|
'achievementWall',
|
||||||
(2, 1.7, 0.4),
|
(2, 1.7, 0.4),
|
||||||
'Default:Uber Runaround',
|
'Default:Uber Runaround',
|
||||||
ticket_award=40,
|
award=40,
|
||||||
hard_mode_only=True,
|
hard_mode_only=True,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
@ -322,7 +326,7 @@ class AchievementSubsystem:
|
|||||||
'achievementStayinAlive',
|
'achievementStayinAlive',
|
||||||
(2, 2, 1),
|
(2, 2, 1),
|
||||||
'Default:Uber Runaround',
|
'Default:Uber Runaround',
|
||||||
ticket_award=40,
|
award=40,
|
||||||
hard_mode_only=True,
|
hard_mode_only=True,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
@ -330,7 +334,7 @@ class AchievementSubsystem:
|
|||||||
'achievementMedalSmall',
|
'achievementMedalSmall',
|
||||||
(2, 1.5, 0.3),
|
(2, 1.5, 0.3),
|
||||||
'Default:The Last Stand',
|
'Default:The Last Stand',
|
||||||
ticket_award=20,
|
award=20,
|
||||||
hard_mode_only=True,
|
hard_mode_only=True,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
@ -338,7 +342,7 @@ class AchievementSubsystem:
|
|||||||
'achievementMedalMedium',
|
'achievementMedalMedium',
|
||||||
(2, 1.5, 0.3),
|
(2, 1.5, 0.3),
|
||||||
'Default:The Last Stand',
|
'Default:The Last Stand',
|
||||||
ticket_award=40,
|
award=40,
|
||||||
hard_mode_only=True,
|
hard_mode_only=True,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
@ -346,7 +350,7 @@ class AchievementSubsystem:
|
|||||||
'achievementMedalLarge',
|
'achievementMedalLarge',
|
||||||
(2, 1.5, 0.3),
|
(2, 1.5, 0.3),
|
||||||
'Default:The Last Stand',
|
'Default:The Last Stand',
|
||||||
ticket_award=60,
|
award=60,
|
||||||
hard_mode_only=True,
|
hard_mode_only=True,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
@ -354,42 +358,42 @@ class AchievementSubsystem:
|
|||||||
'achievementMedalSmall',
|
'achievementMedalSmall',
|
||||||
(0.7, 1, 0.7),
|
(0.7, 1, 0.7),
|
||||||
'Challenges:Infinite Onslaught',
|
'Challenges:Infinite Onslaught',
|
||||||
ticket_award=5,
|
award=5,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
'Onslaught Wizard',
|
'Onslaught Wizard',
|
||||||
'achievementMedalMedium',
|
'achievementMedalMedium',
|
||||||
(0.7, 1.0, 0.7),
|
(0.7, 1.0, 0.7),
|
||||||
'Challenges:Infinite Onslaught',
|
'Challenges:Infinite Onslaught',
|
||||||
ticket_award=15,
|
award=15,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
'Onslaught God',
|
'Onslaught God',
|
||||||
'achievementMedalLarge',
|
'achievementMedalLarge',
|
||||||
(0.7, 1.0, 0.7),
|
(0.7, 1.0, 0.7),
|
||||||
'Challenges:Infinite Onslaught',
|
'Challenges:Infinite Onslaught',
|
||||||
ticket_award=30,
|
award=30,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
'Runaround Master',
|
'Runaround Master',
|
||||||
'achievementMedalSmall',
|
'achievementMedalSmall',
|
||||||
(1.0, 1.0, 1.2),
|
(1.0, 1.0, 1.2),
|
||||||
'Challenges:Infinite Runaround',
|
'Challenges:Infinite Runaround',
|
||||||
ticket_award=5,
|
award=5,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
'Runaround Wizard',
|
'Runaround Wizard',
|
||||||
'achievementMedalMedium',
|
'achievementMedalMedium',
|
||||||
(1.0, 1.0, 1.2),
|
(1.0, 1.0, 1.2),
|
||||||
'Challenges:Infinite Runaround',
|
'Challenges:Infinite Runaround',
|
||||||
ticket_award=15,
|
award=15,
|
||||||
),
|
),
|
||||||
Achievement(
|
Achievement(
|
||||||
'Runaround God',
|
'Runaround God',
|
||||||
'achievementMedalLarge',
|
'achievementMedalLarge',
|
||||||
(1.0, 1.0, 1.2),
|
(1.0, 1.0, 1.2),
|
||||||
'Challenges:Infinite Runaround',
|
'Challenges:Infinite Runaround',
|
||||||
ticket_award=30,
|
award=30,
|
||||||
),
|
),
|
||||||
]
|
]
|
||||||
|
|
||||||
@ -538,8 +542,7 @@ class Achievement:
|
|||||||
icon_color: tuple[float, float, float],
|
icon_color: tuple[float, float, float],
|
||||||
level_name: str,
|
level_name: str,
|
||||||
*,
|
*,
|
||||||
ticket_award: int,
|
award: int,
|
||||||
# chest_award: ClassicChestAppearance,
|
|
||||||
hard_mode_only: bool = False,
|
hard_mode_only: bool = False,
|
||||||
):
|
):
|
||||||
self._name = name
|
self._name = name
|
||||||
@ -548,7 +551,7 @@ class Achievement:
|
|||||||
self._icon_color = icon_color + (1.0,)
|
self._icon_color = icon_color + (1.0,)
|
||||||
self._level_name = level_name
|
self._level_name = level_name
|
||||||
self._completion_banner_slot: int | None = None
|
self._completion_banner_slot: int | None = None
|
||||||
self._ticket_award = ticket_award
|
self._award = award
|
||||||
self._hard_mode_only = hard_mode_only
|
self._hard_mode_only = hard_mode_only
|
||||||
|
|
||||||
@property
|
@property
|
||||||
@ -728,13 +731,45 @@ class Achievement:
|
|||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
def get_award_chest_type(self) -> ClassicChestAppearance:
|
||||||
|
"""Return the type of chest given for this achievement."""
|
||||||
|
|
||||||
|
# For now just map our old ticket values to chest types.
|
||||||
|
# Can add distinct values if need be later.
|
||||||
|
plus = babase.app.plus
|
||||||
|
assert plus is not None
|
||||||
|
t = plus.get_v1_account_misc_read_val(
|
||||||
|
f'achAward.{self.name}', self._award
|
||||||
|
)
|
||||||
|
return (
|
||||||
|
ClassicChestAppearance.L6
|
||||||
|
if t >= 30
|
||||||
|
else (
|
||||||
|
ClassicChestAppearance.L5
|
||||||
|
if t >= 25
|
||||||
|
else (
|
||||||
|
ClassicChestAppearance.L4
|
||||||
|
if t >= 20
|
||||||
|
else (
|
||||||
|
ClassicChestAppearance.L3
|
||||||
|
if t >= 15
|
||||||
|
else (
|
||||||
|
ClassicChestAppearance.L2
|
||||||
|
if t >= 10
|
||||||
|
else ClassicChestAppearance.L1
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
)
|
||||||
|
|
||||||
# def get_award_ticket_value(self, include_pro_bonus: bool = False) -> int:
|
# def get_award_ticket_value(self, include_pro_bonus: bool = False) -> int:
|
||||||
# """Get the ticket award value for this achievement."""
|
# """Get the ticket award value for this achievement."""
|
||||||
# plus = babase.app.plus
|
# plus = babase.app.plus
|
||||||
# if plus is None:
|
# if plus is None:
|
||||||
# return 0
|
# return 0
|
||||||
# val: int = plus.get_v1_account_misc_read_val(
|
# val: int = plus.get_v1_account_misc_read_val(
|
||||||
# 'achAward.' + self._name, self._ticket_award
|
# 'achAward.' + self._name, self._award
|
||||||
# ) * _get_ach_mult(include_pro_bonus)
|
# ) * _get_ach_mult(include_pro_bonus)
|
||||||
# assert isinstance(val, int)
|
# assert isinstance(val, int)
|
||||||
# return val
|
# return val
|
||||||
@ -746,7 +781,7 @@ class Achievement:
|
|||||||
if plus is None:
|
if plus is None:
|
||||||
return 0
|
return 0
|
||||||
val: int = plus.get_v1_account_misc_read_val(
|
val: int = plus.get_v1_account_misc_read_val(
|
||||||
'achLeaguePoints.' + self._name, self._ticket_award
|
'achLeaguePoints.' + self._name, self._award
|
||||||
)
|
)
|
||||||
assert isinstance(val, int)
|
assert isinstance(val, int)
|
||||||
return val
|
return val
|
||||||
@ -902,9 +937,38 @@ class Achievement:
|
|||||||
txtactor.node.rotate = 10
|
txtactor.node.rotate = 10
|
||||||
objs.append(txtactor)
|
objs.append(txtactor)
|
||||||
|
|
||||||
# Ticket-award.
|
# Chest award.
|
||||||
award_x = -100
|
award_x = -100
|
||||||
# print('FIXME SHOW ACH CHEST VAL')
|
chesttype = self.get_award_chest_type()
|
||||||
|
chestdisplayinfo = CHEST_APPEARANCE_DISPLAY_INFOS.get(
|
||||||
|
chesttype, CHEST_APPEARANCE_DISPLAY_INFO_DEFAULT
|
||||||
|
)
|
||||||
|
objs.append(
|
||||||
|
Image(
|
||||||
|
# Provide magical extended dict version of texture
|
||||||
|
# that Image actor supports.
|
||||||
|
texture={
|
||||||
|
'texture': bascenev1.gettexture(
|
||||||
|
chestdisplayinfo.texclosed
|
||||||
|
),
|
||||||
|
'tint_texture': bascenev1.gettexture(
|
||||||
|
chestdisplayinfo.texclosedtint
|
||||||
|
),
|
||||||
|
'tint_color': chestdisplayinfo.tint,
|
||||||
|
'tint2_color': chestdisplayinfo.tint2,
|
||||||
|
'mask_texture': None,
|
||||||
|
},
|
||||||
|
color=chestdisplayinfo.color + (0.5 if hmo else 1.0,),
|
||||||
|
position=(x + award_x + 37, y + 12),
|
||||||
|
scale=(32.0, 32.0),
|
||||||
|
transition=Image.Transition.FADE_IN,
|
||||||
|
transition_delay=delay + 0.05,
|
||||||
|
transition_out_delay=out_delay_fin,
|
||||||
|
host_only=True,
|
||||||
|
attach=Image.Attach.TOP_LEFT,
|
||||||
|
).autoretain()
|
||||||
|
)
|
||||||
|
|
||||||
# objs.append(
|
# objs.append(
|
||||||
# Text(
|
# Text(
|
||||||
# babase.charstr(babase.SpecialChar.TICKET),
|
# babase.charstr(babase.SpecialChar.TICKET),
|
||||||
@ -980,23 +1044,53 @@ class Achievement:
|
|||||||
else:
|
else:
|
||||||
if not complete:
|
if not complete:
|
||||||
award_x = -100
|
award_x = -100
|
||||||
|
# objs.append(
|
||||||
|
# Text(
|
||||||
|
# babase.charstr(babase.SpecialChar.TICKET),
|
||||||
|
# host_only=True,
|
||||||
|
# position=(x + award_x + 33, y + 7),
|
||||||
|
# transition=Text.Transition.IN_RIGHT,
|
||||||
|
# scale=1.5,
|
||||||
|
# h_attach=h_attach,
|
||||||
|
# v_attach=v_attach,
|
||||||
|
# h_align=Text.HAlign.CENTER,
|
||||||
|
# v_align=Text.VAlign.CENTER,
|
||||||
|
# color=(1, 1, 1, (0.1 if hmo else 0.2)),
|
||||||
|
# transition_delay=delay + 0.05,
|
||||||
|
# transition_out_delay=None,
|
||||||
|
# ).autoretain()
|
||||||
|
# )
|
||||||
|
chesttype = self.get_award_chest_type()
|
||||||
|
chestdisplayinfo = CHEST_APPEARANCE_DISPLAY_INFOS.get(
|
||||||
|
chesttype, CHEST_APPEARANCE_DISPLAY_INFO_DEFAULT
|
||||||
|
)
|
||||||
objs.append(
|
objs.append(
|
||||||
Text(
|
Image(
|
||||||
babase.charstr(babase.SpecialChar.TICKET),
|
# Provide magical extended dict version of texture
|
||||||
host_only=True,
|
# that Image actor supports.
|
||||||
position=(x + award_x + 33, y + 7),
|
texture={
|
||||||
transition=Text.Transition.IN_RIGHT,
|
'texture': bascenev1.gettexture(
|
||||||
scale=1.5,
|
chestdisplayinfo.texclosed
|
||||||
h_attach=h_attach,
|
),
|
||||||
v_attach=v_attach,
|
'tint_texture': bascenev1.gettexture(
|
||||||
h_align=Text.HAlign.CENTER,
|
chestdisplayinfo.texclosedtint
|
||||||
v_align=Text.VAlign.CENTER,
|
),
|
||||||
color=(1, 1, 1, (0.1 if hmo else 0.2)),
|
'tint_color': chestdisplayinfo.tint,
|
||||||
|
'tint2_color': chestdisplayinfo.tint2,
|
||||||
|
'mask_texture': None,
|
||||||
|
},
|
||||||
|
color=chestdisplayinfo.color
|
||||||
|
+ (0.5 if hmo else 1.0,),
|
||||||
|
position=(x + award_x + 38, y + 14),
|
||||||
|
scale=(32.0, 32.0),
|
||||||
|
transition=Image.Transition.IN_RIGHT,
|
||||||
transition_delay=delay + 0.05,
|
transition_delay=delay + 0.05,
|
||||||
transition_out_delay=None,
|
transition_out_delay=None,
|
||||||
|
host_only=True,
|
||||||
|
attach=attach,
|
||||||
).autoretain()
|
).autoretain()
|
||||||
)
|
)
|
||||||
# print('FIXME SHOW ACH CHEST2')
|
|
||||||
# objs.append(
|
# objs.append(
|
||||||
# Text(
|
# Text(
|
||||||
# '+' + str(self.get_award_ticket_value()),
|
# '+' + str(self.get_award_ticket_value()),
|
||||||
@ -1346,24 +1440,24 @@ class Achievement:
|
|||||||
assert objt.node
|
assert objt.node
|
||||||
objt.node.host_only = True
|
objt.node.host_only = True
|
||||||
|
|
||||||
objt = Text(
|
# objt = Text(
|
||||||
babase.charstr(babase.SpecialChar.TICKET),
|
# babase.charstr(babase.SpecialChar.TICKET),
|
||||||
position=(-120 - 170 + 5, 75 + y_offs - 20),
|
# position=(-120 - 170 + 5, 75 + y_offs - 20),
|
||||||
front=True,
|
# front=True,
|
||||||
v_attach=Text.VAttach.BOTTOM,
|
# v_attach=Text.VAttach.BOTTOM,
|
||||||
h_align=Text.HAlign.CENTER,
|
# h_align=Text.HAlign.CENTER,
|
||||||
v_align=Text.VAlign.CENTER,
|
# v_align=Text.VAlign.CENTER,
|
||||||
transition=Text.Transition.IN_BOTTOM,
|
# transition=Text.Transition.IN_BOTTOM,
|
||||||
vr_depth=base_vr_depth,
|
# vr_depth=base_vr_depth,
|
||||||
transition_delay=in_time,
|
# transition_delay=in_time,
|
||||||
transition_out_delay=out_time,
|
# transition_out_delay=out_time,
|
||||||
flash=True,
|
# flash=True,
|
||||||
color=(0.5, 0.5, 0.5, 1),
|
# color=(0.5, 0.5, 0.5, 1),
|
||||||
scale=3.0,
|
# scale=3.0,
|
||||||
).autoretain()
|
# ).autoretain()
|
||||||
objs.append(objt)
|
# objs.append(objt)
|
||||||
assert objt.node
|
# assert objt.node
|
||||||
objt.node.host_only = True
|
# objt.node.host_only = True
|
||||||
|
|
||||||
# print('FIXME SHOW ACH CHEST3')
|
# print('FIXME SHOW ACH CHEST3')
|
||||||
# objt = Text(
|
# objt = Text(
|
||||||
|
|||||||
@ -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 = 22207
|
TARGET_BALLISTICA_BUILD = 22209
|
||||||
TARGET_BALLISTICA_VERSION = '1.7.37'
|
TARGET_BALLISTICA_VERSION = '1.7.37'
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -18,9 +18,15 @@ class AchievementsWindow(bui.MainWindow):
|
|||||||
origin_widget: bui.Widget | None = None,
|
origin_widget: bui.Widget | None = None,
|
||||||
):
|
):
|
||||||
# pylint: disable=too-many-locals
|
# pylint: disable=too-many-locals
|
||||||
|
# pylint: disable=cyclic-import
|
||||||
|
from baclassic import (
|
||||||
|
CHEST_APPEARANCE_DISPLAY_INFOS,
|
||||||
|
CHEST_APPEARANCE_DISPLAY_INFO_DEFAULT,
|
||||||
|
)
|
||||||
|
|
||||||
assert bui.app.classic is not None
|
assert bui.app.classic is not None
|
||||||
uiscale = bui.app.ui_v1.uiscale
|
uiscale = bui.app.ui_v1.uiscale
|
||||||
self._width = 600 if uiscale is bui.UIScale.SMALL else 500
|
self._width = 600 if uiscale is bui.UIScale.SMALL else 550
|
||||||
self._height = (
|
self._height = (
|
||||||
380
|
380
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
@ -39,7 +45,7 @@ class AchievementsWindow(bui.MainWindow):
|
|||||||
scale=(
|
scale=(
|
||||||
2.3
|
2.3
|
||||||
if uiscale is bui.UIScale.SMALL
|
if uiscale is bui.UIScale.SMALL
|
||||||
else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
|
else 1.6 if uiscale is bui.UIScale.MEDIUM else 1.23
|
||||||
),
|
),
|
||||||
stack_offset=(
|
stack_offset=(
|
||||||
(0, 0)
|
(0, 0)
|
||||||
@ -207,6 +213,25 @@ class AchievementsWindow(bui.MainWindow):
|
|||||||
h_align='left',
|
h_align='left',
|
||||||
v_align='center',
|
v_align='center',
|
||||||
)
|
)
|
||||||
|
chest_type = ach.get_award_chest_type()
|
||||||
|
chestdisplayinfo = CHEST_APPEARANCE_DISPLAY_INFOS.get(
|
||||||
|
chest_type, CHEST_APPEARANCE_DISPLAY_INFO_DEFAULT
|
||||||
|
)
|
||||||
|
chestsize = 24.0
|
||||||
|
bui.imagewidget(
|
||||||
|
parent=self._subcontainer,
|
||||||
|
opacity=0.0 if complete else 1.0,
|
||||||
|
position=(
|
||||||
|
sub_width * 0.92 - 40.0 - chestsize * 0.5,
|
||||||
|
sub_height - 20 - incr * i - chestsize * 0.5,
|
||||||
|
),
|
||||||
|
size=(chestsize, chestsize),
|
||||||
|
color=chestdisplayinfo.color,
|
||||||
|
texture=bui.gettexture(chestdisplayinfo.texclosed),
|
||||||
|
tint_texture=bui.gettexture(chestdisplayinfo.texclosedtint),
|
||||||
|
tint_color=chestdisplayinfo.tint,
|
||||||
|
tint2_color=chestdisplayinfo.tint2,
|
||||||
|
)
|
||||||
|
|
||||||
pts = ach.power_ranking_value
|
pts = ach.power_ranking_value
|
||||||
bui.textwidget(
|
bui.textwidget(
|
||||||
|
|||||||
@ -32,8 +32,8 @@ class TrophiesWindow(popup.PopupWindow):
|
|||||||
else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
|
else 1.65 if uiscale is bui.UIScale.MEDIUM else 1.23
|
||||||
)
|
)
|
||||||
self._transitioning_out = False
|
self._transitioning_out = False
|
||||||
self._width = 300
|
self._width = 310
|
||||||
self._height = 300
|
self._height = 310
|
||||||
bg_color = (0.5, 0.4, 0.6)
|
bg_color = (0.5, 0.4, 0.6)
|
||||||
|
|
||||||
super().__init__(
|
super().__init__(
|
||||||
@ -65,7 +65,8 @@ class TrophiesWindow(popup.PopupWindow):
|
|||||||
scale=0.6,
|
scale=0.6,
|
||||||
text=bui.Lstr(resource='trophiesText'),
|
text=bui.Lstr(resource='trophiesText'),
|
||||||
maxwidth=200,
|
maxwidth=200,
|
||||||
color=(1, 1, 1, 0.4),
|
# color=(1, 1, 1, 0.4),
|
||||||
|
color=bui.app.ui_v1.title_color,
|
||||||
)
|
)
|
||||||
|
|
||||||
self._scrollwidget = bui.scrollwidget(
|
self._scrollwidget = bui.scrollwidget(
|
||||||
@ -73,6 +74,7 @@ class TrophiesWindow(popup.PopupWindow):
|
|||||||
size=(self._width - 60, self._height - 70),
|
size=(self._width - 60, self._height - 70),
|
||||||
position=(30, 30),
|
position=(30, 30),
|
||||||
capture_arrows=True,
|
capture_arrows=True,
|
||||||
|
border_opacity=0.4,
|
||||||
)
|
)
|
||||||
bui.widget(edit=self._scrollwidget, autoselect=True)
|
bui.widget(edit=self._scrollwidget, autoselect=True)
|
||||||
|
|
||||||
|
|||||||
@ -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 = 22207;
|
const int kEngineBuildNumber = 22209;
|
||||||
const char* kEngineVersion = "1.7.37";
|
const char* kEngineVersion = "1.7.37";
|
||||||
const int kEngineApiVersion = 9;
|
const int kEngineApiVersion = 9;
|
||||||
|
|
||||||
|
|||||||
@ -252,11 +252,13 @@ auto HScrollWidget::HandleMessage(const base::WidgetMessage& m) -> bool {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
float child_w = (**i).GetWidth();
|
float child_w = (**i).GetWidth();
|
||||||
float sRight = width() - border_width_;
|
float s_right = width() - border_width_;
|
||||||
float sLeft = border_width_;
|
float s_left = border_width_;
|
||||||
float rate =
|
// Note: need a max on denominator here or we can get nan due to
|
||||||
(child_w - (sRight - sLeft))
|
// divide-by-zero.
|
||||||
/ ((1.0f - ((sRight - sLeft) / child_w)) * (sRight - sLeft));
|
float rate = (child_w - (s_right - s_left))
|
||||||
|
/ std::max(1.0f, ((1.0f - ((s_right - s_left) / child_w))
|
||||||
|
* (s_right - s_left)));
|
||||||
child_offset_h_ = thumb_click_start_child_offset_h_
|
child_offset_h_ = thumb_click_start_child_offset_h_
|
||||||
- rate * (x - thumb_click_start_h_);
|
- rate * (x - thumb_click_start_h_);
|
||||||
|
|
||||||
|
|||||||
@ -476,9 +476,11 @@ auto ScrollWidget::HandleMessage(const base::WidgetMessage& m) -> bool {
|
|||||||
float child_h = (**i).GetHeight();
|
float child_h = (**i).GetHeight();
|
||||||
float s_top = height() - border_height_;
|
float s_top = height() - border_height_;
|
||||||
float s_bottom = border_height_;
|
float s_bottom = border_height_;
|
||||||
float rate =
|
// Note: need a max on denominator here or we can get nan due to
|
||||||
(child_h - (s_top - s_bottom))
|
// divide-by-zero.
|
||||||
/ ((1.0f - ((s_top - s_bottom) / child_h)) * (s_top - s_bottom));
|
float rate = (child_h - (s_top - s_bottom))
|
||||||
|
/ std::max(1.0f, ((1.0f - ((s_top - s_bottom) / child_h))
|
||||||
|
* (s_top - s_bottom)));
|
||||||
child_offset_v_ = thumb_click_start_child_offset_v_
|
child_offset_v_ = thumb_click_start_child_offset_v_
|
||||||
- rate * (y - thumb_click_start_v_);
|
- rate * (y - thumb_click_start_v_);
|
||||||
ClampThumb_(false, true);
|
ClampThumb_(false, true);
|
||||||
|
|||||||
@ -34,7 +34,7 @@ class SpinnerWidget : public Widget {
|
|||||||
private:
|
private:
|
||||||
float size_{32.0f};
|
float size_{32.0f};
|
||||||
float presence_{};
|
float presence_{};
|
||||||
Style style_{Style::kBomb};
|
Style style_{Style::kSimple};
|
||||||
bool visible_{true};
|
bool visible_{true};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user