sirinsidiator / ESO-LibAddonMenu

http://www.esoui.com/downloads/info7-LibAddonMenu.html
Artistic License 2.0
41 stars 20 forks source link

iconpicker.lua #131

Closed Baertram closed 2 months ago

Baertram commented 1 year ago

Added data entry: -useIndex = false, --boolean or function returning a boolean. If true: The setFunc/getFunc will use/return the index of the table choices. If false: The functions will use/return the texturePath value of table choices (optional)

sirinsidiator commented 3 months ago

I'm not really a fan of the idea of using indices as save values, since they can change at any time when the author adds or reorganizes the choices. Maybe instead of adding this flag, you could change the request to add a choicesValues table similar to how it's done in the dropdown? That would be more flexible and if someone really wants to use indices, they can just dump them into the table via a loop.

Baertram commented 2 months ago

Okay, I think I tried to work on that choicesValues before (not sure if it was at this widget ;) ) and had some difficulties. Will give it another try then some day. I'll close this pull request then and send a new one some day.