Mercurial > wow > ouroloot
diff gui.lua @ 58:59718ec80610
Consolidate some common code out of modules.
author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
---|---|
date | Tue, 17 Apr 2012 06:26:11 +0000 |
parents | 81d5449621f8 |
children | 1cbaa1ce8253 |
line wrap: on
line diff
--- a/gui.lua Tue Apr 17 04:57:06 2012 +0000 +++ b/gui.lua Tue Apr 17 06:26:11 2012 +0000 @@ -1173,6 +1173,17 @@ --return tabs_OnGroupSelected_func(container,"OnGroupSelected",text_kind) end) specials:AddChild(w) + if addon:is_plugin(text_kind) then + local pname = addon:is_plugin(text_kind):GetName() + w = mkbutton("Reset SVs & ReloadUI", + ([[+DEBUG:> Reset savedvariables for %s plugin back to defaults, and trigger a UI reload.]]):format(pname)) + w:SetFullWidth(true) + w:SetCallback("OnClick", function(_w) + _G['OuroLoot'..pname..'_opts'] = nil + ReloadUI() + end) + specials:AddChild(w) + end _populate_text_specials (box, specials, mkbutton, text_kind) end