Mercurial > wow > reaction
diff Defaults.lua @ 7:f920db5fc6b1
version 0.3
author | Flick <flickerstreak@gmail.com> |
---|---|
date | Tue, 20 Mar 2007 21:25:29 +0000 |
parents | c11ca1d8ed91 |
children | c05fd3e18b4f |
line wrap: on
line diff
--- a/Defaults.lua Tue Mar 20 21:20:20 2007 +0000 +++ b/Defaults.lua Tue Mar 20 21:25:29 2007 +0000 @@ -1,79 +1,231 @@ +local function tcopy(t) + local r = { } + for k, v in pairs(t) do + r[k] = (type(v) == "table" and tcopy(v) or v) + end + return r +end + -- ReAction default variable tables +local defaultActionConfig = ReAction:GetButtonType("Action"):GetDefaultProfile() +local defaultPetActionConfig = ReAction:GetButtonType("Pet Action"):GetDefaultProfile() --- configuration options for ReActionButton groups -ReActionButtonConfigDefaults = { - type = "ReActionButton", - actionIDs = { }, - keyBindLoc = "TOPLEFT", - keyBindColorCode = true, - stackCountLoc = "BOTTOMRIGHT", - showKeyBind = true, - showNumericCooldown = false, - showStackCount = true, - showMacroName = true, - showGrid = true, +-- default saved variables +ReAction_DefaultProfile = { + hideArt = false, + + bars = { } } -ReActionBarConfigDefaults = { - visibility = true, - size = 36, - spacing = 6, - rows = 1, - columns = 12, - pages = 1, - opacity = 100, - anchor = { - to = "UIParent", - point = "CENTER", - relPoint = "CENTER", - x = 0, - y = 0 - }, - btnConfig = ReActionButtonConfigDefaults -} - - - --- default variables -ReActionProfileDefaults = { - - -- global options - hideArt = false, - - - -- default layout replicates Blizzard layout - bars = { - - -- main paged action bar - [1] = { - visibility = true, +ReAction_DefaultBarConfig = { + ["ReAction"] = { + ["Action"] = { + visible = true, size = 36, spacing = 6, rows = 1, columns = 12, - pages = 5, + pages = nil, opacity = 100, - anchor = { - to = "UIParent", - point = "BOTTOMRIGHT", - relPoint = "BOTTOM", - x = 2, - y = -4 + anchor = { + frame = "UIParent", + point = "CENTER", + relPoint = "CENTER", + x = 0, + y = 0, }, - btnConfig = { - type = "ReActionButton", - actionIDs = { }, - keyBindLoc = "TOPLEFT", - keyBindColorCode = true, - stackCountLoc = "BOTTOMRIGHT", - showKeyBind = true, - showNumericCooldown = false, - showStackCount = true, - showMacroName = true, - showGrid = true, - } + btnConfig = tcopy(defaultActionConfig) + }, + ["Pet Action"] = { + visible = true, + parent = "PetActionBarFrame", + size = 30, + spacing = 8, + rows = 1, + columns = 10, + pages = nil, + opacity = 100, + anchor = { + frame = "UIParent", + point = "CENTER", + relPoint = "CENTER", + x = 0, + y = 0, + }, + btnConfig = tcopy(defaultPetActionConfig), + } + }, +} +-- startup layout replicates Blizzard layout (only set on first-run or reset) +ReAction_DefaultBlizzardBars = { + + -- main paged action bar + [1] = { + visible = true, + size = 36, + spacing = 6, + rows = 1, + columns = 12, + growLeft = false, + growUp = false, + columnMajor = false, + pages = { + n = 6, + showControls = true, + controlsLoc = "Blizzard", + autoStanceSwitch = true, -- priests will get a shadowform bar switch, unlike blizzard's + autoStealthSwitch = true, -- this is different from blizzard's layout, only for druids }, + opacity = 100, + anchor = { + frame = "MainMenuBarArtFrame", + point = "BOTTOMLEFT", + relPoint = "BOTTOMLEFT", + x = 3, + y = 0, + }, + btnConfig = tcopy(defaultActionConfig), + }, + + -- multibar right + [2] = { + visible = false, + size = 36, + spacing = 6, + rows = 12, + columns = 1, + growLeft = true, + growUp = false, + columnMajor = true, + pages = nil, + opacity = 100, + anchor = { + frame = "UIParent", + point = "BOTTOMRIGHT", + relPoint = "BOTTOMRIGHT", + x = -4, + y = 95, + }, + btnConfig = tcopy(defaultActionConfig), + }, + + -- multibar left + [3] = { + visible = false, + size = 36, + spacing = 6, + rows = 12, + columns = 1, + growLeft = true, + growUp = false, + columnMajor = true, + pages = nil, + opacity = 100, + anchor = { + frame = "UIParent", + point = "BOTTOMRIGHT", + relPoint = "BOTTOMRIGHT", + x = -51, + y = 95, + }, + btnConfig = tcopy(defaultActionConfig), + }, + + -- multibar bottom right + [4] = { + visible = false, + size = 36, + spacing = 6, + rows = 1, + columns = 12, + growLeft = false, + growUp = false, + columnMajor = false, + pages = nil, + opacity = 100, + anchor = { + frame = "MainMenuBarArtFrame", + point = "BOTTOMLEFT", + relPoint = "BOTTOMLEFT", + x = 514, + y = 53, + }, + btnConfig = tcopy(defaultActionConfig), + }, + + -- multibar bottom left + [5] = { + visible = false, + size = 36, + spacing = 6, + rows = 1, + columns = 12, + growLeft = false, + growUp = false, + columnMajor = false, + pages = nil, + opacity = 100, + anchor = { + frame = "MainMenuBarArtFrame", + point = "BOTTOMLEFT", + relPoint = "BOTTOMLEFT", + x = 3, + y = 53, + }, + btnConfig = tcopy(defaultActionConfig), + }, + + -- pet action bar + [6] = { + visible = true, + parent = "PetActionBarFrame", + size = 30, + spacing = 8, + rows = 1, + columns = 10, + growLeft = false, + growUp = false, + columnMajor = false, + pages = nil, + opacity = 100, + anchor = { + frame = "PetActionBarFrame", + point = "BOTTOMLEFT", + relPoint = "BOTTOMLEFT", + x = 31, + y = -1, + }, + btnConfig = tcopy(defaultPetActionConfig), + }, + +} + +-- default settings for action IDs match Blizzard's settings... +-- ... except on the main bar extra pages, which map directly to the default shapeshift IDs +-- rather than mirroring the multi action bars, to give access to all 120 actions +local bars = ReAction_DefaultBlizzardBars + +for i = 1, 12 do + bars[1].btnConfig.ids[i] = { + i, + 72+i, + 84+i, + 96+i, + 108+i, + 12+i } -} +end + +for b = 2, 5 do + for i = 1, 12 do + bars[b].btnConfig.ids[i] = { 12*(b-1) + i } + end +end + +for i = 1, 10 do + bars[6].btnConfig.ids[i] = { i } +end + +