comparison gui.lua @ 99:966d06c8d9c9

- Brought plugin handling code up to date. SVs are kept in DB namespaces like they should have been. - Removed/commented all datarev code, until it becomes necessary after MoP. - Textgen special blocks for plugins do not automatically get a "reset&reload" button anymore. - New method to register option pages on the main tab. No sub-entry pages supported yet. Titles and reset&reload added here instead.
author Farmbuyer of US-Kilrogg <farmbuyer@gmail.com>
date Sun, 29 Jul 2012 23:12:18 +0000
parents b5a55c69ef67
children a57133ee3c9b
comparison
equal deleted inserted replaced
98:b5a55c69ef67 99:966d06c8d9c9
1535 g_generated[pos] = nil 1535 g_generated[pos] = nil
1536 addon:Print("'%s' has been regenerated.", gui.tabtexts[text_kind].title) 1536 addon:Print("'%s' has been regenerated.", gui.tabtexts[text_kind].title)
1537 return addon:redisplay() 1537 return addon:redisplay()
1538 end) 1538 end)
1539 specials:AddChild(w) 1539 specials:AddChild(w)
1540 if addon:get_plugin(text_kind) then
1541 local pname = addon:get_plugin(text_kind):GetName()
1542 w = mkbutton("Reset SVs & ReloadUI",
1543 ([[<DEBUG:> Reset savedvariables for %s plugin back to defaults, and trigger a UI reload.]]):format(pname))
1544 w:SetFullWidth(true)
1545 w:SetCallback("OnClick", function(_w)
1546 _G['OuroLoot'..pname..'_opts'] = nil
1547 ReloadUI()
1548 end)
1549 specials:AddChild(w)
1550 end
1551 _populate_text_specials (box, specials, mkbutton, text_kind) 1540 _populate_text_specials (box, specials, mkbutton, text_kind)
1552 end 1541 end
1553 1542
1554 1543
1555 -- Tab 4: History 1544 -- Tab 4: History