View Single Post
11-02-13, 05:30 PM   #1
Mayron
A Frostmaul Preserver
 
Mayron's Avatar
AddOn Author - Click to view addons
Join Date: Jan 2010
Posts: 275
Trying to move CompactRaidFrameManager

Hi and sorry if recently I have posted a lot. This is the last issue I have till my UI should be finished.

I want to move the CompactRaidFrameManager window on the left as its in the way of my chat box as I have it at the top left corner instead. To move it I used the following code:

Lua Code:
  1. function eventHandlers.PLAYER_ENTERING_WORLD()
  2.     if CompactRaidFrameManager:IsVisible() then
  3.         local point, relativeTo, relativePoint, xOfs, yOfs = CompactRaidFrameManager:GetPoint()
  4.         CompactRaidFrameManager:SetPoint(point, relativeTo, relativePoint, xOfs, -300)
  5.     end
  6. end
  7.  
  8.  
  9. CompactRaidFrameManagerToggleButton:HookScript("OnClick", function()
  10.     if CompactRaidFrameManager:IsVisible() then  
  11.         local point, relativeTo, relativePoint, xOfs, yOfs = CompactRaidFrameManager:GetPoint()
  12.         CompactRaidFrameManager:SetPoint(point, relativeTo, relativePoint, xOfs, -300)
  13.     end
  14. end)

This works however if you click the "CompactRaidFrameManagerToggleButton" Button while in combat it resets its position. I have been looking for a solution and found the code below but it doesn't do anything, most likely because I'm using it wrong and not sure what to do with it.

Lua Code:
  1. if CompactRaidFrameManager.collapsed then    
  2.         CompactRaidFrameManager:SetScript("OnUpdate", nil)
  3. end

Thought I might as well ask for help in case someone has encountered this issue before and knows a fix. Greatly appreciated! Thank you for reading
  Reply With Quote