annotate Options.lua @ 13:2b2dd11e5cc2

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