Index: Core.lua =================================================================== --- Core.lua (revision 7969) +++ Core.lua (working copy) @@ -32,6 +32,9 @@ ["Stop all messages sent by players from appearing in the raid warning frame"] = true, ["Frame appearance"] = true, + ["color"] = true, + ["Color"] = true, + ["Set the color"] = true, ["fontsize"] = true, ["small"] = true, ["normal"] = true, @@ -65,6 +68,7 @@ supressall = false, fontsize = "huge", + color = {r = ChatTypeInfo["RAID_WARNING"].r, g = ChatTypeInfo["RAID_WARNING"].g, b = ChatTypeInfo["RAID_WARNING"].b}, height = 40, width = 512, timevisible = 10, @@ -132,6 +136,22 @@ name = L"Frame appearance", order = 201, }, + [L"color"] = { + type = "color", + name = L"Color", + desc = L"Set the color", + get = function() + local color = ImprovedRWF.db.profile.color + return color.r, color.g, color.b + end, + set = function(r, g, b) + ImprovedRWF.db.profile.color = {r = r, g = g, b = b} + ChatTypeInfo["RAID_WARNING"].r = r + ChatTypeInfo["RAID_WARNING"].g = g + ChatTypeInfo["RAID_WARNING"].b = b + end, + order = 202, + }, [L"fontsize"] = { type = "text", name = L"Font Size", @@ -143,7 +163,7 @@ RaidWarningFrame:SetFontObject(fonts[v] or GameFontNormalHuge) end, validate = {L"small", L"normal", L"large", L"huge"}, - order = 202 + order = 203 }, [L"height"] = { type = "range", @@ -158,7 +178,7 @@ max = 800, step = 1, isPercent = false, - order = 203, + order = 204, }, [L"width"] = { type = "range", @@ -173,7 +193,7 @@ max = 2048, step = 1, isPercent = false, - order = 204, + order = 205, }, [L"timevisible"] = { type = "range", @@ -188,7 +208,7 @@ max = 30, step = 1, isPercent = false, - order = 205, + order = 206, }, }, } @@ -208,6 +228,10 @@ if BigWigsBossBlock and BigWigsBossBlock:IsHooked("RaidWarningFrame_OnEvent") then self.bossblock = BigWigsBossBlock end + + ChatTypeInfo["RAID_WARNING"].r = self.db.profile.color.r + ChatTypeInfo["RAID_WARNING"].g = self.db.profile.color.g + ChatTypeInfo["RAID_WARNING"].b = self.db.profile.color.b RaidWarningFrame:SetFontObject(fonts[self.db.profile.fontsize] or GameFontNormalHuge) RaidWarningFrame:SetHeight(self.db.profile.height) @@ -216,6 +240,10 @@ end function ImprovedRWF:OnDisable() + ChatTypeInfo["RAID_WARNING"].r = self.defaults.color.r + ChatTypeInfo["RAID_WARNING"].g = self.defaults.color.g + ChatTypeInfo["RAID_WARNING"].b = self.defaults.color.b + RaidWarningFrame:SetFontObject(fonts[self.defaults.fontsize]) RaidWarningFrame:SetHeight(self.defaults.height) RaidWarningFrame:SetWidth(self.defaults.width)