Skip to content

Commit

Permalink
Fixed build
Browse files Browse the repository at this point in the history
  • Loading branch information
deathkiller committed Nov 25, 2024
1 parent 6a0ca99 commit d7fe64f
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion Sources/Jazz2/UI/Menu/HighscoresSection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<AndroidApplication&>(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;
Expand All @@ -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);
Expand Down Expand Up @@ -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<AndroidApplication&>(theApplication());
app.ToggleSoftInput();
return;
} else
#endif
if (y >= 80.0f && std::abs(x - 0.5f) > 0.35f) {
Expand Down

0 comments on commit d7fe64f

Please sign in to comment.