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)
[x] 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
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