flickerstreak@7: local function tcopy(t) flickerstreak@7: local r = { } flickerstreak@7: for k, v in pairs(t) do flickerstreak@7: r[k] = (type(v) == "table" and tcopy(v) or v) flickerstreak@7: end flickerstreak@7: return r flickerstreak@7: end flickerstreak@7: flickerstreak@1: -- ReAction default variable tables flickerstreak@7: local defaultActionConfig = ReAction:GetButtonType("Action"):GetDefaultProfile() flickerstreak@7: local defaultPetActionConfig = ReAction:GetButtonType("Pet Action"):GetDefaultProfile() flickerstreak@1: flickerstreak@1: flickerstreak@7: -- default saved variables flickerstreak@7: ReAction_DefaultProfile = { flickerstreak@7: hideArt = false, flickerstreak@10: bars = { }, flickerstreak@10: bindings = { } flickerstreak@1: } flickerstreak@1: flickerstreak@7: ReAction_DefaultBarConfig = { flickerstreak@7: ["ReAction"] = { flickerstreak@7: ["Action"] = { flickerstreak@7: visible = true, flickerstreak@1: size = 36, flickerstreak@1: spacing = 6, flickerstreak@1: rows = 1, flickerstreak@1: columns = 12, flickerstreak@7: pages = nil, flickerstreak@1: opacity = 100, flickerstreak@7: anchor = { flickerstreak@7: frame = "UIParent", flickerstreak@7: point = "CENTER", flickerstreak@7: relPoint = "CENTER", flickerstreak@7: x = 0, flickerstreak@7: y = 0, flickerstreak@1: }, flickerstreak@7: btnConfig = tcopy(defaultActionConfig) flickerstreak@7: }, flickerstreak@7: ["Pet Action"] = { flickerstreak@7: visible = true, flickerstreak@7: parent = "PetActionBarFrame", flickerstreak@7: size = 30, flickerstreak@7: spacing = 8, flickerstreak@7: rows = 1, flickerstreak@7: columns = 10, flickerstreak@7: pages = nil, flickerstreak@7: opacity = 100, flickerstreak@7: anchor = { flickerstreak@7: frame = "UIParent", flickerstreak@7: point = "CENTER", flickerstreak@7: relPoint = "CENTER", flickerstreak@7: x = 0, flickerstreak@7: y = 0, flickerstreak@7: }, flickerstreak@7: btnConfig = tcopy(defaultPetActionConfig), flickerstreak@7: } flickerstreak@7: }, flickerstreak@7: } flickerstreak@1: flickerstreak@7: -- startup layout replicates Blizzard layout (only set on first-run or reset) flickerstreak@7: ReAction_DefaultBlizzardBars = { flickerstreak@7: flickerstreak@7: -- main paged action bar flickerstreak@7: [1] = { flickerstreak@7: visible = true, flickerstreak@7: size = 36, flickerstreak@7: spacing = 6, flickerstreak@7: rows = 1, flickerstreak@7: columns = 12, flickerstreak@7: growLeft = false, flickerstreak@7: growUp = false, flickerstreak@7: columnMajor = false, flickerstreak@7: pages = { flickerstreak@7: n = 6, flickerstreak@7: showControls = true, flickerstreak@7: controlsLoc = "Blizzard", flickerstreak@7: autoStanceSwitch = true, -- priests will get a shadowform bar switch, unlike blizzard's flickerstreak@7: autoStealthSwitch = true, -- this is different from blizzard's layout, only for druids flickerstreak@1: }, flickerstreak@7: opacity = 100, flickerstreak@7: anchor = { flickerstreak@7: frame = "MainMenuBarArtFrame", flickerstreak@7: point = "BOTTOMLEFT", flickerstreak@7: relPoint = "BOTTOMLEFT", flickerstreak@7: x = 3, flickerstreak@7: y = 0, flickerstreak@7: }, flickerstreak@7: btnConfig = tcopy(defaultActionConfig), flickerstreak@7: }, flickerstreak@7: flickerstreak@7: -- pet action bar flickerstreak@8: [10] = { flickerstreak@7: visible = true, flickerstreak@7: parent = "PetActionBarFrame", flickerstreak@7: size = 30, flickerstreak@7: spacing = 8, flickerstreak@7: rows = 1, flickerstreak@7: columns = 10, flickerstreak@7: growLeft = false, flickerstreak@7: growUp = false, flickerstreak@7: columnMajor = false, flickerstreak@7: pages = nil, flickerstreak@7: opacity = 100, flickerstreak@7: anchor = { flickerstreak@7: frame = "PetActionBarFrame", flickerstreak@7: point = "BOTTOMLEFT", flickerstreak@7: relPoint = "BOTTOMLEFT", flickerstreak@7: x = 31, flickerstreak@7: y = -1, flickerstreak@7: }, flickerstreak@7: btnConfig = tcopy(defaultPetActionConfig), flickerstreak@7: }, flickerstreak@7: flickerstreak@7: } flickerstreak@7: flickerstreak@7: -- default settings for action IDs match Blizzard's settings... flickerstreak@7: -- ... except on the main bar extra pages, which map directly to the default shapeshift IDs flickerstreak@7: -- rather than mirroring the multi action bars, to give access to all 120 actions flickerstreak@7: local bars = ReAction_DefaultBlizzardBars flickerstreak@7: flickerstreak@7: for i = 1, 12 do flickerstreak@7: bars[1].btnConfig.ids[i] = { flickerstreak@7: i, flickerstreak@7: 72+i, flickerstreak@7: 84+i, flickerstreak@7: 96+i, flickerstreak@7: 108+i, flickerstreak@7: 12+i flickerstreak@1: } flickerstreak@7: end flickerstreak@7: flickerstreak@8: for i = 1, 10 do flickerstreak@8: bars[10].btnConfig.ids[i] = { i } flickerstreak@7: end flickerstreak@7: flickerstreak@7: