Mercurial > wow > ouroloot
comparison options.lua @ 100:a57133ee3c9b
- Allow event callbacks using the standard CallbackHandler scheme. Add
a debug.callback flag with usual semantics.
- Fire an initial set of events. This will take experimentation.
- If restoring g_loot, set metatables on previous entries also.
| author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
|---|---|
| date | Mon, 30 Jul 2012 19:25:46 +0000 |
| parents | 966d06c8d9c9 |
| children | f7162a1cadc7 |
comparison
equal
deleted
inserted
replaced
| 99:966d06c8d9c9 | 100:a57133ee3c9b |
|---|---|
| 520 w:SetDescription[[Also log all debug messages to disk. See print_log.lua in the addon folder for later viewing.]] | 520 w:SetDescription[[Also log all debug messages to disk. See print_log.lua in the addon folder for later viewing.]] |
| 521 end | 521 end |
| 522 w:SetDisabled(not addon.DEBUG_PRINT) | 522 w:SetDisabled(not addon.DEBUG_PRINT) |
| 523 end | 523 end |
| 524 w:SetValue(v) | 524 w:SetValue(v) |
| 525 w:SetCallback("OnValueChanged", function(_w,event,value) addon.debug[d] = value end) | 525 w:SetCallback("OnValueChanged", function(_w,event,value) |
| 526 addon.debug[d] = value | |
| 527 if d == "comm" then | |
| 528 addon.is_guilded = _G.IsInGuild() | |
| 529 end | |
| 530 end) | |
| 526 grp:AddChild(w) | 531 grp:AddChild(w) |
| 527 end | 532 end |
| 528 container:AddChild(grp) | 533 container:AddChild(grp) |
| 529 end | 534 end |
| 530 | 535 |
| 803 insertion_index = #options_tree + 1 | 808 insertion_index = #options_tree + 1 |
| 804 end | 809 end |
| 805 | 810 |
| 806 | 811 |
| 807 --[[ | 812 --[[ |
| 808 PLUGIN is the module table itself. | 813 PLUGIN is the module table itself. (This does not actually have to be |
| 814 a plugin created with :[Constrained]NewModule, as long as it has a | |
| 815 GetName method and other parameters here are used appropriately.) | |
| 809 PARENT is nil to register in the tree list directly. | 816 PARENT is nil to register in the tree list directly. |
| 810 TEXT is either the text to display in the tree list, or nil to use the | 817 TEXT is either the text to display in the tree list, or nil to use the |
| 811 moduleName field out of PLUGIN (not :GetName()). | 818 moduleName field out of PLUGIN (not :GetName()). |
| 812 OPTIONS is either | 819 OPTIONS is either |
| 813 I) a function to call directly | 820 I) a function to call directly |
