# HG changeset patch # User Nenue # Date 1459581792 14400 # Node ID fb80e365bab34ca5b0af893637378c4ea387efba # Parent f03c75f63566e09ef2551ed221f751c76632226b ObjectiveStyle & ObjectiveFrame - abstract aesthetic details away from ObjectiveFrame - revise SetBlockStyle into a more general algorithm for every frame - implement caching of resolved attribute combinations - use loadstring functions to store resolved attributes and call upon those when, for example, a MouseUp leads a tracker block to restore its original style (removes a lot of very small fps dipping) diff -r f03c75f63566 -r fb80e365bab3 ObjectiveStyle.lua --- a/ObjectiveStyle.lua Sat Apr 02 03:19:25 2016 -0400 +++ b/ObjectiveStyle.lua Sat Apr 02 03:23:12 2016 -0400 @@ -259,8 +259,8 @@ local code = "return function (frame)\n".. " local func = Veneer.ObjectiveTracker.SetBlockAttribute\n".. - " local cache = Veneer.ObjectiveTracker.BlockStyleCache" .. - " print('CacheFunc', '|cFFFFFF00SET|r "..styleName.." |cFFFFFF00ON|r', frame:GetName()) " + " local cache = Veneer.ObjectiveTracker.BlockStyleCache" + --.. " print('CacheFunc', '|cFFFFFF00SET|r "..styleName.." |cFFFFFF00ON|r', frame:GetName()) " for elementName, styleset in pairs(style) do code = code .. @@ -272,8 +272,9 @@ --mod.SetBlockAttribute[attributeName](region, value) - code = code .. "\n print('CacheFunc', ' applying', '|cFF00FFFF" .. attributeName .. "|r to', '|cFF0088FF"..elementName.."|r', cache['"..styleName.."']['"..elementName.."']['".. attributeName .."'])" .. - "\n\n func['" .. attributeName .. "'](frame['"..elementName.."'],".. + code = code + --.. "\n print('CacheFunc', ' applying', '|cFF00FFFF" .. attributeName .. "|r to', '|cFF0088FF"..elementName.."|r', cache['"..styleName.."']['"..elementName.."']['".. attributeName .."'])" + .. "\n\n func['" .. attributeName .. "'](frame['"..elementName.."'],".. " cache['"..styleName.."']['"..elementName.."']['".. attributeName .."'])" --- Set any frame.blah variables used in Updates @@ -289,7 +290,7 @@ end code = code .. "\n else".. - "\n print('CacheFunc', ' |cFFFF4400missing', frame:GetName()..'."..elementName.."')".. + --"\n print('CacheFunc', ' |cFFFF4400missing', frame:GetName()..'."..elementName.."')".. "\n end" end code = code .. "\nend"