annotate Options.lua @ 2:8e0ff8ae4c08

Version 0.2
author Flick <flickerstreak@gmail.com>
date Tue, 20 Mar 2007 21:08:31 +0000
parents c11ca1d8ed91
children f920db5fc6b1
rev   line source
flickerstreak@1 1 -- Ace2 Options table for ReAction
flickerstreak@1 2
flickerstreak@1 3 ReActionConsoleOptions = {
flickerstreak@1 4 type="group",
flickerstreak@1 5 args={
flickerstreak@1 6 lock = {
flickerstreak@1 7 type = "execute",
flickerstreak@1 8 name = "lock",
flickerstreak@1 9 desc = "Locks action bars and disables rearrangement",
flickerstreak@1 10 func = "Lock",
flickerstreak@1 11 },
flickerstreak@1 12
flickerstreak@1 13 unlock = {
flickerstreak@1 14 type = "execute",
flickerstreak@1 15 name = "unlock",
flickerstreak@1 16 desc = "Unlocks action bars and enables rearrangement",
flickerstreak@1 17 func = "Unlock",
flickerstreak@1 18 },
flickerstreak@1 19
flickerstreak@2 20 bindings = {
flickerstreak@2 21 type = "execute",
flickerstreak@2 22 name = "bindings",
flickerstreak@2 23 desc = "Launches keybinding setup mode",
flickerstreak@2 24 func = function() ReBinder:Enable() end,
flickerstreak@2 25 },
flickerstreak@2 26
flickerstreak@1 27 hideart = {
flickerstreak@1 28 type = "toggle",
flickerstreak@1 29 name = "hideart",
flickerstreak@1 30 desc = "Hide default Blizzard action bar artwork and XP bar",
flickerstreak@1 31 get = "IsArtHidden",
flickerstreak@1 32 set = "ToggleHideArt",
flickerstreak@1 33 },
flickerstreak@1 34
flickerstreak@1 35 new = {
flickerstreak@1 36 type = "execute",
flickerstreak@1 37 name = "new",
flickerstreak@1 38 desc = "Create a new bar with default settings",
flickerstreak@1 39 func = "NewBar"
flickerstreak@1 40 },
flickerstreak@1 41
flickerstreak@1 42 showid = {
flickerstreak@1 43 type = "toggle",
flickerstreak@1 44 name = "showid",
flickerstreak@1 45 desc = "Show ActionIDs on buttons",
flickerstreak@1 46 get = "IsActionIDVisible",
flickerstreak@1 47 set = "ToggleActionID",
flickerstreak@1 48 },
flickerstreak@1 49
flickerstreak@2 50 resetall = {
flickerstreak@1 51 type = "execute",
flickerstreak@2 52 name = "resetall",
flickerstreak@1 53 desc = "Resets to single bar in the default position",
flickerstreak@1 54 func = "ResetBars"
flickerstreak@1 55 },
flickerstreak@1 56
flickerstreak@1 57 --[[
flickerstreak@1 58 resync = {
flickerstreak@1 59 type = "execute",
flickerstreak@1 60 name = "resync",
flickerstreak@1 61 desc = "Re-orders action IDs sequentially amongst bars",
flickerstreak@1 62 func = "ResyncActionIDs"
flickerstreak@1 63 },
flickerstreak@1 64 ]]
flickerstreak@1 65 }
flickerstreak@1 66 }
flickerstreak@1 67
flickerstreak@1 68
flickerstreak@1 69 ReActionGlobalMenuOptions = {
flickerstreak@1 70 type="group",
flickerstreak@1 71 args={
flickerstreak@2 72 lockbars = {
flickerstreak@1 73 type = "toggle",
flickerstreak@2 74 name = "Lock Bars",
flickerstreak@1 75 desc = "Locks action bars and disables rearrangement",
flickerstreak@1 76 get = function() return ReAction:IsLocked() end,
flickerstreak@1 77 set = function() ReAction:ToggleLocked() end,
flickerstreak@2 78 order = 1,
flickerstreak@2 79 },
flickerstreak@2 80
flickerstreak@2 81 lockbtns = {
flickerstreak@2 82 type = "toggle",
flickerstreak@2 83 name = "Lock Buttons",
flickerstreak@2 84 desc = "Locks action bars and disables rearrangement",
flickerstreak@2 85 get = function() return LOCK_ACTIONBAR == "1" end,
flickerstreak@2 86 set = function() LOCK_ACTIONBAR = (LOCK_ACTIONBAR == "1" and "0" or "1") end,
flickerstreak@1 87 order = 2,
flickerstreak@1 88 },
flickerstreak@1 89
flickerstreak@2 90 bindings = {
flickerstreak@2 91 type = "execute",
flickerstreak@2 92 name = "Set Key Bindings",
flickerstreak@2 93 desc = "Launches keybinding setup mode",
flickerstreak@2 94 func = function() ReBinder:Enable() end,
flickerstreak@2 95 order = 3,
flickerstreak@2 96 },
flickerstreak@2 97
flickerstreak@1 98 new = {
flickerstreak@1 99 type = "execute",
flickerstreak@1 100 name = "New Bar",
flickerstreak@1 101 desc = "Create a new bar with default settings",
flickerstreak@1 102 func = function() ReAction:NewBar() end,
flickerstreak@2 103 order = 4,
flickerstreak@1 104 },
flickerstreak@1 105
flickerstreak@1 106 showid = {
flickerstreak@1 107 type = "toggle",
flickerstreak@1 108 name = "Show Action IDs",
flickerstreak@1 109 desc = "Show ActionIDs on buttons",
flickerstreak@1 110 get = function() return ReAction:IsActionIDVisible() end,
flickerstreak@1 111 set = function() ReAction:ToggleActionID() end,
flickerstreak@2 112 order = 5,
flickerstreak@1 113 },
flickerstreak@1 114
flickerstreak@1 115 --[[
flickerstreak@1 116 resync = {
flickerstreak@1 117 type = "execute",
flickerstreak@1 118 name = "Re-sync Action IDs",
flickerstreak@1 119 desc = "Re-orders action IDs sequentially amongst bars",
flickerstreak@1 120 func = function() ReAction:ResyncActionIDs() end,
flickerstreak@2 121 order = 6,
flickerstreak@1 122 },
flickerstreak@1 123 ]]
flickerstreak@1 124
flickerstreak@1 125 hideart = {
flickerstreak@1 126 type = "toggle",
flickerstreak@1 127 name = "Hide Default Art",
flickerstreak@1 128 desc = "Hide default Blizzard action bar artwork and XP bar",
flickerstreak@1 129 get = function() return ReAction:IsArtHidden() end,
flickerstreak@1 130 set = function() return ReAction:ToggleHideArt() end,
flickerstreak@2 131 order = 7,
flickerstreak@1 132 },
flickerstreak@1 133
flickerstreak@2 134 --[[
flickerstreak@1 135 reset = {
flickerstreak@1 136 type = "execute",
flickerstreak@1 137 name = "Reset Bars",
flickerstreak@1 138 desc = "Resets to single bar in the default position",
flickerstreak@1 139 func = function() ReAction:ResetBars() end,
flickerstreak@2 140 order = 8,
flickerstreak@1 141 },
flickerstreak@2 142 ]]
flickerstreak@1 143
flickerstreak@1 144 }
flickerstreak@1 145 }
flickerstreak@1 146
flickerstreak@1 147 function GenerateReActionBarOptions( bar )
flickerstreak@1 148 return {
flickerstreak@1 149 type = "group",
flickerstreak@1 150 args = {
flickerstreak@1 151
flickerstreak@1 152 sep1 = {
flickerstreak@1 153 type = "header",
flickerstreak@1 154 name = " ",
flickerstreak@1 155 desc = " ",
flickerstreak@2 156 order = 9,
flickerstreak@1 157 },
flickerstreak@1 158
flickerstreak@1 159 hdr1 = {
flickerstreak@1 160 type = "header",
flickerstreak@1 161 name = "Bar Options",
flickerstreak@1 162 des = "Bar Options",
flickerstreak@2 163 order = 10,
flickerstreak@1 164 },
flickerstreak@1 165
flickerstreak@1 166 --[[
flickerstreak@1 167 hidden = {
flickerstreak@1 168 type = "toggle",
flickerstreak@1 169 name = "Hidden",
flickerstreak@1 170 desc = "Hides the bar except when rearranging bars",
flickerstreak@1 171 get = function() return not bar:GetVisibility() end,
flickerstreak@1 172 set = function() bar:ToggleVisibility() end,
flickerstreak@2 173 order = 11,
flickerstreak@1 174 },
flickerstreak@1 175 ]]
flickerstreak@1 176
flickerstreak@1 177 opacity = {
flickerstreak@1 178 type = "range",
flickerstreak@1 179 name = "Opacity",
flickerstreak@1 180 desc = "Set bar opacity",
flickerstreak@1 181 get = function() return bar:GetOpacity() end,
flickerstreak@1 182 set = function(o) bar:SetOpacity(o) end,
flickerstreak@1 183 min = 0,
flickerstreak@1 184 max = 100,
flickerstreak@1 185 step = 1,
flickerstreak@2 186 order = 12
flickerstreak@1 187 },
flickerstreak@1 188
flickerstreak@1 189 delete = {
flickerstreak@1 190 type = "execute",
flickerstreak@1 191 name = "Delete Bar",
flickerstreak@1 192 desc = "Deletes the bar",
flickerstreak@1 193 func = function() ReAction:DeleteBar(bar.barID) end,
flickerstreak@2 194 order = 13,
flickerstreak@1 195 },
flickerstreak@1 196 }
flickerstreak@1 197 }
flickerstreak@1 198 end
flickerstreak@1 199
flickerstreak@1 200
flickerstreak@1 201 local function setButtonConfig( bar, field, value )
flickerstreak@1 202 if bar and bar.config and bar.config.btnConfig then
flickerstreak@1 203 bar.config.btnConfig[field] = value
flickerstreak@1 204 for _, b in ipairs(bar.buttons) do
flickerstreak@1 205 b:ApplyLayout()
flickerstreak@1 206 b:UpdateDisplay()
flickerstreak@1 207 end
flickerstreak@1 208 end
flickerstreak@1 209 end
flickerstreak@1 210
flickerstreak@1 211 local function getButtonConfig( bar, field )
flickerstreak@2 212 if bar and bar.config and bar.config.btnConfig then
flickerstreak@1 213 return bar.config.btnConfig[field]
flickerstreak@1 214 end
flickerstreak@1 215 end
flickerstreak@1 216
flickerstreak@1 217 local function toggleButtonConfig( bar, field )
flickerstreak@1 218 if bar and bar.config and bar.config.btnConfig then
flickerstreak@1 219 bar.config.btnConfig[field] = not bar.config.btnConfig[field]
flickerstreak@1 220 for _, b in ipairs(bar.buttons) do
flickerstreak@1 221 b:ApplyLayout()
flickerstreak@1 222 b:UpdateDisplay()
flickerstreak@1 223 end
flickerstreak@1 224 end
flickerstreak@1 225 end
flickerstreak@1 226
flickerstreak@1 227
flickerstreak@1 228 function GenerateReActionButtonOptions( bar )
flickerstreak@1 229 return {
flickerstreak@1 230 type = "group",
flickerstreak@1 231 args = {
flickerstreak@1 232
flickerstreak@1 233 sep2 = {
flickerstreak@1 234 type = "header",
flickerstreak@1 235 name = " ",
flickerstreak@1 236 desc = " ",
flickerstreak@2 237 order = 14,
flickerstreak@1 238 },
flickerstreak@1 239
flickerstreak@1 240 hdr2 = {
flickerstreak@1 241 type = "header",
flickerstreak@1 242 name = "Button Options",
flickerstreak@1 243 desc = "Button Options",
flickerstreak@2 244 order = 15,
flickerstreak@2 245 },
flickerstreak@2 246
flickerstreak@2 247 showgrid = {
flickerstreak@2 248 type = "toggle",
flickerstreak@2 249 name = "Always Show Buttons",
flickerstreak@2 250 desc = "Show button placeholders when no action is assigned or on the cursor. Note that buttons are always shown when bars are unlocked.",
flickerstreak@2 251 get = function() return getButtonConfig(bar, "showGrid") end,
flickerstreak@2 252 set = function() toggleButtonConfig(bar, "showGrid") end,
flickerstreak@2 253 order = 16,
flickerstreak@1 254 },
flickerstreak@1 255
flickerstreak@1 256 colorkeys = {
flickerstreak@1 257 type = "toggle",
flickerstreak@1 258 name = "Color Hotkeys",
flickerstreak@1 259 desc = "Enables/disables colorizing hotkeys by key modifier",
flickerstreak@1 260 get = function() return getButtonConfig(bar, "keyBindColorCode") end,
flickerstreak@1 261 set = function() toggleButtonConfig(bar, "keyBindColorCode", c) end,
flickerstreak@2 262 order = 17,
flickerstreak@1 263 },
flickerstreak@1 264
flickerstreak@1 265 keyloc = {
flickerstreak@1 266 type = "text",
flickerstreak@1 267 name = "Hotkey Location",
flickerstreak@1 268 desc = "Sets hotkey location",
flickerstreak@1 269 get = function() return getButtonConfig(bar, "keyBindLoc") end,
flickerstreak@1 270 set = function(loc) setButtonConfig(bar, "keyBindLoc", loc) end,
flickerstreak@1 271 validate = { "TOP", "BOTTOM", "TOPLEFT", "TOPRIGHT", "BOTTOMLEFT", "BOTTOMRIGHT" },
flickerstreak@2 272 order = 18,
flickerstreak@1 273 },
flickerstreak@1 274
flickerstreak@1 275 }
flickerstreak@1 276 }
flickerstreak@1 277 end
flickerstreak@1 278
flickerstreak@1 279