Skip to content

Add multiplier lock functionality with double-click/hold gestures#84

Open
devalgupta404 wants to merge 7 commits intoda-Kai:developfrom
devalgupta404:1st
Open

Add multiplier lock functionality with double-click/hold gestures#84
devalgupta404 wants to merge 7 commits intoda-Kai:developfrom
devalgupta404:1st

Conversation

@devalgupta404
Copy link
Contributor

Lock multiplier with double click #37

Description

Implements the requested feature to allow locking the multiplier field with double-click or hold gestures, preventing it from automatically resetting to x1 after each numeric keypad entry.

Changes Made

  • Added lock state tracking: New isMultiplierLocked boolean to track locked state
  • Enhanced multiplier buttons: Added double-click and long-press gesture detection
  • Modified hit button behavior: Only reset multiplier to x1 when not locked
  • Visual feedback: Locked multipliers show with orange background and bold text
  • Toggle functionality: Double-click or long-press toggles lock state

Behavior

  • Single click on number buttons: Reset multiplier to x1 (unless locked)
  • Single click on multiplier buttons: Change multiplier for next throw
  • Double-click/long-press on multiplier buttons: Lock/unlock the multiplier
  • Locked multipliers: Persist across multiple number button clicks

Fixes #37

@codecov
Copy link

codecov bot commented Oct 22, 2025

Codecov Report

❌ Patch coverage is 94.73684% with 3 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop      #84      +/-   ##
===========================================
+ Coverage    86.48%   86.72%   +0.24%     
===========================================
  Files           26       26              
  Lines         1561     1612      +51     
===========================================
+ Hits          1350     1398      +48     
- Misses         211      214       +3     

@devalgupta404
Copy link
Contributor Author

@da-Kai anything else to change??

@da-Kai
Copy link
Owner

da-Kai commented Oct 24, 2025

@da-Kai anything else to change??

Hi @devalgupta404,
thanks for your contribution. 👍
I will test it later today and merge if it works as intended.

@da-Kai
Copy link
Owner

da-Kai commented Oct 24, 2025

Hi @devalgupta404

Here are some things i noticed:

  • The orange color for the lock only works on "x1"
  • If I select a different multiplier while the lock is enabled, the lock switches to that multiplier instead of being released
  • I also noticed a delay when switching between multipliers

@devalgupta404
Copy link
Contributor Author

@da-Kai please review it

@da-Kai da-Kai self-requested a review October 27, 2025 19:31
@da-Kai
Copy link
Owner

da-Kai commented Oct 27, 2025

Hi @devalgupta404

Fixed:

  • Orange color, for locked button now works

Errors:

  • Over one second delay, on switching between multipliers
  • They original gray color for a "normal" select is now missing
  • Clicking on a different multiplier still does not unlock

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Lock multiplier with double click

2 participants