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