mirror of
https://github.com/RYDE-WORK/ballistica.git
synced 2026-01-28 01:43:22 +08:00
v1.7.13
This commit is contained in:
parent
8a7f93d530
commit
50a581ef75
@ -4003,50 +4003,50 @@
|
||||
"assets/src/ba_data/python/ba/_generated/__init__.py": "https://files.ballistica.net/cache/ba1/ee/e8/cad05aa531c7faf7ff7b96db7f6e",
|
||||
"assets/src/ba_data/python/ba/_generated/enums.py": "https://files.ballistica.net/cache/ba1/1c/77/ac670a5118abdf8a7687af0e159b",
|
||||
"ballisticacore-windows/Generic/BallisticaCore.ico": "https://files.ballistica.net/cache/ba1/89/c0/e32c7d2a35dc9aef57cc73b0911a",
|
||||
"build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/e2/50/52926d05dd5a3fb8b2f90992bfbe",
|
||||
"build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/20/de/02a2eca2e4ed2faf26fa492a1979",
|
||||
"build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/64/52/15d8c99a844ccb00b432621f79c0",
|
||||
"build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d0/c1/0732dd083548534a3772ef774be5",
|
||||
"build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/cd/35/d72bcc057bb6149be27855275892",
|
||||
"build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/38/84/3523f3bb5b2cbdcd20430f642750",
|
||||
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/26/53/940c8b5d8e10e18bab19fb595732",
|
||||
"build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2d/9e/c4674a1b86ebb7cf3a01edba4a35",
|
||||
"build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/29/85/af192102cd224f6fd59b03968f8f",
|
||||
"build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/d6/2b/e2f43aff52b03c89dba843f4902f",
|
||||
"build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/2d/cf/83894dab765d9e0ac3bd45009021",
|
||||
"build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/0b/35/eabf5e107be59cb1c53bc5529d73",
|
||||
"build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/3e/df/13c13021bdee744f619b7cb19eb5",
|
||||
"build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/10/71/0128643784c50dffb3d0461ad39a",
|
||||
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/3a/a5/c2d839a9e5de0e00df85e7a5ba41",
|
||||
"build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/23/6c/88b0d662ff4ae786da742b75500d",
|
||||
"build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/e2/e1/3adec175b7613134b2529b5c9f60",
|
||||
"build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/1e/16/888d82679e59b313fad06af5508d",
|
||||
"build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/8e/e7/01e25dc1bf3f535ab004b2824f27",
|
||||
"build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/ae/1e/a10c11048ee8892d4c5b28d1d62c",
|
||||
"build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/4f/e5/2b9e9726c394480fee642516d042",
|
||||
"build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/27/36/37ee9fd11ca48ad446b212968fba",
|
||||
"build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/eb/7c/cb523160cdb87dad92655c447228",
|
||||
"build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a5/28/95f617af770d055705d1097cf45c",
|
||||
"build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ec/6a/10da9bd0b47d95c44a607221921b",
|
||||
"build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/02/6f/6cf36d8f2944f2fb94d081dc82d9",
|
||||
"build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/07/83/a5c1227f34b2ae44f3bc1ceecd67",
|
||||
"build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/82/b1/0b645d636f4ee7d7ff9bacf814ae",
|
||||
"build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/0e/a5/912d3b654e189593d1e4b9fdca52",
|
||||
"build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/03/3e/4d27eaad6ed3030f49bf8c74ed06",
|
||||
"build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ec/b2/e4ff8cc0c49cb9d9ab0918a6a5da",
|
||||
"build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/dc/75/e7b770d4e45165e5ad06a004c4c1",
|
||||
"build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/2a/34/2e586ec4a223391153ed27652073",
|
||||
"build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/76/cd/00a38c08621bd003e5047922703e",
|
||||
"build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7d/8d/cbcdf9162fb8a479d7af7d841fc9",
|
||||
"build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/14/92/af8bb09fa5f1b3f0350348785469",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/9b/81/878fc1259b50ae541c028b585a3a",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/68/82/026977d4967136bd8f818817ebdf",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/98/0d/eeb6fff979f314692ac248964689",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/f3/c1/457d17a1ab26caeb3219efe76f73",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/25/3c/e4b656076fbdb48309eadd70ba33",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/b9/22/ea982f6a461388e68d39d07e5c0a",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/25/38/12fede37e7a02ccdad5f202af22e",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/72/a1/0cbb94439bc3904b50d230f931a0",
|
||||
"build/prefab/full/linux_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/a9/1c/6aa4561db543c8bd1c6ac0ed191c",
|
||||
"build/prefab/full/linux_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/fc/b2/13139abb29d39f64ccbeca109832",
|
||||
"build/prefab/full/linux_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/d7/aa/2cd907db860406441de7c07f16bf",
|
||||
"build/prefab/full/linux_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/c0/33/e4a7f47fa7444705f58b51173a02",
|
||||
"build/prefab/full/linux_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/66/1b/f5e985d4f08f2ad1751775d4ee59",
|
||||
"build/prefab/full/linux_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/54/90/8541ca87e759c9b10b95012680c1",
|
||||
"build/prefab/full/linux_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/5b/4e/c6ae548f05283c7243563a83e45e",
|
||||
"build/prefab/full/linux_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/7e/74/5006427104c0c06909c682f0157d",
|
||||
"build/prefab/full/mac_arm64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/e6/41/28cf9f3a03c8d2882fa9180b146b",
|
||||
"build/prefab/full/mac_arm64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/d7/bf/65031ed3ecac54706f7e44dde439",
|
||||
"build/prefab/full/mac_arm64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/ff/16/7b999d17b69878927063cd39be4c",
|
||||
"build/prefab/full/mac_arm64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/b1/7c/5f61da051f059c9236cfa0218cba",
|
||||
"build/prefab/full/mac_x86_64_gui/debug/ballisticacore": "https://files.ballistica.net/cache/ba1/6f/2e/7af2c0205b5ac0e39e4f9b85ce5a",
|
||||
"build/prefab/full/mac_x86_64_gui/release/ballisticacore": "https://files.ballistica.net/cache/ba1/cd/0a/6b1e52c98195320c32a97aad2806",
|
||||
"build/prefab/full/mac_x86_64_server/debug/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/1a/d6/75f31a1dd20ca28df2ab4cb6d8d1",
|
||||
"build/prefab/full/mac_x86_64_server/release/dist/ballisticacore_headless": "https://files.ballistica.net/cache/ba1/9f/87/fcdcb5c11854082ff2de9889d2b0",
|
||||
"build/prefab/full/windows_x86_gui/debug/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/4a/4c/4c2cfd4fc596ef0c7fe2875f7f1c",
|
||||
"build/prefab/full/windows_x86_gui/release/BallisticaCore.exe": "https://files.ballistica.net/cache/ba1/5a/8c/32c334faefbf3abf8d298bc2504f",
|
||||
"build/prefab/full/windows_x86_server/debug/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/9c/62/0b62071f2a10bbdb9f204033e1e3",
|
||||
"build/prefab/full/windows_x86_server/release/dist/BallisticaCoreHeadless.exe": "https://files.ballistica.net/cache/ba1/ab/e1/a6757da044ae2f1fc19c82e8bdda",
|
||||
"build/prefab/lib/linux_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/24/40/c2fb8cdbea5b58242c3b51b52d14",
|
||||
"build/prefab/lib/linux_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/20/4e/60e18e1b04c88e1cdd4a0836d710",
|
||||
"build/prefab/lib/linux_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/a4/1e/dbb500fc6af85da634aeeb81af3e",
|
||||
"build/prefab/lib/linux_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e1/4a/75c95d1e0a44e833b866f5a02cbd",
|
||||
"build/prefab/lib/linux_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/58/f2/5997aa7d771a67246ba55be7538d",
|
||||
"build/prefab/lib/linux_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/57/21/b34020e41aae91cd276efc77a9d2",
|
||||
"build/prefab/lib/linux_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/08/c3/cb7fbc13bc7aa3026f4363f6f1d6",
|
||||
"build/prefab/lib/linux_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/f3/54/5c6f3bfaa7feb59faf2a44945d38",
|
||||
"build/prefab/lib/mac_arm64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/ad/93/21d395043d633d70eef84502fd9f",
|
||||
"build/prefab/lib/mac_arm64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/33/83/67d6444edb230cfc3d9ad7c030be",
|
||||
"build/prefab/lib/mac_arm64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/e6/81/aff0232cd83ec62aa0ec10716568",
|
||||
"build/prefab/lib/mac_arm64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/5c/96/aa9f7ad96fa1f70ff80dbfaa6f7e",
|
||||
"build/prefab/lib/mac_x86_64_gui/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/aa/56/194ab27e57149fb6b253bf8d754d",
|
||||
"build/prefab/lib/mac_x86_64_gui/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/7e/1d/f330b35ca15bd654333a778b100d",
|
||||
"build/prefab/lib/mac_x86_64_server/debug/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/9a/5b/bcf80b7e94eb7bb1e949c41c58f8",
|
||||
"build/prefab/lib/mac_x86_64_server/release/libballisticacore_internal.a": "https://files.ballistica.net/cache/ba1/5e/bc/1a9f73dc64f3ffcc489aa58b6251",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/ea/4f/8e568645129f921392345e4b81a3",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/e6/0a/43f0c01db3245e332a6cbb2c04a6",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/7a/33/215327a641ff1d522d3554ec2577",
|
||||
"build/prefab/lib/windows/Debug_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/46/59/69428486eb6bb6ba752b37a31db1",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.lib": "https://files.ballistica.net/cache/ba1/97/d3/716990aa94a4378f91afe137c773",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreGenericInternal.pdb": "https://files.ballistica.net/cache/ba1/c4/fd/7532b2a98bf8c1b0ea68485a9d8e",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.lib": "https://files.ballistica.net/cache/ba1/0d/06/a6b7a7ca3834c8a05b538c5f1934",
|
||||
"build/prefab/lib/windows/Release_Win32/BallisticaCoreHeadlessInternal.pdb": "https://files.ballistica.net/cache/ba1/46/54/fdb879571df92b8636e880f66207",
|
||||
"src/ballistica/generated/python_embedded/binding.inc": "https://files.ballistica.net/cache/ba1/c0/32/b7907e3859a5c5013a3d97b6b523",
|
||||
"src/ballistica/generated/python_embedded/bootstrap.inc": "https://files.ballistica.net/cache/ba1/2d/4f/f4fe67827f36cd59cd5193333a02",
|
||||
"src/ballistica/generated/python_embedded/bootstrap_monolithic.inc": "https://files.ballistica.net/cache/ba1/ef/c1/aa5f1aa10af89f5c0b1e616355fd"
|
||||
|
||||
@ -1,4 +1,6 @@
|
||||
### 1.7.13 (build 20917, api 7, 2022-11-02)
|
||||
### 1.7.13 (build 20919, api 7, 2022-11-03)
|
||||
- Android target-sdk has been updated to 33 (Android 13). Please holler if anything seems broken or is behaving differently than before on Android.
|
||||
- Android back-button handling code had to be reworked a bit for sdk 33 (see https://developer.android.com/guide/navigation/predictive-back-gesture). Because of this, back buttons on gamepads or other special cases behave slightly differently, but hopefully still in a reasonable way. Please holler if you find otherwise.
|
||||
|
||||
### 1.7.12 (build 20914, api 7, 2022-10-18)
|
||||
- Disabled some live-objects warnings as it seems their use of certain gc module functionality might be causing some rare errors/crashes. On further inspection, it turns out that is technically expected. Basically those calls are useful for debugging but can break things. Added a note at the top of efro.debug elaborating on the situation. We can reimplement similar warnings later in a safe manner.
|
||||
|
||||
@ -1 +1 @@
|
||||
114683483191152240226942293819570296816
|
||||
144047512702782890975548019773691278470
|
||||
@ -233,8 +233,8 @@ class AccountV1Subsystem:
|
||||
|
||||
# We expose pro options if the server tells us to
|
||||
# (which is generally just when we own pro),
|
||||
# or also if we've been grandfathered in or are using ballistica-core
|
||||
# builds.
|
||||
# or also if we've been grandfathered in
|
||||
# or are using ballistica-core builds.
|
||||
return self.have_pro() or bool(
|
||||
_internal.get_v1_account_misc_read_val_2(
|
||||
'proOptionsUnlocked', False
|
||||
|
||||
@ -47,7 +47,7 @@ def bootstrap() -> None:
|
||||
|
||||
# Give a soft warning if we're being used with a different binary
|
||||
# version than we expect.
|
||||
expected_build = 20917
|
||||
expected_build = 20919
|
||||
running_build: int = env['build_number']
|
||||
if running_build != expected_build:
|
||||
print(
|
||||
|
||||
@ -13,6 +13,7 @@
|
||||
#include "ballistica/networking/networking.h"
|
||||
#include "ballistica/networking/telnet_server.h"
|
||||
#include "ballistica/python/python.h"
|
||||
#include "ballistica/ui/ui.h"
|
||||
|
||||
namespace ballistica {
|
||||
|
||||
@ -211,7 +212,7 @@ void AppFlavor::OnResume() {
|
||||
// If we've been completely backgrounded,
|
||||
// send a menu-press command to the game; this will
|
||||
// bring up a pause menu if we're in the game/etc.
|
||||
g_logic->PushMainMenuPressCall(nullptr);
|
||||
g_ui->PushMainMenuPressCall(nullptr);
|
||||
}
|
||||
}
|
||||
|
||||
@ -297,7 +298,7 @@ void AppFlavor::PushPurchaseAckCall(const std::string& purchase,
|
||||
[purchase, order_id] { g_platform->PurchaseAck(purchase, order_id); });
|
||||
}
|
||||
|
||||
void AppFlavor::PushPurchaseCall(const std::string& item) {
|
||||
auto AppFlavor::PushPurchaseCall(const std::string& item) -> void {
|
||||
thread()->PushCall([item] {
|
||||
assert(InMainThread());
|
||||
g_platform->Purchase(item);
|
||||
|
||||
@ -32,7 +32,7 @@
|
||||
namespace ballistica {
|
||||
|
||||
// These are set automatically via script; don't modify them here.
|
||||
const int kAppBuildNumber = 20917;
|
||||
const int kAppBuildNumber = 20919;
|
||||
const char* kAppVersion = "1.7.13";
|
||||
|
||||
// Our standalone globals.
|
||||
|
||||
@ -764,7 +764,7 @@ void Joystick::HandleSDLEvent(const SDL_Event* e) {
|
||||
} else {
|
||||
// If there's no menu up,
|
||||
// tell the game to pop it up and snag menu ownership for ourself.
|
||||
g_logic->PushMainMenuPressCall(this);
|
||||
g_ui->PushMainMenuPressCall(this);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@ -139,7 +139,7 @@ auto KeyboardInput::HandleKey(const SDL_Keysym* keysym, bool repeat, bool down)
|
||||
// Bring up menu if start is pressed.
|
||||
if (keysym->sym == start_key_ && !repeat && g_ui && g_ui->screen_root_widget()
|
||||
&& g_ui->screen_root_widget()->GetChildCount() == 0) {
|
||||
g_logic->PushMainMenuPressCall(this);
|
||||
g_ui->PushMainMenuPressCall(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -411,9 +411,7 @@ void KeyboardInput::UpdateMapping() {
|
||||
left_key_assigned_ = right_key_assigned_ = up_key_assigned_ =
|
||||
down_key_assigned_ = false;
|
||||
|
||||
int val;
|
||||
|
||||
val = g_python->GetControllerValue(this, "buttonJump");
|
||||
int val = g_python->GetControllerValue(this, "buttonJump");
|
||||
jump_key_ = (val == -1) ? jump_key_default : (SDL_Keycode)val;
|
||||
UpdateArrowKeys(jump_key_);
|
||||
|
||||
|
||||
@ -1050,36 +1050,6 @@ void Input::ProcessStressTesting(int player_count) {
|
||||
}
|
||||
}
|
||||
|
||||
void Input::HandleBackPress(bool from_toolbar) {
|
||||
assert(InLogicThread());
|
||||
|
||||
// This can come through occasionally before our UI is up it seems?
|
||||
// Just ignore in that case.
|
||||
if (g_ui == nullptr || g_ui->screen_root_widget() == nullptr
|
||||
|| g_ui->overlay_root_widget() == nullptr
|
||||
|| g_ui->root_widget() == nullptr) {
|
||||
// Log(LogLevel::kError, "HandleBackPress() called without main UI");
|
||||
return;
|
||||
}
|
||||
|
||||
// If there's no dialogs/windows up, ask for a menu (owned by the touch-input
|
||||
// if available).
|
||||
if (g_ui->screen_root_widget()->GetChildCount() == 0
|
||||
&& g_ui->overlay_root_widget()->GetChildCount() == 0) {
|
||||
g_logic->PushMainMenuPressCall(touch_input_);
|
||||
} else {
|
||||
if (from_toolbar) {
|
||||
// NOTE - this means the toolbar back button can never apply to overlay
|
||||
// widgets; is that ok?...
|
||||
g_ui->screen_root_widget()->HandleMessage(
|
||||
WidgetMessage(WidgetMessage::Type::kCancel));
|
||||
} else {
|
||||
g_ui->root_widget()->HandleMessage(
|
||||
WidgetMessage(WidgetMessage::Type::kCancel));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void Input::PushTextInputEvent(const std::string& text) {
|
||||
g_logic->thread()->PushCall([this, text] {
|
||||
mark_input_active();
|
||||
@ -1228,17 +1198,12 @@ void Input::HandleKeyPress(const SDL_Keysym* keysym) {
|
||||
// If there's no dialogs/windows up, ask for a menu (owned by the
|
||||
// touch-screen if available).
|
||||
if (g_ui->screen_root_widget()->GetChildCount() == 0) {
|
||||
g_logic->PushMainMenuPressCall(touch_input_);
|
||||
g_ui->PushMainMenuPressCall(touch_input_);
|
||||
}
|
||||
}
|
||||
handled = true;
|
||||
break;
|
||||
}
|
||||
case SDLK_AC_BACK: {
|
||||
HandleBackPress(false);
|
||||
handled = true;
|
||||
break;
|
||||
}
|
||||
|
||||
case SDLK_EQUALS:
|
||||
case SDLK_PLUS:
|
||||
@ -1286,7 +1251,7 @@ void Input::HandleKeyPress(const SDL_Keysym* keysym) {
|
||||
if (g_ui->screen_root_widget()->GetChildCount() == 0
|
||||
&& g_ui->overlay_root_widget()->GetChildCount() == 0) {
|
||||
if (keyboard_input_) {
|
||||
g_logic->PushMainMenuPressCall(keyboard_input_);
|
||||
g_ui->PushMainMenuPressCall(keyboard_input_);
|
||||
}
|
||||
} else {
|
||||
// Ok there's a UI up.. send along a cancel message.
|
||||
|
||||
@ -103,7 +103,6 @@ class Input {
|
||||
// something.
|
||||
auto HaveControllerWithPlayer() -> bool;
|
||||
auto HaveRemoteAppController() -> bool;
|
||||
auto HandleBackPress(bool from_toolbar) -> void;
|
||||
auto ProcessStressTesting(int player_count) -> void;
|
||||
auto keyboard_input() const -> KeyboardInput* { return keyboard_input_; }
|
||||
auto keyboard_input_2() const -> KeyboardInput* { return keyboard_input_2_; }
|
||||
|
||||
@ -731,28 +731,6 @@ auto Logic::GetForegroundContext() -> Context {
|
||||
}
|
||||
}
|
||||
|
||||
void Logic::PushBackButtonCall(InputDevice* input_device) {
|
||||
thread()->PushCall([this, input_device] {
|
||||
assert(InLogicThread());
|
||||
|
||||
// Ignore if UI isn't up yet.
|
||||
if (!g_ui || !g_ui->overlay_root_widget() || !g_ui->screen_root_widget()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If there's a UI up, send along a cancel message.
|
||||
if (g_ui->overlay_root_widget()->GetChildCount() != 0
|
||||
|| g_ui->screen_root_widget()->GetChildCount() != 0) {
|
||||
g_ui->root_widget()->HandleMessage(
|
||||
WidgetMessage(WidgetMessage::Type::kCancel));
|
||||
} else {
|
||||
// If there's no main screen or overlay windows, ask for a menu owned by
|
||||
// this device.
|
||||
MainMenuPress(input_device);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void Logic::PushStringEditSetCall(const std::string& value) {
|
||||
thread()->PushCall([value] {
|
||||
if (!g_ui) {
|
||||
@ -1119,15 +1097,6 @@ void Logic::PushToggleCollisionGeometryDisplayCall() {
|
||||
thread()->PushCall([] { g_graphics->ToggleDebugDraw(); });
|
||||
}
|
||||
|
||||
void Logic::PushMainMenuPressCall(InputDevice* device) {
|
||||
thread()->PushCall([this, device] { MainMenuPress(device); });
|
||||
}
|
||||
|
||||
void Logic::MainMenuPress(InputDevice* device) {
|
||||
assert(InLogicThread());
|
||||
g_python->HandleDeviceMenuPress(device);
|
||||
}
|
||||
|
||||
void Logic::PushScreenResizeCall(float virtual_width, float virtual_height,
|
||||
float pixel_width, float pixel_height) {
|
||||
thread()->PushCall([=] {
|
||||
|
||||
@ -42,12 +42,6 @@ class Logic {
|
||||
auto PushRemoveGraphicsServerRenderHoldCall() -> void;
|
||||
auto PushInterruptSignalCall() -> void;
|
||||
|
||||
/// Push a generic 'menu press' event, optionally associated with an
|
||||
/// input device (nullptr to specify none). Note: caller must ensure
|
||||
/// a RemoveInputDevice() call does not arrive at the logic thread
|
||||
/// before this one.
|
||||
auto PushMainMenuPressCall(InputDevice* device) -> void;
|
||||
|
||||
/// Notify the game of a screen-size change (used by the graphics server).
|
||||
auto PushScreenResizeCall(float virtual_width, float virtual_height,
|
||||
float physical_width, float physical_height)
|
||||
@ -96,7 +90,6 @@ class Logic {
|
||||
auto PushStringEditCancelCall() -> void;
|
||||
auto PushFriendScoreSetCall(const FriendScoreSet& score_set) -> void;
|
||||
auto PushShowURLCall(const std::string& url) -> void;
|
||||
auto PushBackButtonCall(InputDevice* input_device) -> void;
|
||||
auto PushOnAppResumeCall() -> void;
|
||||
auto PushFrameDefRequest() -> void;
|
||||
auto ChangeGameSpeed(int offs) -> void;
|
||||
@ -252,7 +245,6 @@ class Logic {
|
||||
auto InitSpecialChars() -> void;
|
||||
auto Draw() -> void;
|
||||
auto InitialScreenCreated() -> void;
|
||||
auto MainMenuPress(InputDevice* device) -> void;
|
||||
auto ScreenResize(float virtual_width, float virtual_height,
|
||||
float pixel_width, float pixel_height) -> void;
|
||||
auto GameServiceAchievementList(const std::set<std::string>& achievements)
|
||||
|
||||
@ -46,7 +46,7 @@ class PlatformApple : public Platform {
|
||||
-> bool override;
|
||||
auto ShowOnlineScoreUI(const std::string& show, const std::string& game,
|
||||
const std::string& game_version) -> void override;
|
||||
auto Purchase(const std::string& item) -> void override;
|
||||
auto DoPurchase(const std::string& item) -> void override;
|
||||
auto RestorePurchases() -> void override;
|
||||
auto NewAutoReleasePool() -> void* override;
|
||||
auto DrainAutoReleasePool(void* pool) -> void override;
|
||||
|
||||
@ -879,7 +879,22 @@ void Platform::ShowOnlineScoreUI(const std::string& show,
|
||||
Log(LogLevel::kError, "FIXME: ShowOnlineScoreUI() unimplemented");
|
||||
}
|
||||
|
||||
void Platform::Purchase(const std::string& item) {
|
||||
auto Platform::Purchase(const std::string& item) -> void {
|
||||
// We use alternate _c ids for consumables in some cases where
|
||||
// we originally used entitlements. We are all consumables now though
|
||||
// so we can purchase for different accounts.
|
||||
std::string item_filtered{item};
|
||||
if (g_buildconfig.amazon_build()) {
|
||||
if (item == "bundle_bones" || item == "bundle_bernard"
|
||||
|| item == "bundle_frosty" || item == "bundle_santa" || item == "pro"
|
||||
|| item == "pro_sale") {
|
||||
item_filtered = item + "_c";
|
||||
}
|
||||
}
|
||||
DoPurchase(item_filtered);
|
||||
}
|
||||
|
||||
auto Platform::DoPurchase(const std::string& item) -> void {
|
||||
// Just print 'unavailable' by default.
|
||||
g_python->PushObjCall(Python::ObjID::kUnavailableMessageCall);
|
||||
}
|
||||
|
||||
@ -249,7 +249,7 @@ class Platform {
|
||||
|
||||
#pragma mark IN APP PURCHASES --------------------------------------------------
|
||||
|
||||
virtual auto Purchase(const std::string& item) -> void;
|
||||
auto Purchase(const std::string& item) -> void;
|
||||
|
||||
// Restore purchases (currently only relevant on Apple platforms).
|
||||
virtual auto RestorePurchases() -> void;
|
||||
@ -510,6 +510,9 @@ class Platform {
|
||||
auto is_stdin_a_terminal() const { return is_stdin_a_terminal_; }
|
||||
|
||||
protected:
|
||||
/// Make a purchase.
|
||||
virtual auto DoPurchase(const std::string& item) -> void;
|
||||
|
||||
/// Are we being run from a terminal? (should we show prompts, etc?).
|
||||
virtual auto GetIsStdinATerminal() -> bool;
|
||||
|
||||
|
||||
@ -2151,7 +2151,7 @@ auto PyBackPress(PyObject* self, PyObject* args, PyObject* keywds)
|
||||
const_cast<char**>(kwlist))) {
|
||||
return nullptr;
|
||||
}
|
||||
g_input->HandleBackPress(true);
|
||||
g_ui->PushBackButtonCall(nullptr);
|
||||
Py_RETURN_NONE;
|
||||
BA_PYTHON_CATCH;
|
||||
}
|
||||
|
||||
@ -124,7 +124,7 @@ void RootUI::HandleMouseButtonUp(float x, float y) {
|
||||
}
|
||||
if ((g_graphics->screen_virtual_width() - x < menu_button_size_)
|
||||
&& (g_graphics->screen_virtual_height() - y < menu_button_size_)) {
|
||||
g_logic->PushMainMenuPressCall(input_device);
|
||||
g_ui->PushMainMenuPressCall(input_device);
|
||||
last_menu_button_press_time_ = GetRealTime();
|
||||
}
|
||||
}
|
||||
|
||||
@ -6,6 +6,7 @@
|
||||
#include "ballistica/assets/component/data.h"
|
||||
#include "ballistica/assets/component/sound.h"
|
||||
#include "ballistica/audio/audio.h"
|
||||
#include "ballistica/core/thread.h"
|
||||
#include "ballistica/generic/lambda_runnable.h"
|
||||
#include "ballistica/graphics/component/empty_component.h"
|
||||
#include "ballistica/input/device/input_device.h"
|
||||
@ -85,6 +86,36 @@ UI::~UI() {
|
||||
delete root_ui_;
|
||||
}
|
||||
|
||||
void UI::PushBackButtonCall(InputDevice* input_device) {
|
||||
g_logic->thread()->PushCall([this, input_device] {
|
||||
assert(InLogicThread());
|
||||
|
||||
// Ignore if UI isn't up yet.
|
||||
if (!overlay_root_widget() || !screen_root_widget()) {
|
||||
return;
|
||||
}
|
||||
|
||||
// If there's a UI up, send along a cancel message.
|
||||
if (overlay_root_widget()->GetChildCount() != 0
|
||||
|| screen_root_widget()->GetChildCount() != 0) {
|
||||
root_widget()->HandleMessage(WidgetMessage(WidgetMessage::Type::kCancel));
|
||||
} else {
|
||||
// If there's no main screen or overlay windows, ask for a menu owned by
|
||||
// this device.
|
||||
MainMenuPress(input_device);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
void UI::PushMainMenuPressCall(InputDevice* device) {
|
||||
g_logic->thread()->PushCall([this, device] { MainMenuPress(device); });
|
||||
}
|
||||
|
||||
void UI::MainMenuPress(InputDevice* device) {
|
||||
assert(InLogicThread());
|
||||
g_python->HandleDeviceMenuPress(device);
|
||||
}
|
||||
|
||||
auto UI::IsWindowPresent() const -> bool {
|
||||
return ((screen_root_widget_.exists() && screen_root_widget_->HasChildren())
|
||||
|| (overlay_root_widget_.exists()
|
||||
|
||||
@ -78,6 +78,8 @@ class UI : public ContextTarget {
|
||||
// Returns the input-device that currently owns the menu; otherwise nullptr.
|
||||
auto GetUIInputDevice() const -> InputDevice*;
|
||||
|
||||
auto PushBackButtonCall(InputDevice* input_device) -> void;
|
||||
|
||||
// Returns whether currently selected widgets should flash.
|
||||
// This will be false in some situations such as when only touch screen
|
||||
// control is active.
|
||||
@ -124,7 +126,14 @@ class UI : public ContextTarget {
|
||||
|
||||
auto scale() const { return scale_; }
|
||||
|
||||
/// Push a generic 'menu press' event, optionally associated with an
|
||||
/// input device (nullptr to specify none). Note: caller must ensure
|
||||
/// a RemoveInputDevice() call does not arrive at the logic thread
|
||||
/// before this one.
|
||||
auto PushMainMenuPressCall(InputDevice* device) -> void;
|
||||
|
||||
private:
|
||||
auto MainMenuPress(InputDevice* device) -> void;
|
||||
auto StepScene() -> void;
|
||||
RootUI* root_ui_{};
|
||||
millisecs_t next_prune_time_{};
|
||||
|
||||
@ -1108,12 +1108,7 @@ void RootWidget::SetOverlayWidget(StackWidget* w) {
|
||||
overlay_stack_widget_ = w;
|
||||
}
|
||||
|
||||
void RootWidget::OnCancelCustom() {
|
||||
// if we've got any toolbar buttons selected and hit cancel, flip back to the
|
||||
// main screen stack SelectWidget(screen_stack_widget_); cout << "ROOT CUSTOM
|
||||
// CANCEL" << endl;
|
||||
g_input->HandleBackPress(true);
|
||||
}
|
||||
void RootWidget::OnCancelCustom() { g_ui->PushBackButtonCall(nullptr); }
|
||||
|
||||
auto RootWidget::GetSpecialWidget(const std::string& s) const -> Widget* {
|
||||
if (s == "party_button") {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user