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

possibility to add numbers to the options displayed text & select opt… #269

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

Conversation

praschl
Copy link

@praschl praschl commented Feb 13, 2024

This commit adds the possibility to give each option a number, like
"1. Yes sure"
"2. Maybe"
"3. No definitly not"

The numbers are generated automatically for available options, when the addNumbersToOptions flag is true.

It also adds two methods that can be used to simulate the selection of the options by code. I am using it like this in my project where I have the "New Input System" set up so the user can press 1-5 on the keyboard to select an option. This will not click the buttons, so I need a way to select them by code when the key is pressed. The second method always selects the last displayed option.

If this is a change you would accept, I will also write the required tests, docs etc, before you actually merge it, of course.
Just want to make sure the feature itself (and its implementation) is acceptable before I go through that :-)

regards,
Michael

  • Tests for the changes have been added (for bug fixes / features)
    • Does it pass all existing unit tests without modification?
      • If not, what did you change?
      • If you altered it significantly, what coverage issue did you fix?
  • Docs have been added / updated (for bug fixes / features)
  • CHANGELOG.md has been updated to describe this change

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