annotate Options.lua @ 1:c11ca1d8ed91

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