Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RhythmRuler: wheel navigation for number selection #4274

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

MostlyKIGuess
Copy link
Member

@MostlyKIGuess MostlyKIGuess commented Jan 14, 2025

Summary:

Enhance RhythmRuler by implementing wheel navigation for number selection.

Changes:

How to Use:

  • The menu closes when the user clicks anywhere outside the pie chart. User can enter the values inside the input bar given, it will strictly be maintained within 2-128 as well.
  • Screenshots:
    image
    image

@MostlyKIGuess
Copy link
Member Author

@pikurasa do review.

@walterbender
Copy link
Member

This is nice, although the numbers are a bit oversized relative to other interface elements.
Also, if you hit enter while updating the number in the center, it runs the project. (We should disable running the project when the piemenu is open.)

@MostlyKIGuess
Copy link
Member Author

@walterbender In this commit, I have added code for menu removing on selecting a option and after pressing enter, preventDefault should not let the music play, I can't figure out how to stop that, could you please guide on what else can I do.

For decreasing/increasing the size we can change the code from:

            const wheelNav = new wheelnav('wheelDivptm', null, 150, 150);
            wheelNav.navItemsSize = 30; 

@walterbender
Copy link
Member

It seems to be a regression in the master branch as well. We might have to intervene where the keyboard shortcuts are handled in activity.js -- don't process the shortcut keys if a widget is open (with the exception of the status widget and the oscilloscope widget).

@walterbender
Copy link
Member

Meanwhile, I still recommend using piemenuNumber()

@MostlyKIGuess
Copy link
Member Author

Meanwhile, I still recommend using piemenuNumber()

Issue with that is, there are a lot of type errors I was facing and after fixing all of them , it's just too complex for this task.

@sahilkkc01
Copy link
Contributor

sahilkkc01 commented Jan 23, 2025

@walterbender The piemenuNumber function is designed specifically for the Block class, as it relies on properties that RhythmRuler lacks. Calling piemenuNumber(this, [1, 2, ....], this.value); works for Block but not for RhythmRuler, leading to errors or unexpected behavior.

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.

3 participants