view Defaults.lua @ 11:88df7235ad8b

Version 0.33, part 2
author Flick <flickerstreak@gmail.com>
date Tue, 20 Mar 2007 21:38:47 +0000
parents f3a7bfebc283
children 90bf38d48efd
line wrap: on
line source
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()


-- default saved variables
ReAction_DefaultProfile = {
  hideArt = false,
  bars = { },
  bindings = { }
}

ReAction_DefaultBarConfig = {
  ["ReAction"] = {
    ["Action"] = {
      visible = true,
      size = 36,
      spacing = 6,
      rows = 1,
      columns = 12,
      pages = nil,
      opacity = 100,
      anchor = {
        frame = "UIParent",
        point = "CENTER",
        relPoint = "CENTER",
        x = 0,
        y = 0,
      },
      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),
  },

  -- pet action bar
  [10] = {
    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 i = 1, 10 do
  bars[10].btnConfig.ids[i] = { i }
end