annotate Options.lua @ 10:f3a7bfebc283

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