flickerstreak@7
|
1 -- Ace2 global options tables for ReAction
|
flickerstreak@7
|
2
|
flickerstreak@7
|
3
|
flickerstreak@7
|
4 -- autogenerate the NewBar sub-types table
|
flickerstreak@7
|
5 local function GenerateNewBarArgs()
|
flickerstreak@7
|
6 local args = { }
|
flickerstreak@7
|
7 for _, name in pairs(ReAction:GetButtonTypeList() ) do
|
flickerstreak@7
|
8 args[name] = {
|
flickerstreak@7
|
9 type="execute",
|
flickerstreak@7
|
10 name=name,
|
flickerstreak@7
|
11 desc=name,
|
flickerstreak@7
|
12 }
|
flickerstreak@7
|
13 end
|
flickerstreak@7
|
14 return args
|
flickerstreak@7
|
15 end
|
flickerstreak@7
|
16
|
flickerstreak@1
|
17
|
flickerstreak@1
|
18 ReActionConsoleOptions = {
|
flickerstreak@1
|
19 type="group",
|
flickerstreak@1
|
20 args={
|
flickerstreak@1
|
21 lock = {
|
flickerstreak@1
|
22 type = "execute",
|
flickerstreak@1
|
23 name = "lock",
|
flickerstreak@1
|
24 desc = "Locks action bars and disables rearrangement",
|
flickerstreak@1
|
25 func = "Lock",
|
flickerstreak@1
|
26 },
|
flickerstreak@1
|
27
|
flickerstreak@1
|
28 unlock = {
|
flickerstreak@1
|
29 type = "execute",
|
flickerstreak@1
|
30 name = "unlock",
|
flickerstreak@1
|
31 desc = "Unlocks action bars and enables rearrangement",
|
flickerstreak@1
|
32 func = "Unlock",
|
flickerstreak@1
|
33 },
|
flickerstreak@1
|
34
|
flickerstreak@2
|
35 bindings = {
|
flickerstreak@2
|
36 type = "execute",
|
flickerstreak@2
|
37 name = "bindings",
|
flickerstreak@2
|
38 desc = "Launches keybinding setup mode",
|
flickerstreak@7
|
39 func = function() ReBound:Enable() end,
|
flickerstreak@2
|
40 },
|
flickerstreak@2
|
41
|
flickerstreak@1
|
42 hideart = {
|
flickerstreak@1
|
43 type = "toggle",
|
flickerstreak@1
|
44 name = "hideart",
|
flickerstreak@1
|
45 desc = "Hide default Blizzard action bar artwork and XP bar",
|
flickerstreak@1
|
46 get = "IsArtHidden",
|
flickerstreak@1
|
47 set = "ToggleHideArt",
|
flickerstreak@1
|
48 },
|
flickerstreak@7
|
49
|
flickerstreak@1
|
50 showid = {
|
flickerstreak@1
|
51 type = "toggle",
|
flickerstreak@1
|
52 name = "showid",
|
flickerstreak@1
|
53 desc = "Show ActionIDs on buttons",
|
flickerstreak@7
|
54 get = "AreIdsVisible",
|
flickerstreak@7
|
55 set = "ToggleIds",
|
flickerstreak@7
|
56 },
|
flickerstreak@7
|
57
|
flickerstreak@7
|
58 create = {
|
flickerstreak@7
|
59 type = "group",
|
flickerstreak@7
|
60 name = "create",
|
flickerstreak@7
|
61 pass = true,
|
flickerstreak@7
|
62 func = "NewBar",
|
flickerstreak@7
|
63 args = GenerateNewBarArgs(),
|
flickerstreak@7
|
64 desc = "Create a new bar",
|
flickerstreak@1
|
65 },
|
flickerstreak@1
|
66
|
flickerstreak@2
|
67 resetall = {
|
flickerstreak@1
|
68 type = "execute",
|
flickerstreak@2
|
69 name = "resetall",
|
flickerstreak@1
|
70 desc = "Resets to single bar in the default position",
|
flickerstreak@7
|
71 func = "ResetBars",
|
flickerstreak@1
|
72 },
|
flickerstreak@1
|
73
|
flickerstreak@1
|
74 --[[
|
flickerstreak@1
|
75 resync = {
|
flickerstreak@1
|
76 type = "execute",
|
flickerstreak@1
|
77 name = "resync",
|
flickerstreak@1
|
78 desc = "Re-orders action IDs sequentially amongst bars",
|
flickerstreak@7
|
79 func = "ResyncActionIDs",
|
flickerstreak@7
|
80 disabled = true -- not yet implemented
|
flickerstreak@1
|
81 },
|
flickerstreak@1
|
82 ]]
|
flickerstreak@1
|
83 }
|
flickerstreak@1
|
84 }
|
flickerstreak@1
|
85
|
flickerstreak@1
|
86
|
flickerstreak@1
|
87 ReActionGlobalMenuOptions = {
|
flickerstreak@7
|
88 type = "group",
|
flickerstreak@7
|
89 -- handler = nil, -- NOTE: this variable isn't defined yet, must be added later
|
flickerstreak@1
|
90 args={
|
flickerstreak@2
|
91 lockbars = {
|
flickerstreak@1
|
92 type = "toggle",
|
flickerstreak@2
|
93 name = "Lock Bars",
|
flickerstreak@1
|
94 desc = "Locks action bars and disables rearrangement",
|
flickerstreak@7
|
95 get = "IsLocked",
|
flickerstreak@7
|
96 set = "ToggleLocked",
|
flickerstreak@2
|
97 order = 1,
|
flickerstreak@2
|
98 },
|
flickerstreak@2
|
99
|
flickerstreak@2
|
100 lockbtns = {
|
flickerstreak@2
|
101 type = "toggle",
|
flickerstreak@2
|
102 name = "Lock Buttons",
|
flickerstreak@7
|
103 desc = "Prevents buttons from being dragged off accidentally. Shift-drag instead.",
|
flickerstreak@2
|
104 get = function() return LOCK_ACTIONBAR == "1" end,
|
flickerstreak@2
|
105 set = function() LOCK_ACTIONBAR = (LOCK_ACTIONBAR == "1" and "0" or "1") end,
|
flickerstreak@1
|
106 order = 2,
|
flickerstreak@1
|
107 },
|
flickerstreak@1
|
108
|
flickerstreak@7
|
109 new = {
|
flickerstreak@7
|
110 type = "group",
|
flickerstreak@7
|
111 name = "New bar",
|
flickerstreak@7
|
112 pass = true,
|
flickerstreak@7
|
113 func = "NewBar",
|
flickerstreak@7
|
114 args = GenerateNewBarArgs(),
|
flickerstreak@7
|
115 desc = "Create a new bar",
|
flickerstreak@7
|
116 order = 3,
|
flickerstreak@7
|
117 },
|
flickerstreak@7
|
118
|
flickerstreak@2
|
119 bindings = {
|
flickerstreak@2
|
120 type = "execute",
|
flickerstreak@2
|
121 name = "Set Key Bindings",
|
flickerstreak@2
|
122 desc = "Launches keybinding setup mode",
|
flickerstreak@7
|
123 func = function() ReBound:Enable() end,
|
flickerstreak@7
|
124 order = 4,
|
flickerstreak@2
|
125 },
|
flickerstreak@2
|
126
|
flickerstreak@1
|
127 showid = {
|
flickerstreak@1
|
128 type = "toggle",
|
flickerstreak@1
|
129 name = "Show Action IDs",
|
flickerstreak@1
|
130 desc = "Show ActionIDs on buttons",
|
flickerstreak@7
|
131 get = "AreIdsVisible",
|
flickerstreak@7
|
132 set = "ToggleIds",
|
flickerstreak@2
|
133 order = 5,
|
flickerstreak@1
|
134 },
|
flickerstreak@1
|
135
|
flickerstreak@7
|
136 hidedefault = {
|
flickerstreak@7
|
137 type = "toggle",
|
flickerstreak@7
|
138 name = "Hide Default Main Menu Bar",
|
flickerstreak@7
|
139 desc = "Hides default Blizzard main menu bar, including bag bar, micro menu bar, shapeshift bar, lag meter, and XP bar",
|
flickerstreak@7
|
140 get = "IsArtHidden",
|
flickerstreak@7
|
141 set = "ToggleHideArt",
|
flickerstreak@7
|
142 order = 6,
|
flickerstreak@7
|
143 },
|
flickerstreak@7
|
144
|
flickerstreak@1
|
145 --[[
|
flickerstreak@1
|
146 resync = {
|
flickerstreak@1
|
147 type = "execute",
|
flickerstreak@1
|
148 name = "Re-sync Action IDs",
|
flickerstreak@1
|
149 desc = "Re-orders action IDs sequentially amongst bars",
|
flickerstreak@7
|
150 func = "ResyncActionIDs",
|
flickerstreak@7
|
151 disabled = true, -- not yet implemented
|
flickerstreak@1
|
152 },
|
flickerstreak@1
|
153 ]]
|
flickerstreak@1
|
154
|
flickerstreak@1
|
155 }
|
flickerstreak@1
|
156 }
|
flickerstreak@1
|
157
|
flickerstreak@7
|
158
|
flickerstreak@7
|
159
|
flickerstreak@7
|
160
|
flickerstreak@7
|
161
|
flickerstreak@7
|
162 function GenerateReActionBarOptions( bar, main )
|
flickerstreak@7
|
163 local opts = {
|
flickerstreak@1
|
164 type = "group",
|
flickerstreak@7
|
165 handler = bar,
|
flickerstreak@1
|
166 args = {
|
flickerstreak@1
|
167
|
flickerstreak@1
|
168 sep1 = {
|
flickerstreak@1
|
169 type = "header",
|
flickerstreak@1
|
170 name = " ",
|
flickerstreak@1
|
171 desc = " ",
|
flickerstreak@7
|
172 order = 1,
|
flickerstreak@1
|
173 },
|
flickerstreak@1
|
174
|
flickerstreak@1
|
175 hdr1 = {
|
flickerstreak@1
|
176 type = "header",
|
flickerstreak@7
|
177 name = "Options for Bar #"..bar.barID,
|
flickerstreak@7
|
178 desc = "Options for Bar #"..bar.barID,
|
flickerstreak@7
|
179 order = 2,
|
flickerstreak@7
|
180 },
|
flickerstreak@7
|
181
|
flickerstreak@7
|
182 layout = {
|
flickerstreak@7
|
183 type = "group",
|
flickerstreak@7
|
184 name = "Layout",
|
flickerstreak@7
|
185 desc = "Button ordering options",
|
flickerstreak@7
|
186 order = 3,
|
flickerstreak@7
|
187 args = {
|
flickerstreak@7
|
188 growLeft = {
|
flickerstreak@7
|
189 type = "toggle",
|
flickerstreak@7
|
190 name = "Right to Left",
|
flickerstreak@7
|
191 desc = "Lay out buttons right-to-left rather than left-to-right",
|
flickerstreak@7
|
192 get = "GetGrowLeft",
|
flickerstreak@7
|
193 set = "SetGrowLeft",
|
flickerstreak@7
|
194 order = 3,
|
flickerstreak@7
|
195 },
|
flickerstreak@7
|
196
|
flickerstreak@7
|
197 growUp = {
|
flickerstreak@7
|
198 type = "toggle",
|
flickerstreak@7
|
199 name = "Bottom to Top",
|
flickerstreak@7
|
200 desc = "Lay out buttons bottom-to-top rather than top-to-bottom",
|
flickerstreak@7
|
201 get = "GetGrowUp",
|
flickerstreak@7
|
202 set = "SetGrowUp",
|
flickerstreak@7
|
203 order = 4,
|
flickerstreak@7
|
204 },
|
flickerstreak@7
|
205
|
flickerstreak@7
|
206 columnMajor = {
|
flickerstreak@7
|
207 type = "toggle",
|
flickerstreak@7
|
208 name = "Arrange in Columns",
|
flickerstreak@7
|
209 desc = "Lay out buttons sequentially in columns, rather than in rows",
|
flickerstreak@7
|
210 get = "GetColumnMajor",
|
flickerstreak@7
|
211 set = "SetColumnMajor",
|
flickerstreak@7
|
212 order = 5,
|
flickerstreak@7
|
213 },
|
flickerstreak@7
|
214
|
flickerstreak@7
|
215 flip = {
|
flickerstreak@7
|
216 type = "execute",
|
flickerstreak@7
|
217 name = "Flip rows/columns",
|
flickerstreak@7
|
218 desc = "Swaps the number of rows and columns, and inverts the button numbering",
|
flickerstreak@7
|
219 func = "FlipRowsColumns",
|
flickerstreak@7
|
220 order = 6,
|
flickerstreak@7
|
221 },
|
flickerstreak@7
|
222 },
|
flickerstreak@1
|
223 },
|
flickerstreak@1
|
224
|
flickerstreak@7
|
225 paging = {
|
flickerstreak@7
|
226 type = "group",
|
flickerstreak@7
|
227 name = "Paging",
|
flickerstreak@7
|
228 desc = "Multi-page options",
|
flickerstreak@7
|
229 order = 4,
|
flickerstreak@7
|
230 args = {
|
flickerstreak@7
|
231 pages = {
|
flickerstreak@7
|
232 type = "range",
|
flickerstreak@7
|
233 name = "Number of Pages",
|
flickerstreak@7
|
234 desc = "Sets the number of pages",
|
flickerstreak@7
|
235 get = "GetPages",
|
flickerstreak@7
|
236 set = "SetPages",
|
flickerstreak@7
|
237 min = 1,
|
flickerstreak@7
|
238 max = 10,
|
flickerstreak@7
|
239 step = 1,
|
flickerstreak@7
|
240 order = 1,
|
flickerstreak@7
|
241 },
|
flickerstreak@7
|
242
|
flickerstreak@7
|
243 autostance = {
|
flickerstreak@7
|
244 type = "toggle",
|
flickerstreak@7
|
245 name = "Auto Stance Switch",
|
flickerstreak@7
|
246 desc = "Automatically switch pages when changing stance or shapeshift form.",
|
flickerstreak@7
|
247 get = "GetAutoStanceSwitch",
|
flickerstreak@7
|
248 set = "ToggleAutoStanceSwitch",
|
flickerstreak@7
|
249 order = 2,
|
flickerstreak@7
|
250 },
|
flickerstreak@7
|
251
|
flickerstreak@7
|
252 autostealth = {
|
flickerstreak@7
|
253 type = "toggle",
|
flickerstreak@7
|
254 name = "Auto Stealth Switch",
|
flickerstreak@7
|
255 desc = "Automatically switch pages when stealthing/unstealthing.",
|
flickerstreak@7
|
256 get = "GetAutoStealthSwitch",
|
flickerstreak@7
|
257 set = "ToggleAutoStealthSwitch",
|
flickerstreak@7
|
258 order = 3,
|
flickerstreak@7
|
259 },
|
flickerstreak@7
|
260
|
flickerstreak@7
|
261 hidecontrols = {
|
flickerstreak@7
|
262 type = "toggle",
|
flickerstreak@7
|
263 name = "Hide Paging Controls",
|
flickerstreak@7
|
264 desc = "Hide the page up/down controls",
|
flickerstreak@7
|
265 get = "ArePageControlsHidden",
|
flickerstreak@7
|
266 set = "TogglePageControlsHidden",
|
flickerstreak@7
|
267 order = 4,
|
flickerstreak@7
|
268 disabled = "IsPagingDisabled",
|
flickerstreak@7
|
269 },
|
flickerstreak@7
|
270
|
flickerstreak@7
|
271 controlsloc = {
|
flickerstreak@7
|
272 type = "text",
|
flickerstreak@7
|
273 name = "Control location",
|
flickerstreak@7
|
274 desc = "Location of the page up/down controls",
|
flickerstreak@7
|
275 get = function() return bar:GetPageControlsLoc() or "Blizzard" end,
|
flickerstreak@7
|
276 set = function(loc) bar:SetPageControlsLoc(loc) end,
|
flickerstreak@7
|
277 order = 5,
|
flickerstreak@7
|
278 disabled = function() return bar:IsPagingDisabled() or bar:ArePageControlsHidden() end,
|
flickerstreak@7
|
279 validate = { "Blizzard", "LEFT", "RIGHT", "TOP", "BOTTOM" }
|
flickerstreak@7
|
280 },
|
flickerstreak@7
|
281 },
|
flickerstreak@1
|
282 },
|
flickerstreak@7
|
283
|
flickerstreak@7
|
284 visibility = {
|
flickerstreak@7
|
285 type = "group",
|
flickerstreak@7
|
286 name = "Visibility",
|
flickerstreak@7
|
287 desc = "Set bar visibility options",
|
flickerstreak@7
|
288 order = 5,
|
flickerstreak@7
|
289 args = {
|
flickerstreak@7
|
290 visible = {
|
flickerstreak@7
|
291 type = "toggle",
|
flickerstreak@7
|
292 name = "Always Visible",
|
flickerstreak@7
|
293 desc = "The bar will always be visible.|n This setting overrides conditional settings below.",
|
flickerstreak@7
|
294 get = "GetVisibility",
|
flickerstreak@7
|
295 set = function() bar:SetVisibility(true) end,
|
flickerstreak@7
|
296 order = 1,
|
flickerstreak@7
|
297 },
|
flickerstreak@7
|
298
|
flickerstreak@7
|
299 hidden = {
|
flickerstreak@7
|
300 type = "toggle",
|
flickerstreak@7
|
301 name = "Always Hidden",
|
flickerstreak@7
|
302 desc = "The bar will always be hidden, except when bars are unlocked.|n This setting overrides conditional settings below.",
|
flickerstreak@7
|
303 get = function() return not bar:GetVisibility() end,
|
flickerstreak@7
|
304 set = function() bar:SetVisibility(false) end,
|
flickerstreak@7
|
305 order = 2,
|
flickerstreak@7
|
306 },
|
flickerstreak@7
|
307
|
flickerstreak@7
|
308 spring = {
|
flickerstreak@7
|
309 type = "toggle",
|
flickerstreak@7
|
310 name = "Spring Bar Mode",
|
flickerstreak@7
|
311 desc = "The bar is collapsed to a single button, which displays the last action used. Mousing over the button shows the entire bar.|n This setting overrides conditional settings below.",
|
flickerstreak@7
|
312 get = function() end,
|
flickerstreak@7
|
313 set = function() end,
|
flickerstreak@7
|
314 hidden = true,
|
flickerstreak@7
|
315 disabled = true, -- not yet implemented
|
flickerstreak@7
|
316 order = 3,
|
flickerstreak@7
|
317 },
|
flickerstreak@7
|
318
|
flickerstreak@7
|
319 conditional = {
|
flickerstreak@7
|
320 type = "group",
|
flickerstreak@7
|
321 name = "Auto Show",
|
flickerstreak@7
|
322 desc = "Dynamically hide and show the entire bar based on certain conditions.",
|
flickerstreak@7
|
323 hidden = true,
|
flickerstreak@7
|
324 disabled = true, -- not yet implemented
|
flickerstreak@7
|
325 order = 4,
|
flickerstreak@7
|
326 args = {
|
flickerstreak@7
|
327
|
flickerstreak@7
|
328 mouseover = {
|
flickerstreak@7
|
329 type = "toggle",
|
flickerstreak@7
|
330 name = "Show On Mouseover",
|
flickerstreak@7
|
331 desc = "Show the bar only when the mouse is over it.",
|
flickerstreak@7
|
332 disabled = true, -- not yet implemented
|
flickerstreak@7
|
333 get = function() end,
|
flickerstreak@7
|
334 set = function() end,
|
flickerstreak@7
|
335 order = 1,
|
flickerstreak@7
|
336 },
|
flickerstreak@7
|
337
|
flickerstreak@7
|
338 combat = {
|
flickerstreak@7
|
339 type = "toggle",
|
flickerstreak@7
|
340 name = "Show In Combat",
|
flickerstreak@7
|
341 desc = "Show the bar only when in combat.",
|
flickerstreak@7
|
342 disabled = true, -- not yet implemented
|
flickerstreak@7
|
343 get = function() end,
|
flickerstreak@7
|
344 set = function() end,
|
flickerstreak@7
|
345 order = 2,
|
flickerstreak@7
|
346 },
|
flickerstreak@7
|
347
|
flickerstreak@7
|
348 nocombat = {
|
flickerstreak@7
|
349 type = "toggle",
|
flickerstreak@7
|
350 name = "Hide in Combat",
|
flickerstreak@7
|
351 desc = "Show the bar only when not in combat.",
|
flickerstreak@7
|
352 disabled = true, -- not yet implemented
|
flickerstreak@7
|
353 get = function() end,
|
flickerstreak@7
|
354 set = function() end,
|
flickerstreak@7
|
355 order = 3,
|
flickerstreak@7
|
356 }
|
flickerstreak@7
|
357 }
|
flickerstreak@7
|
358 },
|
flickerstreak@7
|
359
|
flickerstreak@7
|
360 }
|
flickerstreak@7
|
361 },
|
flickerstreak@1
|
362
|
flickerstreak@1
|
363 opacity = {
|
flickerstreak@1
|
364 type = "range",
|
flickerstreak@1
|
365 name = "Opacity",
|
flickerstreak@7
|
366 desc = "Set the bar alpha value, from fully transparent (0) to fully opaque (100).",
|
flickerstreak@7
|
367 get = "GetOpacity",
|
flickerstreak@7
|
368 set = "SetOpacity",
|
flickerstreak@1
|
369 min = 0,
|
flickerstreak@1
|
370 max = 100,
|
flickerstreak@1
|
371 step = 1,
|
flickerstreak@7
|
372 order = 6,
|
flickerstreak@1
|
373 },
|
flickerstreak@1
|
374
|
flickerstreak@1
|
375 delete = {
|
flickerstreak@1
|
376 type = "execute",
|
flickerstreak@7
|
377 name = "Delete Bar #"..bar.barID,
|
flickerstreak@7
|
378 desc = "Deletes bar #"..bar.barID,
|
flickerstreak@7
|
379 func = function() main:DeleteBar(bar.barID) end,
|
flickerstreak@7
|
380 order = 7
|
flickerstreak@1
|
381 },
|
flickerstreak@1
|
382 }
|
flickerstreak@1
|
383 }
|
flickerstreak@7
|
384
|
flickerstreak@7
|
385 -- generate the auto-hide options for shapeshift forms. Note that this will
|
flickerstreak@7
|
386 -- only show forms that the character has learned, and the ordering may (? did this get fixed?)
|
flickerstreak@7
|
387 -- vary from character to character of the same class
|
flickerstreak@7
|
388 local args = opts.args.visibility.args.conditional.args
|
flickerstreak@7
|
389 for i = 1, GetNumShapeshiftForms() do
|
flickerstreak@7
|
390 local _, name = GetShapeshiftFormInfo(i)
|
flickerstreak@7
|
391 args["stance"..i] = {
|
flickerstreak@7
|
392 type = "toggle",
|
flickerstreak@7
|
393 name = "Show In "..name,
|
flickerstreak@7
|
394 desc = "Show the bar when in "..name.."." ,
|
flickerstreak@7
|
395 get = function() end,
|
flickerstreak@7
|
396 set = function() end,
|
flickerstreak@7
|
397 order = #args + 1,
|
flickerstreak@7
|
398 disabled = true,
|
flickerstreak@7
|
399 }
|
flickerstreak@7
|
400 end
|
flickerstreak@7
|
401
|
flickerstreak@7
|
402 return opts
|
flickerstreak@1
|
403 end
|
flickerstreak@1
|
404
|