Mercurial > wow > hansgar_and_franzok_assist
comparison Libs/DF/addon.lua @ 20:dc1c77254f80
- added close button to users panel.
- framework update.
| author | Tercio |
|---|---|
| date | Tue, 11 Aug 2015 12:46:46 -0300 |
| parents | 680465749fc7 |
| children | 0682d738499b |
comparison
equal
deleted
inserted
replaced
| 19:215f0dd37a6c | 20:dc1c77254f80 |
|---|---|
| 1 | 1 |
| 2 local DF = _G ["DetailsFramework"] | 2 local DF = _G ["DetailsFramework"] |
| 3 local _ | 3 local _ |
| 4 | 4 |
| 5 if (not DF) then -- or not DetailsFrameWorkLoadValid | 5 if (not DF or not DetailsFrameworkCanLoad) then |
| 6 return | 6 return |
| 7 end | 7 end |
| 8 | 8 |
| 9 function DF:CreateAddOn (name, global_saved, global_table, options_table, broker) | 9 function DF:CreateAddOn (name, global_saved, global_table, options_table, broker) |
| 10 | 10 |
| 28 LibStub ("AceConfig-3.0"):RegisterOptionsTable (name .. "-Profiles", LibStub ("AceDBOptions-3.0"):GetOptionsTable (self.db)) | 28 LibStub ("AceConfig-3.0"):RegisterOptionsTable (name .. "-Profiles", LibStub ("AceDBOptions-3.0"):GetOptionsTable (self.db)) |
| 29 addon.OptionsFrame2 = LibStub ("AceConfigDialog-3.0"):AddToBlizOptions (name .. "-Profiles", "Profiles", name) | 29 addon.OptionsFrame2 = LibStub ("AceConfigDialog-3.0"):AddToBlizOptions (name .. "-Profiles", "Profiles", name) |
| 30 end | 30 end |
| 31 | 31 |
| 32 if (broker) then | 32 if (broker) then |
| 33 | |
| 34 local broker_click_function = broker.OnClick | 33 local broker_click_function = broker.OnClick |
| 35 if (not broker_click_function and options_table) then | 34 if (not broker_click_function and options_table) then |
| 36 broker_click_function = function() | 35 broker_click_function = function() |
| 37 InterfaceOptionsFrame_OpenToCategory (name) | 36 InterfaceOptionsFrame_OpenToCategory (name) |
| 38 InterfaceOptionsFrame_OpenToCategory (name) | 37 InterfaceOptionsFrame_OpenToCategory (name) |
| 48 }) | 47 }) |
| 49 | 48 |
| 50 if (databroker and broker.Minimap and global_table.Minimap) then | 49 if (databroker and broker.Minimap and global_table.Minimap) then |
| 51 LibStub ("LibDBIcon-1.0"):Register (name, databroker, addon.db.profile.Minimap) | 50 LibStub ("LibDBIcon-1.0"):Register (name, databroker, addon.db.profile.Minimap) |
| 52 end | 51 end |
| 53 | 52 end |
| 53 | |
| 54 if (addon.OnInit) then | |
| 55 xpcall (addon.OnInit, geterrorhandler(), addon) | |
| 54 end | 56 end |
| 55 | 57 |
| 56 end | 58 end |
| 57 | 59 |
| 58 return addon | 60 return addon |
