Skip to content

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