Mercurial > wow > guild-delta
comparison gd.lua @ 4:9527583a842b
Add a color picker as requested.
| author | Farmbuyer of US-Kilrogg <farmbuyer@gmail.com> |
|---|---|
| date | Mon, 29 Nov 2010 02:19:53 +0000 |
| parents | 7b31138c3c8e |
| children | cf777d095730 |
comparison
equal
deleted
inserted
replaced
| 3:7b31138c3c8e | 4:9527583a842b |
|---|---|
| 67 type = 'toggle', | 67 type = 'toggle', |
| 68 order = 15, | 68 order = 15, |
| 69 get = function() return not not SV.notify_nochange end, | 69 get = function() return not not SV.notify_nochange end, |
| 70 set = function(info,val) SV.notify_nochange = val end, | 70 set = function(info,val) SV.notify_nochange = val end, |
| 71 }, | 71 }, |
| 72 color = { | |
| 73 name = "Output text color", | |
| 74 type = 'color', | |
| 75 order = 17, | |
| 76 get = function() return SV.red, SV.green, SV.blue, 1 end, | |
| 77 set = function(info,...) SV.red, SV.green, SV.blue = ... end, | |
| 78 }, | |
| 72 spacer2 = { | 79 spacer2 = { |
| 73 name = '', | 80 name = '', |
| 74 type = 'description', | 81 type = 'description', |
| 75 cmdHidden = true, | 82 cmdHidden = true, |
| 76 width = 'full', | 83 width = 'full', |
| 216 local function prt (...) | 223 local function prt (...) |
| 217 return chatframe:AddMessage(...) | 224 return chatframe:AddMessage(...) |
| 218 end | 225 end |
| 219 local function cprt (txt) | 226 local function cprt (txt) |
| 220 if SV.logging then addon:AddLogNote(txt) end | 227 if SV.logging then addon:AddLogNote(txt) end |
| 221 return prt(txt, 255/255, 26/255, 160/255) | 228 return prt(txt, SV.red, SV.green, SV.blue) |
| 222 end | 229 end |
| 223 | 230 |
| 224 function addon:current_guild_info (N) | 231 function addon:current_guild_info (N) |
| 225 local ret = {} | 232 local ret = {} |
| 226 for i = 1, N do | 233 for i = 1, N do |
| 283 --notify_nochange = nil by default | 290 --notify_nochange = nil by default |
| 284 --logging = nil by default | 291 --logging = nil by default |
| 285 } | 292 } |
| 286 end | 293 end |
| 287 SV = _G.GuildDeltaSV | 294 SV = _G.GuildDeltaSV |
| 295 -- upgrade path | |
| 296 if SV.red == nil then | |
| 297 SV.red = 255/255 | |
| 298 SV.green = 26/255 | |
| 299 SV.blue = 160/255 | |
| 300 end | |
| 288 end | 301 end |
| 289 | 302 |
| 290 -- Remove anything that normal operation doesn't need after finishing its work. | 303 -- Remove anything that normal operation doesn't need after finishing its work. |
| 291 function addon:cleanup() | 304 function addon:cleanup() |
| 292 prt = nil; cprt = nil | 305 prt = nil; cprt = nil |
