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

Improve dynamic text #17

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

MarcelRobitaille
Copy link

Currently, if you want to add a menu item, you have to update the offset of the sound option in the menu_custom callback. This is complicated and confusing for newcomers. Instead, it's possible to make it so the 0th element of the menu entry is either text or a reference to a function. In the latter case, the function is called and the returned text is displayed. Like this, it's possible to define a simple function that only has to care about what text it should display, not about the (manually updated) index at which the text should be displayed.

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.

1 participant