I'm trying to retrieve the current selected/saved index of my AutoConnectSelect
Right now i'm creating a type that reads the saved json:
AutoConnectSelect& bright = settingsAux["scr_brightness"].as<AutoConnectSelect>();
How can i get the index of the element selected in bright
as an integer?
bright.value
and bright.value()
are both invalid in this context.
Any help or insight into how these types work would be appreciated.
1 Answer 1
The member i was looking for is AutoConnectSelect.selected
I just subtract the value by one to get the index, as .selected
starts from 1.
bright.selected
and see what that does.