changeset 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
files GuildDelta.toc gd.lua
diffstat 2 files changed, 15 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/GuildDelta.toc	Mon Nov 29 01:52:48 2010 +0000
+++ b/GuildDelta.toc	Mon Nov 29 02:19:53 2010 +0000
@@ -1,6 +1,6 @@
 ## Interface: 40000
 ## Title: Guild Deltas
-## Version: 4.0
+## Version: @project-version@
 ## Notes: On login, displays changes to your guild since the last time you logged in.
 ## Author: Farmbuyer of Kilrogg
 ## SavedVariables: GuildDeltaSV
--- a/gd.lua	Mon Nov 29 01:52:48 2010 +0000
+++ b/gd.lua	Mon Nov 29 02:19:53 2010 +0000
@@ -69,6 +69,13 @@
 					get = function() return not not SV.notify_nochange end,
 					set = function(info,val) SV.notify_nochange = val end,
 				},
+				color = {
+					name = "Output text color",
+					type = 'color',
+					order = 17,
+					get = function() return SV.red, SV.green, SV.blue, 1 end,
+					set = function(info,...) SV.red, SV.green, SV.blue = ... end,
+				},
 				spacer2 = {
 					name = '',
 					type = 'description',
@@ -218,7 +225,7 @@
 end
 local function cprt (txt)
 	if SV.logging then addon:AddLogNote(txt) end
-	return prt(txt, 255/255, 26/255, 160/255)
+	return prt(txt, SV.red, SV.green, SV.blue)
 end
 
 function addon:current_guild_info (N)
@@ -285,6 +292,12 @@
 		}
 	end
 	SV = _G.GuildDeltaSV
+	-- upgrade path
+	if SV.red == nil then
+		SV.red =   255/255
+		SV.green =  26/255
+		SV.blue =  160/255
+	end
 end
 
 -- Remove anything that normal operation doesn't need after finishing its work.