Nenue@34
|
1 --- ${PACKAGE_NAME}
|
Nenue@34
|
2 -- @file-author@
|
Nenue@34
|
3 -- @project-revision@ @project-hash@
|
Nenue@34
|
4 -- @file-revision@ @file-hash@
|
Nenue@34
|
5 -- Created: 4/15/2016 11:36 PM
|
Nenue@34
|
6
|
Nenue@34
|
7 local B = select(2,...).frame
|
Nenue@34
|
8 local T = B:RegisterModule("ObjectiveTracker", _G.VeneerObjectiveWrapper, 'BuffFrame')
|
Nenue@34
|
9 local setmetatable, type, rawset = setmetatable, type, rawset
|
Nenue@34
|
10 local print = B.print('Schema')
|
Nenue@34
|
11 T.defaults.Schema = setmetatable({}, {
|
Nenue@34
|
12 __newindex = function(schemas,layerName, layerTable)
|
Nenue@34
|
13 -- tracker/block/line
|
Nenue@34
|
14 if type(layerTable) == 'table' then
|
Nenue@34
|
15 rawset(schemas, layerName, setmetatable(layerTable, {
|
Nenue@34
|
16 __index = function(layerTable, schemaName)
|
Nenue@34
|
17
|
Nenue@34
|
18 end,
|
Nenue@34
|
19 __newindex = function(layerTable, schemaName, schemaTable)
|
Nenue@34
|
20 -- schema table
|
Nenue@34
|
21 if type(schemaTable) == 'table' then
|
Nenue@34
|
22 rawset(layerTable, schemaName, setmetatable(schemaTable, {
|
Nenue@34
|
23 __index = function(schemaTable, key)
|
Nenue@34
|
24 print('substituting a default value for |cFF00FFFF', layerName..'|r.|cFF0088FF'..schemaName..'|r.'..key)
|
Nenue@34
|
25 return layerTable.default[key]
|
Nenue@34
|
26 end
|
Nenue@34
|
27 }))
|
Nenue@34
|
28 end
|
Nenue@34
|
29 end,
|
Nenue@34
|
30 }))
|
Nenue@34
|
31 end
|
Nenue@34
|
32 end
|
Nenue@34
|
33 })
|
Nenue@34
|
34
|
Nenue@34
|
35 T.defaults.Schema = {
|
Nenue@34
|
36 tracker = {
|
Nenue@34
|
37 default = {
|
Nenue@34
|
38 headerbg = {'VERTICAL', 1, 1, 0.5, 0.5, 1, 1, 0.5, 0},
|
Nenue@34
|
39 headerFont = {[[Interface\Addons\SharedMedia_MyMedia\font\ArchivoNarrow-Bold.ttf]], 14, 'OUTLINE'},
|
Nenue@34
|
40 blockSpacing = 1,
|
Nenue@34
|
41 }
|
Nenue@34
|
42 },
|
Nenue@34
|
43 block = {
|
Nenue@34
|
44 default = {
|
Nenue@35
|
45 titlebg = {'HORIZONTAL', 1, 0, .7, 0, 1, 0, .7, .125},
|
Nenue@34
|
46 textbg = {'HORIZONTAL', 0, 0, 0, 0.4, 0, 0, 0, 0 },
|
Nenue@34
|
47 selectionbg = {'HORIZONTAL', 1, 1, 1, 0, 1, 1, 1, 0.225},
|
Nenue@34
|
48 titleFont = {[[Interface\Addons\SharedMedia_MyMedia\font\ArchivoNarrow-Bold.ttf]], 16, 'OUTLINE'},
|
Nenue@34
|
49 textFont = {[[Interface\Addons\SharedMedia_MyMedia\font\ArchivoNarrow-Regular.ttf]], 16, 'OUTLINE'},
|
Nenue@34
|
50 titleIndent = 4,
|
Nenue@34
|
51 titleSpacing = 3,
|
Nenue@34
|
52 textIndent = 3,
|
Nenue@34
|
53 textSpacing = 3,
|
Nenue@34
|
54 rewardSize = 24,
|
Nenue@34
|
55 },
|
Nenue@34
|
56 daily = {
|
Nenue@34
|
57 titlebg = {'HORIZONTAL', 0, .7, 1, .25, 0, 1, .7, .125},
|
Nenue@34
|
58 textbg = {'HORIZONTAL', 0, .7, 1, .1, 0, 1, .7, .075 },
|
Nenue@34
|
59 },
|
Nenue@34
|
60 weekly = {
|
Nenue@34
|
61 titlebg = {'HORIZONTAL', 0, .35, .7, .25, 0, .35, .7, .125},
|
Nenue@34
|
62 textbg = {'HORIZONTAL', 0, .35, .7, .1, 0, .35, .7, .075 },
|
Nenue@34
|
63 },
|
Nenue@34
|
64 account = {
|
Nenue@34
|
65 titlebg = {'HORIZONTAL', .1, .1, .1, .25, .1, .1, .1, .125},
|
Nenue@34
|
66 textbg = {'HORIZONTAL', .1, .1, .1, 0.4, .1, .1, .1, .085 },
|
Nenue@34
|
67 },
|
Nenue@34
|
68 -- alliance
|
Nenue@34
|
69 faction_1 = {
|
Nenue@34
|
70 titlebg = {'HORIZONTAL', .2, .4, 1, 0.4, .2, .4, 1, .085 },
|
Nenue@34
|
71 textbg = {'HORIZONTAL', .2, .4, 1, 0.4, .2, .4, 1, .085 },
|
Nenue@34
|
72 },
|
Nenue@34
|
73 -- horde
|
Nenue@34
|
74 faction_2 = {
|
Nenue@34
|
75 titlebg = {'HORIZONTAL', .6, 0, 0.4, 0.4, .6, 0, 0.4, .085 },
|
Nenue@34
|
76 textbg = {'HORIZONTAL', .6, 0, 0.4, 0.4, .6, 0, 0.4, .085 },
|
Nenue@34
|
77 }
|
Nenue@34
|
78 },
|
Nenue@34
|
79 line = {
|
Nenue@34
|
80 default = {
|
Nenue@34
|
81 textColor = {.5,.75,1},
|
Nenue@34
|
82 textSpacing = 3,
|
Nenue@34
|
83 textIndent = 3,
|
Nenue@34
|
84 },
|
Nenue@34
|
85 completed = {
|
Nenue@34
|
86 textColor = {0, 1, 0}
|
Nenue@34
|
87 },
|
Nenue@34
|
88 failed = {
|
Nenue@34
|
89 textColor = {1,0,0 }
|
Nenue@34
|
90 },
|
Nenue@34
|
91 autocomplete = {
|
Nenue@34
|
92 textColor = {0,1,0 }
|
Nenue@34
|
93 },
|
Nenue@34
|
94 objectColor = {
|
Nenue@34
|
95 textColor = {0,1,1}
|
Nenue@34
|
96 },
|
Nenue@34
|
97 monster = {
|
Nenue@34
|
98 textColor = {1,1,0}
|
Nenue@34
|
99 },
|
Nenue@34
|
100 item = {
|
Nenue@34
|
101 textColor = {1,.25,.5}
|
Nenue@34
|
102 }
|
Nenue@34
|
103 },
|
Nenue@34
|
104 widget = {
|
Nenue@34
|
105 progressbar = {
|
Nenue@34
|
106
|
Nenue@34
|
107 },
|
Nenue@34
|
108 timer = {
|
Nenue@34
|
109
|
Nenue@34
|
110 }
|
Nenue@34
|
111 },
|
Nenue@34
|
112 } |