/Tukui/modules/actionbars/Bar2.lua

http://github.com/Asphyxia/Tukui · Lua · 34 lines · 25 code · 5 blank · 4 comment · 8 complexity · 8f9d701a0967ffe10435fa550dd55818 MD5 · raw file

  1. local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales
  2. if not C["actionbar"].enable == true then return end
  3. ---------------------------------------------------------------------------
  4. -- setup MultiBarBottomLeft as bar #2
  5. ---------------------------------------------------------------------------
  6. local bar = TukuiBar2
  7. MultiBarBottomLeft:SetParent(bar)
  8. -- setup the bar
  9. for i=1, 12 do
  10. local b = _G["MultiBarBottomLeftButton"..i]
  11. local b2 = _G["MultiBarBottomLeftButton"..i-1]
  12. b:Size(T.buttonsize, T.buttonsize)
  13. b:ClearAllPoints()
  14. b:SetFrameStrata("BACKGROUND")
  15. b:SetFrameLevel(15)
  16. if C["actionbar"].mainswap then
  17. if i == 1 then
  18. b:Point("TOP", ActionButton1, "BOTTOM", 0, -T.buttonspacing)
  19. else
  20. b:Point("LEFT", b2, "RIGHT", T.buttonspacing, 0)
  21. end
  22. else
  23. if i == 1 then
  24. b:Point("BOTTOM", ActionButton1, "TOP", 0, T.buttonspacing)
  25. else
  26. b:Point("LEFT", b2, "RIGHT", T.buttonspacing, 0)
  27. end
  28. end
  29. end