/Tukui/modules/blizzard/capturebar.lua

http://github.com/Asphyxia/Tukui · Lua · 22 lines · 18 code · 3 blank · 1 comment · 6 complexity · 413569142a129037a8c1bc4e70ec6ad6 MD5 · raw file

  1. local T, C, L = unpack(select(2, ...)) -- Import: T - functions, constants, variables; C - config; L - locales
  2. -- reposition capture bar to top/center of the screen
  3. local function CaptureUpdate()
  4. if NUM_EXTENDED_UI_FRAMES then
  5. local captureBar
  6. for i=1, NUM_EXTENDED_UI_FRAMES do
  7. captureBar = getglobal("WorldStateCaptureBar" .. i)
  8. if captureBar and captureBar:IsVisible() then
  9. captureBar:ClearAllPoints()
  10. if( i == 1 ) then
  11. captureBar:Point("TOP", UIParent, "TOP", 0, -120)
  12. else
  13. captureBar:Point("TOPLEFT", getglobal("WorldStateCaptureBar" .. i - 1 ), "TOPLEFT", 0, -25)
  14. end
  15. end
  16. end
  17. end
  18. end
  19. hooksecurefunc("UIParent_ManageFramePositions", CaptureUpdate)