Skip to content

feat: activate slide via long press on jump button (mobile) - #62

Merged
theghost1980 merged 1 commit into
mainfrom
codex/add-long-press-activation-for-slide-max
Feb 8, 2026
Merged

theghost1980 merged 1 commit into
mainfrom
codex/add-long-press-activation-for-slide-max

Conversation

@saturnoTest

Copy link
Copy Markdown
Member

Motivation

  • Add a mobile-only long-press on the jump button to trigger Slide Max while ensuring a short tap still performs a normal jump.
  • Prevent long-press from firing when slide is already active or when fish power is not full (must be 4/4).
  • Provide clear visual feedback during press and on slide activation, and avoid accidental jump execution after a long press.

Description

  • Introduced mobile input constants for jump visuals and long-press timing: MOBILE_JUMP_BUTTON_ALPHA, MOBILE_JUMP_BUTTON_PRESSED_ALPHA, MOBILE_JUMP_LONG_PRESS_MS, MOBILE_JUMP_PULSE_SCALE, and MOBILE_JUMP_PULSE_DURATION_MS.
  • Added long-press state fields: jumpPressStartTime, jumpLongPressTriggered, jumpLongPressTimeout, and jumpPointerId, and wired them into mobile jump button handlers.
  • Reworked jumpButtonHitbox handlers so pointerdown starts a conditional delayedCall to trigger Slide Max (only when fishPowerCount === FISH_MAX_POWER and !slideActive), pointerup/pointerout cancel the timer and only call handleJumpButtonTap() if a long-press did not trigger, and timers/states are cleaned up on control destroy.
  • Added visual helper functions setJumpButtonPressedVisual(), resetJumpButtonVisual(), playJumpButtonPulse(), clearJumpLongPressTimer(), and resetJumpLongPressState() to implement soft press feedback and a pulse when slide activates.

Testing

  • Ran npm run typecheck and it completed successfully.
  • Ran npm run build (TypeScript build + vite build) and it completed successfully.
  • Launched the dev server and executed an automated Playwright script to capture a mobile-sized screenshot of the UI, which ran successfully.

Codex Task

@saturnoTest
saturnoTest requested a review from a team February 8, 2026 02:16
@theghost1980
theghost1980 merged commit 117413f into main Feb 8, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants