Ahh. Well, it's already possible to use custom controls. Why not use a similar system for library options?
First, we'd need to identify what LAM's settable options would be. Then, do something in LibAddonMenu-2.0.lua like:
Lua Code:
lam.options = lam.options or {
isBorderVisible = false,
useStylizedLeftPanelBackground = true,
option3 = val,
option4 = otherVal,
}
function lam:RegisterOption(key, value)
if lam.options[key] then lam.options[key] = value end
end
The values in the options table could then be used instead of hard-coded values. I imagine some kind of refresh or reinitialization would need to be performed too.
Then you could distribute options addons dependent on LAM-2.0 rather than redistributing the whole library in different forms (and then having to maintain all of them when things need fixing).
LAM-2.0_classic.lua
Lua Code:
local LAM = LibStub("LibAddonMenu-2.0")
LAM:RegisterOption("isBorderVisible", true)
LAM:RegisterOption("useStylizedLeftPanelBackground", false)
It's late and I kinda feel like I'm rambling
I'll come back after some sleep.
edit: this was in response to votan. sirisidiator snuck in while I was typing haha.