Local variables inside local functions are only known to this function!
If you want to have the value of some variable inside your addon you need to define it local in your addon, outside functions.
Otherwise you need to define it global inside or outside a function, and it will be known outside your addon as well then.
To change the backdrop size you'll need to react on "when a module is added/removed":
-Your backdrop control got a name so use it with WINDOW_MANAGER:GetControlByName("your backdrop's name", "")
-Store this in a vraible like myBackdrop
-use myBackdrop:SetWidth(myNewWidth)
myNewWidth should be changed by the width of all the modules you have added
|