diff --git a/.efrocachemap b/.efrocachemap index 1a8ce3af..20fbefbd 100644 --- a/.efrocachemap +++ b/.efrocachemap @@ -4072,26 +4072,26 @@ "build/assets/workspace/ninjafightplug.py": "https://files.ballistica.net/cache/ba1/c5/09/4f10b8a21ba87aa5509cff7a164b", "build/assets/workspace/onslaughtplug.py": "https://files.ballistica.net/cache/ba1/ff/0a/a354984f9c074dab0676ac7e4877", "build/assets/workspace/runaroundplug.py": "https://files.ballistica.net/cache/ba1/2a/1c/9ee5db6d1bceca7fa6638fb8abde", - "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/22/bb/d5dce7f90a2e2f87549b6a7eecaa", - "build/prefab/full/linux_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/a2/96/c13dfed4e1d4be509fe72cf7c314", - "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/95/a3/bb1bf77e376a94b2131550db2dad", - "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/a9/a6/c483cbf9e8b61038b2fe88c4c42a", - "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/9a/14/89284125966308f437b64f5084d7", - "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/69/1f/2d6454eddcb455c7d705f6393027", - "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/e1/fa/bbbc8fef4e36f0f297c010010d82", - "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/d3/0c/5b6a7b836748e0efe640527851ff", - "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/3a/a9/fabf92aae1ee3a9013a7bdd861f0", - "build/prefab/full/mac_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/d4/4f/c6c6c60cd17a7c83a947126ae37d", - "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/83/0e/b2ff5bc9205c79645fbad2763ca4", - "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/c6/66/45ac0b0a0d22c3eb33a96144336b", - "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/31/15/e7bff599483e5bfbac3d78e7e7b5", - "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/e7/61/dd5fe09a41835aac73ba8f669184", - "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/be/17/2bc120813d6b2dc7e9381e680e88", - "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/b8/9e/96eee674cbcfdad7d58953840b05", - "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/e8/27/8dfe45ee42fe20dd2b1fb3b48428", - "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/bb/86/9fca7226049258bd2576cc71a227", - "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/77/9a/96e5cadd06ba0d0247ce258a0c3d", - "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/6a/c9/0eebb41928d1ea8f7b4cb564b93d", + "build/prefab/full/linux_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/9b/4f/4e0cda3e603e21acfb43d287b669", + "build/prefab/full/linux_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/0e/4b/a4b6e7b071c1cd3a3779d0b6e4fb", + "build/prefab/full/linux_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/19/13/76819a86e4bff66c3a44d12923f7", + "build/prefab/full/linux_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/70/8f/798f9addd16ec93ba2c11a47181f", + "build/prefab/full/linux_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/72/a7/45f9b730780dde9caf3ccae41747", + "build/prefab/full/linux_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/fb/b9/2bc33e282e8269b63b0924e55d3d", + "build/prefab/full/linux_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/11/5b/422794fc9435be92944d387c36ed", + "build/prefab/full/linux_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/3d/f4/8a05ae4ba677c014a871823f91f9", + "build/prefab/full/mac_arm64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/9d/00/2c6819e79bd63ce48e4f793536ec", + "build/prefab/full/mac_arm64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/68/c1/dbb603418a5e395647c6853216a6", + "build/prefab/full/mac_arm64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/97/c1/1b0f8ec389c0529099935d3b4a20", + "build/prefab/full/mac_arm64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/c1/00/9cee11c75b5c241457abc1c47164", + "build/prefab/full/mac_x86_64_gui/debug/ballisticakit": "https://files.ballistica.net/cache/ba1/7a/11/0818fd8a38fa15d43b8423aca130", + "build/prefab/full/mac_x86_64_gui/release/ballisticakit": "https://files.ballistica.net/cache/ba1/ae/98/2db72c172834f376b6ac6d64a89a", + "build/prefab/full/mac_x86_64_server/debug/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/d1/83/c81288bded2f4fa4610780d1f56c", + "build/prefab/full/mac_x86_64_server/release/dist/ballisticakit_headless": "https://files.ballistica.net/cache/ba1/23/dc/c11c6c4a0af25f5290b68932d8e7", + "build/prefab/full/windows_x86_gui/debug/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/6f/7b/0d824afadfad442dcd44ab672b46", + "build/prefab/full/windows_x86_gui/release/BallisticaKit.exe": "https://files.ballistica.net/cache/ba1/1d/12/9f6b41c5221f62b34f8124b6cd3d", + "build/prefab/full/windows_x86_server/debug/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/ec/76/4cd926a68302779c4c1cf2859bb3", + "build/prefab/full/windows_x86_server/release/dist/BallisticaKitHeadless.exe": "https://files.ballistica.net/cache/ba1/93/26/8ad5b9ebe9715e4c3eddc4412f42", "build/prefab/lib/linux_arm64_gui/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/d4/6a/dd303a200b98a56ba3b100277057", "build/prefab/lib/linux_arm64_gui/release/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/fc/2c/2996c558fb408a548fdd37398c9a", "build/prefab/lib/linux_arm64_server/debug/libballistica_plus.a": "https://files.ballistica.net/cache/ba1/ed/28/b7a72be7ae1bd2b58dda4b6902a0", diff --git a/CHANGELOG.md b/CHANGELOG.md index 597fe9c1..547161cf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -### 1.7.20 (build 21035, api 8, 2023-06-01) +### 1.7.20 (build 21036, api 8, 2023-06-01) - This seems like a good time for a `refactoring` release in anticipation of changes coming in 1.8. Basically this means that a lot of things will be diff --git a/src/assets/ba_data/python/baenv.py b/src/assets/ba_data/python/baenv.py index 5fb29ad2..f6714e27 100644 --- a/src/assets/ba_data/python/baenv.py +++ b/src/assets/ba_data/python/baenv.py @@ -30,7 +30,7 @@ if TYPE_CHECKING: # Build number and version of the ballistica binary we expect to be # using. -TARGET_BALLISTICA_BUILD = 21035 +TARGET_BALLISTICA_BUILD = 21036 TARGET_BALLISTICA_VERSION = '1.7.20' _g_env_config: EnvConfig | None = None diff --git a/src/ballistica/base/input/device/joystick_input.cc b/src/ballistica/base/input/device/joystick_input.cc index cca5c4a0..1e544227 100644 --- a/src/ballistica/base/input/device/joystick_input.cc +++ b/src/ballistica/base/input/device/joystick_input.cc @@ -8,13 +8,12 @@ #include "ballistica/base/graphics/renderer/renderer.h" #include "ballistica/base/input/input.h" #include "ballistica/base/python/base_python.h" +#include "ballistica/base/support/classic_soft.h" #include "ballistica/base/ui/ui.h" -#include "ballistica/classic/python/classic_python.h" #include "ballistica/core/core.h" #include "ballistica/shared/foundation/event_loop.h" #include "ballistica/shared/python/python.h" #include "ballistica/shared/python/python_command.h" -#include "ballistica/ui_v1/support/root_ui.h" #include "ballistica/ui_v1/widget/container_widget.h" namespace ballistica::base { @@ -990,21 +989,14 @@ void JoystickInput::HandleSDLEvent(const SDL_Event* e) { || e->jbutton.button == back_button_) { wm = WidgetMessage::Type::kCancel; } else { - // FIXME: Need a call we can make for this. - bool do_party_button = false; - int party_size = g_base->app_mode()->GetPartySize(); - if (party_size > 1 || g_base->app_mode()->HasConnectionToHost() - || g_base->ui->root_ui()->always_draw_party_icon()) { - do_party_button = true; - } - // Toggle the party UI if we're pressing the party button. // (currently don't allow remote to do this.. need to make it // customizable) - if (do_party_button && e->jbutton.button == pickup_button_ + if (g_base->ui->PartyIconVisible() + && e->jbutton.button == pickup_button_ && (!IsRemoteControl())) { pass = false; - g_base->ui->root_ui()->ActivatePartyIcon(); + g_base->ui->ActivatePartyIcon(); break; } wm = WidgetMessage::Type::kActivate; diff --git a/src/ballistica/base/support/ui_v1_soft.h b/src/ballistica/base/support/ui_v1_soft.h index 34eb0ccc..12f74705 100644 --- a/src/ballistica/base/support/ui_v1_soft.h +++ b/src/ballistica/base/support/ui_v1_soft.h @@ -21,6 +21,8 @@ class UIV1SoftInterface { virtual void DoQuitWindow() = 0; virtual auto NewRootUI() -> ui_v1::RootUI* = 0; virtual auto MainMenuVisible() -> bool = 0; + virtual auto PartyIconVisible() -> bool = 0; + virtual void ActivatePartyIcon() = 0; }; } // namespace ballistica::base diff --git a/src/ballistica/base/ui/ui.cc b/src/ballistica/base/ui/ui.cc index d0cd6bc8..434466cf 100644 --- a/src/ballistica/base/ui/ui.cc +++ b/src/ballistica/base/ui/ui.cc @@ -100,6 +100,18 @@ auto UI::MainMenuVisible() -> bool { return false; } +auto UI::PartyIconVisible() -> bool { + if (g_base->HaveUIV1()) { + return g_base->ui_v1()->PartyIconVisible(); + } + return false; +} + +void UI::ActivatePartyIcon() { + if (g_base->HaveUIV1()) { + g_base->ui_v1()->ActivatePartyIcon(); + } +} void UI::PushBackButtonCall(InputDevice* input_device) { g_base->logic->event_loop()->PushCall([this, input_device] { assert(g_base->InLogicThread()); diff --git a/src/ballistica/base/ui/ui.h b/src/ballistica/base/ui/ui.h index 403b52f3..7c5cd7f1 100644 --- a/src/ballistica/base/ui/ui.h +++ b/src/ballistica/base/ui/ui.h @@ -61,6 +61,8 @@ class UI { void ConfirmQuit(); auto MainMenuVisible() -> bool; + auto PartyIconVisible() -> bool; + void ActivatePartyIcon(); // Return the root widget containing all windows & dialogs // Whenever this contains children, the UI is considered to be in focus diff --git a/src/ballistica/shared/ballistica.cc b/src/ballistica/shared/ballistica.cc index 4a6e9e3e..e39a1466 100644 --- a/src/ballistica/shared/ballistica.cc +++ b/src/ballistica/shared/ballistica.cc @@ -39,7 +39,7 @@ auto main(int argc, char** argv) -> int { namespace ballistica { // These are set automatically via script; don't modify them here. -const int kEngineBuildNumber = 21035; +const int kEngineBuildNumber = 21036; const char* kEngineVersion = "1.7.20"; auto MonolithicMain(const core::CoreConfig& core_config) -> int { diff --git a/src/ballistica/ui_v1/ui_v1.cc b/src/ballistica/ui_v1/ui_v1.cc index a3602d48..24c332d8 100644 --- a/src/ballistica/ui_v1/ui_v1.cc +++ b/src/ballistica/ui_v1/ui_v1.cc @@ -2,6 +2,7 @@ #include "ballistica/ui_v1/ui_v1.h" +#include "ballistica/base/app/app_mode.h" #include "ballistica/base/ui/ui.h" #include "ballistica/ui_v1/python/ui_v1_python.h" #include "ballistica/ui_v1/support/root_ui.h" @@ -80,4 +81,19 @@ bool UIV1FeatureSet::MainMenuVisible() { || (overlay_root && overlay_root->HasChildren())); } +bool UIV1FeatureSet::PartyIconVisible() { + int party_size = g_base->app_mode()->GetPartySize(); + if (party_size > 1 || g_base->app_mode()->HasConnectionToHost() + || g_base->ui->root_ui()->always_draw_party_icon()) { + return true; + } + return false; +} + +void UIV1FeatureSet::ActivatePartyIcon() { + if (auto* root_ui = g_base->ui->root_ui()) { + root_ui->ActivatePartyIcon(); + } +} + } // namespace ballistica::ui_v1 diff --git a/src/ballistica/ui_v1/ui_v1.h b/src/ballistica/ui_v1/ui_v1.h index 6998cd09..c5ce10b4 100644 --- a/src/ballistica/ui_v1/ui_v1.h +++ b/src/ballistica/ui_v1/ui_v1.h @@ -59,6 +59,8 @@ class UIV1FeatureSet : public FeatureSetNativeComponent, void DoQuitWindow() override; auto NewRootUI() -> ui_v1::RootUI* override; auto MainMenuVisible() -> bool override; + auto PartyIconVisible() -> bool override; + void ActivatePartyIcon() override; UIV1Python* const python;