Open sirinsidiator opened 8 years ago
I see one usage for this
Then, implementation.
We could add another option in the setting itself.
shouldDisplay = functionName,
functionName will be a function
Or we can set the shouldDisplay on anotherControl value
I'm not really fan since function() return db.anotherSetting end
is really easy to do.
Or add another option in panel
hideDisabledControls =true,
In both cases if doing this, we should consider hiding the parent submenu if all controls are hidden.
+1 on this I can't see hiding a control being necessary for much of anything else except guild related items. Nothing else is dynamic enough to need it (unless there's an option related to an achievement or leveled skill, but I think those are extreme fringe cases).
Hide group if all hidden, great idea. Can see it being very useful.
Rebuilding whole menu does work. Just means breaking down the component parts of your menu into manageable chunks, and then making it be rebuilt whenever "some criteria" is met.
Another usecase would be to hide the complete panel until all of it controls were created. Currently I need to achieve this via the LAM callbacks, and it often fails (I do not why it does not work properly all the time).
So I'd like to add to the request that we could hide the total LAM panel (except maybe the headline with the name, donations, website links etc.) and show a "loading texture" until all controls were created.
Addons using a lot of dynamically added controls sometimes load a very long time and if users already open submenus etc. the controls might be missplaced or wrong. Maybe even use LibAsync to create all the controls to strip client lags as all the dynamically created controls load.
uladz requested a feature to temporarily hide a control from a settings panel.