Nenue@34: --- ${PACKAGE_NAME} Nenue@34: -- @file-author@ Nenue@34: -- @project-revision@ @project-hash@ Nenue@34: -- @file-revision@ @file-hash@ Nenue@34: -- Created: 4/15/2016 11:36 PM Nenue@34: Nenue@34: local B = select(2,...).frame Nenue@34: local T = B:RegisterModule("ObjectiveTracker", _G.VeneerObjectiveWrapper, 'BuffFrame') Nenue@34: local setmetatable, type, rawset = setmetatable, type, rawset Nenue@38: local print = B.print('Schema') Nenue@37: local lprint = B.print('Layout') Nenue@37: local oprint = B.print('Objectives') Nenue@34: T.defaults.Schema = setmetatable({}, { Nenue@34: __newindex = function(schemas,layerName, layerTable) Nenue@34: -- tracker/block/line Nenue@34: if type(layerTable) == 'table' then Nenue@37: Nenue@37: print('adding layer', layerName) Nenue@37: for k,v in pairs(layerTable) do Nenue@37: print(' incorporated schema', k) Nenue@37: if type(v) == 'table' and k ~= 'default' then Nenue@37: setmetatable(v, { Nenue@37: __index = function(schemaTable, key) Nenue@37: print(' substituting default "'..tostring(schemas[layerName].default[key])..'" for |cFF00FFFF', layerName..'|r.|cFF0088FF'..k..'|r.'..key) Nenue@37: return schemas[layerName].default[key] Nenue@37: end Nenue@37: }) Nenue@37: end Nenue@37: end Nenue@34: rawset(schemas, layerName, setmetatable(layerTable, { Nenue@34: __newindex = function(layerTable, schemaName, schemaTable) Nenue@34: -- schema table Nenue@34: if type(schemaTable) == 'table' then Nenue@37: print('adding schema', schemaName, 'to', layerName, 'layers') Nenue@37: Nenue@37: Nenue@34: rawset(layerTable, schemaName, setmetatable(schemaTable, { Nenue@34: __index = function(schemaTable, key) Nenue@37: print(' substituting default "'..tostring(schemas[layerName].default[key])..'" for |cFF00FFFF', layerName..'|r.|cFF0088FF'..schemaName..'|r.'..key) Nenue@37: rawset(schemaTable, key, schemas[layerName].default[key]) Nenue@37: return schemas[layerName].default[key] Nenue@34: end Nenue@34: })) Nenue@34: end Nenue@34: end, Nenue@34: })) Nenue@34: end Nenue@34: end Nenue@34: }) Nenue@34: Nenue@37: T.defaults.Schema.tracker = { Nenue@37: default = { Nenue@37: headerbg = {'VERTICAL', 1, 1, 0.5, 0.5, 1, 1, 0.5, 0}, Nenue@38: headerFont = {[[Interface\Addons\SharedMedia_MyMedia\font\XOIREQE.TTF]], 13, 'OUTLINE'}, Nenue@38: headerHeight = 16, Nenue@38: headerSpacing = 0, Nenue@38: headerColor = {1,1,1,1}, Nenue@37: blockSpacing = 1, Nenue@37: } Nenue@37: } Nenue@37: T.defaults.Schema.block = { Nenue@37: default = { Nenue@38: titleColor = {1, 1, 1, 1}, Nenue@37: titlebg = {'HORIZONTAL', 1, 0, .7, 0, 1, 0, .7, .125}, Nenue@37: textbg = {'HORIZONTAL', 0, 0, 0, 0, 0, 0, 0, 0.4 }, Nenue@37: selectionbg = {'HORIZONTAL', 1, 1, 1, 0, 1, 1, 1, 0.225}, Nenue@37: titleFont = {[[Interface\Addons\SharedMedia_MyMedia\font\ArchivoNarrow-Bold.ttf]], 16, 'OUTLINE'}, Nenue@37: textFont = {[[Interface\Addons\SharedMedia_MyMedia\font\ArchivoNarrow-Regular.ttf]], 16, 'OUTLINE'}, Nenue@37: titleIndent = 4, Nenue@37: titleSpacing = 3, Nenue@37: selectionIndent = 5, Nenue@37: textIndent = 3, Nenue@37: textSpacing = 3, Nenue@37: rewardSize = 24, Nenue@34: }, Nenue@37: achievement = { Nenue@37: titleColor = {0, 0.7, 1, 1}, Nenue@34: }, Nenue@37: achievement_account = { Nenue@37: titleColor = {.35, 0.7, 1, 1}, Nenue@34: }, Nenue@37: daily = { Nenue@37: titleColor = {0, 0.7, 1, 1}, Nenue@38: titlebg = {'HORIZONTAL', 0, .7, 1, 0, 0, 1, .7, .125}, Nenue@38: textbg = {'HORIZONTAL', 0, .7, 1, 0, 0, 1, .7, .1}, Nenue@37: }, Nenue@37: weekly = { Nenue@37: titleColor = {.25, 0.7, 1, 1}, Nenue@38: titlebg = {'HORIZONTAL', 0, .35, .7, 0, 0, .35, .7, .125}, Nenue@38: textbg = {'HORIZONTAL', 0, .35, .7, .0, 0, .35, .7, .075 }, Nenue@37: }, Nenue@37: account = { Nenue@38: titlebg = {'HORIZONTAL', .1, .1, .1, 0, .1, .1, .1, .125}, Nenue@38: textbg = {'HORIZONTAL', .1, .1, .1, 0, .1, .1, .1, .085 }, Nenue@37: }, Nenue@37: -- alliance Nenue@37: faction_1 = { Nenue@37: titlebg = {'HORIZONTAL', .2, .4, 1, 0.4, .2, .4, 1, .085 }, Nenue@37: textbg = {'HORIZONTAL', .2, .4, 1, 0.4, .2, .4, 1, .085 }, Nenue@37: }, Nenue@37: -- horde Nenue@37: faction_2 = { Nenue@37: titlebg = {'HORIZONTAL', .6, 0, 0.4, 0.4, .6, 0, 0.4, .085 }, Nenue@37: textbg = {'HORIZONTAL', .6, 0, 0.4, 0.4, .6, 0, 0.4, .085 }, Nenue@37: } Nenue@37: } Nenue@37: T.defaults.Schema.line = { Nenue@37: default = { Nenue@38: textColor = {1, 1, 1}, Nenue@37: textSpacing = 3, Nenue@37: textIndent = 3, Nenue@37: }, Nenue@37: completed = { Nenue@39: textColor = {.5, 1, .5} Nenue@37: }, Nenue@37: failed = { Nenue@39: textColor = {1,.25,.25 } Nenue@37: }, Nenue@37: autocomplete = { Nenue@39: textColor = {.5,1,1 } Nenue@37: }, Nenue@39: object = { Nenue@37: textColor = {0,1,1} Nenue@37: }, Nenue@37: monster = { Nenue@37: textColor = {1,1,0} Nenue@37: }, Nenue@37: item = { Nenue@39: textColor = {1,.75,.75} Nenue@38: }, Nenue@38: achievement_complete = { Nenue@38: textColor = {1, 1, 1, 1}, Nenue@38: }, Nenue@38: achievement = { Nenue@39: textColor = {0.5, 0.85, 1, 1}, Nenue@38: }, Nenue@38: achievement_account = { Nenue@39: textColor = {.4, 0.7, 1, 1}, Nenue@38: }, Nenue@37: } Nenue@37: T.defaults.Schema.widget = { Nenue@37: progressbar = { Nenue@34: Nenue@37: }, Nenue@37: timer = { Nenue@34: Nenue@37: } Nenue@39: } Nenue@39: Nenue@39: T.defaults.Schema.statusbar = { Nenue@39: default = { Nenue@39: textFont = {[[Interface\Addons\SharedMedia_MyMedia\font\XOIREQE.TTF]], 11, 'OUTLINE'}, Nenue@39: textColor = {1,1,1,1}, Nenue@39: } Nenue@34: }