comparison Defaults.lua @ 7:f920db5fc6b1

version 0.3
author Flick <flickerstreak@gmail.com>
date Tue, 20 Mar 2007 21:25:29 +0000
parents c11ca1d8ed91
children c05fd3e18b4f
comparison
equal deleted inserted replaced
6:2da5089ab7ff 7:f920db5fc6b1
1 local function tcopy(t)
2 local r = { }
3 for k, v in pairs(t) do
4 r[k] = (type(v) == "table" and tcopy(v) or v)
5 end
6 return r
7 end
8
1 -- ReAction default variable tables 9 -- ReAction default variable tables
2 10 local defaultActionConfig = ReAction:GetButtonType("Action"):GetDefaultProfile()
3 11 local defaultPetActionConfig = ReAction:GetButtonType("Pet Action"):GetDefaultProfile()
4 -- configuration options for ReActionButton groups 12
5 ReActionButtonConfigDefaults = { 13
6 type = "ReActionButton", 14 -- default saved variables
7 actionIDs = { }, 15 ReAction_DefaultProfile = {
8 keyBindLoc = "TOPLEFT", 16 hideArt = false,
9 keyBindColorCode = true, 17
10 stackCountLoc = "BOTTOMRIGHT", 18 bars = { }
11 showKeyBind = true,
12 showNumericCooldown = false,
13 showStackCount = true,
14 showMacroName = true,
15 showGrid = true,
16 } 19 }
17 20
18 ReActionBarConfigDefaults = { 21 ReAction_DefaultBarConfig = {
19 visibility = true, 22 ["ReAction"] = {
20 size = 36, 23 ["Action"] = {
21 spacing = 6, 24 visible = true,
22 rows = 1,
23 columns = 12,
24 pages = 1,
25 opacity = 100,
26 anchor = {
27 to = "UIParent",
28 point = "CENTER",
29 relPoint = "CENTER",
30 x = 0,
31 y = 0
32 },
33 btnConfig = ReActionButtonConfigDefaults
34 }
35
36
37
38 -- default variables
39 ReActionProfileDefaults = {
40
41 -- global options
42 hideArt = false,
43
44
45 -- default layout replicates Blizzard layout
46 bars = {
47
48 -- main paged action bar
49 [1] = {
50 visibility = true,
51 size = 36, 25 size = 36,
52 spacing = 6, 26 spacing = 6,
53 rows = 1, 27 rows = 1,
54 columns = 12, 28 columns = 12,
55 pages = 5, 29 pages = nil,
56 opacity = 100, 30 opacity = 100,
57 anchor = { 31 anchor = {
58 to = "UIParent", 32 frame = "UIParent",
59 point = "BOTTOMRIGHT", 33 point = "CENTER",
60 relPoint = "BOTTOM", 34 relPoint = "CENTER",
61 x = 2, 35 x = 0,
62 y = -4 36 y = 0,
63 }, 37 },
64 btnConfig = { 38 btnConfig = tcopy(defaultActionConfig)
65 type = "ReActionButton", 39 },
66 actionIDs = { }, 40 ["Pet Action"] = {
67 keyBindLoc = "TOPLEFT", 41 visible = true,
68 keyBindColorCode = true, 42 parent = "PetActionBarFrame",
69 stackCountLoc = "BOTTOMRIGHT", 43 size = 30,
70 showKeyBind = true, 44 spacing = 8,
71 showNumericCooldown = false, 45 rows = 1,
72 showStackCount = true, 46 columns = 10,
73 showMacroName = true, 47 pages = nil,
74 showGrid = true, 48 opacity = 100,
75 } 49 anchor = {
76 50 frame = "UIParent",
77 }, 51 point = "CENTER",
52 relPoint = "CENTER",
53 x = 0,
54 y = 0,
55 },
56 btnConfig = tcopy(defaultPetActionConfig),
57 }
58 },
59 }
60
61 -- startup layout replicates Blizzard layout (only set on first-run or reset)
62 ReAction_DefaultBlizzardBars = {
63
64 -- main paged action bar
65 [1] = {
66 visible = true,
67 size = 36,
68 spacing = 6,
69 rows = 1,
70 columns = 12,
71 growLeft = false,
72 growUp = false,
73 columnMajor = false,
74 pages = {
75 n = 6,
76 showControls = true,
77 controlsLoc = "Blizzard",
78 autoStanceSwitch = true, -- priests will get a shadowform bar switch, unlike blizzard's
79 autoStealthSwitch = true, -- this is different from blizzard's layout, only for druids
80 },
81 opacity = 100,
82 anchor = {
83 frame = "MainMenuBarArtFrame",
84 point = "BOTTOMLEFT",
85 relPoint = "BOTTOMLEFT",
86 x = 3,
87 y = 0,
88 },
89 btnConfig = tcopy(defaultActionConfig),
90 },
91
92 -- multibar right
93 [2] = {
94 visible = false,
95 size = 36,
96 spacing = 6,
97 rows = 12,
98 columns = 1,
99 growLeft = true,
100 growUp = false,
101 columnMajor = true,
102 pages = nil,
103 opacity = 100,
104 anchor = {
105 frame = "UIParent",
106 point = "BOTTOMRIGHT",
107 relPoint = "BOTTOMRIGHT",
108 x = -4,
109 y = 95,
110 },
111 btnConfig = tcopy(defaultActionConfig),
112 },
113
114 -- multibar left
115 [3] = {
116 visible = false,
117 size = 36,
118 spacing = 6,
119 rows = 12,
120 columns = 1,
121 growLeft = true,
122 growUp = false,
123 columnMajor = true,
124 pages = nil,
125 opacity = 100,
126 anchor = {
127 frame = "UIParent",
128 point = "BOTTOMRIGHT",
129 relPoint = "BOTTOMRIGHT",
130 x = -51,
131 y = 95,
132 },
133 btnConfig = tcopy(defaultActionConfig),
134 },
135
136 -- multibar bottom right
137 [4] = {
138 visible = false,
139 size = 36,
140 spacing = 6,
141 rows = 1,
142 columns = 12,
143 growLeft = false,
144 growUp = false,
145 columnMajor = false,
146 pages = nil,
147 opacity = 100,
148 anchor = {
149 frame = "MainMenuBarArtFrame",
150 point = "BOTTOMLEFT",
151 relPoint = "BOTTOMLEFT",
152 x = 514,
153 y = 53,
154 },
155 btnConfig = tcopy(defaultActionConfig),
156 },
157
158 -- multibar bottom left
159 [5] = {
160 visible = false,
161 size = 36,
162 spacing = 6,
163 rows = 1,
164 columns = 12,
165 growLeft = false,
166 growUp = false,
167 columnMajor = false,
168 pages = nil,
169 opacity = 100,
170 anchor = {
171 frame = "MainMenuBarArtFrame",
172 point = "BOTTOMLEFT",
173 relPoint = "BOTTOMLEFT",
174 x = 3,
175 y = 53,
176 },
177 btnConfig = tcopy(defaultActionConfig),
178 },
179
180 -- pet action bar
181 [6] = {
182 visible = true,
183 parent = "PetActionBarFrame",
184 size = 30,
185 spacing = 8,
186 rows = 1,
187 columns = 10,
188 growLeft = false,
189 growUp = false,
190 columnMajor = false,
191 pages = nil,
192 opacity = 100,
193 anchor = {
194 frame = "PetActionBarFrame",
195 point = "BOTTOMLEFT",
196 relPoint = "BOTTOMLEFT",
197 x = 31,
198 y = -1,
199 },
200 btnConfig = tcopy(defaultPetActionConfig),
201 },
202
203 }
204
205 -- default settings for action IDs match Blizzard's settings...
206 -- ... except on the main bar extra pages, which map directly to the default shapeshift IDs
207 -- rather than mirroring the multi action bars, to give access to all 120 actions
208 local bars = ReAction_DefaultBlizzardBars
209
210 for i = 1, 12 do
211 bars[1].btnConfig.ids[i] = {
212 i,
213 72+i,
214 84+i,
215 96+i,
216 108+i,
217 12+i
78 } 218 }
79 } 219 end
220
221 for b = 2, 5 do
222 for i = 1, 12 do
223 bars[b].btnConfig.ids[i] = { 12*(b-1) + i }
224 end
225 end
226
227 for i = 1, 10 do
228 bars[6].btnConfig.ids[i] = { i }
229 end
230
231