From d3721af4eef10dca25aa294140e7ba0a7c76c286 Mon Sep 17 00:00:00 2001 From: Kevin Lyles Date: Thu, 26 Nov 2009 13:46:40 -0600 Subject: [PATCH] Added color coding for default weights (defaults are now in white) --- weights.lua | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/weights.lua b/weights.lua index a1bf9af..b5d7bdd 100644 --- a/weights.lua +++ b/weights.lua @@ -34,7 +34,7 @@ StaticPopupDialogs["WW_CONFIRM_WEIGHT_DELETE"] = { } StaticPopupDialogs["WW_CONFIRM_RESTORE_DEFAULTS"] = { - text = "Are you sure you want to restore default weights? This will overwrite any weights with the default names (but leave others alone).", + text = "Are you sure you want to restore default weights?\n\nWeights whose names are white will be overwritten (the others will be left as they are).", button1 = "Restore Defaults", button2 = "Cancel", OnAccept = function() @@ -372,6 +372,11 @@ function setWeight(class, weight, statList) weightFrame.text:SetText(weight) weightFrame.name = weight weightFrame:SetPoint("TOPLEFT", 0, -22 * position) + if defaultVars.weightsList[class] and defaultVars.weightsList[class][weight] then + local fontString = weightFrame.text:GetFontString() + fontString:SetTextColor(1, 1, 1) + weightFrame.text:SetFontString(fontString) + end classFrame.length = classFrame.length + 1 if classFrame.collapsed then weightFrame:Hide() @@ -425,6 +430,11 @@ function loadClassButtons() end end end + if defaultVars.weightsList[classFrame.class] and defaultVars.weightsList[classFrame.class][weightFrame.name] then + local fontString = weightFrame.text:GetFontString() + fontString:SetTextColor(1, 1, 1) + weightFrame.text:SetFontString(fontString) + end end end end -- 1.7.9.5