From d7fe64fbdbf0f237b1e564458f7c72f2deb05cb8 Mon Sep 17 00:00:00 2001 From: Death Killer <884052+deathkiller@users.noreply.github.com> Date: Tue, 26 Nov 2024 00:04:06 +0100 Subject: [PATCH] Fixed build --- Sources/Jazz2/UI/Menu/HighscoresSection.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Sources/Jazz2/UI/Menu/HighscoresSection.cpp b/Sources/Jazz2/UI/Menu/HighscoresSection.cpp index 9ab359b6..854f2d62 100644 --- a/Sources/Jazz2/UI/Menu/HighscoresSection.cpp +++ b/Sources/Jazz2/UI/Menu/HighscoresSection.cpp @@ -61,6 +61,13 @@ namespace Jazz2::UI::Menu if (waitingForInput) { UpdatePressedActions(); +#if defined(DEATH_TARGET_ANDROID) + if (_root->ActionHit(PlayerActions::ChangeWeapon)) { + _root->PlaySfx("MenuSelect"_s, 0.5f); + auto& app = static_cast(theApplication()); + app.ToggleSoftInput(); + } else +#endif if (_root->ActionHit(PlayerActions::Menu) || _root->ActionHit(PlayerActions::Run) || IsTextActionHit(TextAction::Escape)) { _root->PlaySfx("MenuSelect"_s, 0.5f); _waitForInput = false; @@ -75,7 +82,7 @@ namespace Jazz2::UI::Menu _waitForInput = false; SerializeToFile(); } - } else if (_root->ActionHit(PlayerActions::ChangeWeapon) || IsTextActionHit(TextAction::Backspace)) { + } else if (IsTextActionHit(TextAction::Backspace)) { auto& selectedItem = _items[_selectedIndex]; if (_textCursor > 0) { auto [_, prevPos] = Utf8::PrevChar(selectedItem.Item->PlayerName, _textCursor); @@ -306,8 +313,10 @@ namespace Jazz2::UI::Menu float y = event.pointers[pointerIndex].y * (float)viewSize.Y; #if defined(DEATH_TARGET_ANDROID) if (x < 0.2f && y < 80.0f) { + _root->PlaySfx("MenuSelect"_s, 0.5f); auto& app = static_cast(theApplication()); app.ToggleSoftInput(); + return; } else #endif if (y >= 80.0f && std::abs(x - 0.5f) > 0.35f) {