View Single Post
12-04-14, 10:00 PM   #4
siweia
A Flamescale Wyrmkin
 
siweia's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2011
Posts: 126
Originally Posted by Xrystal View Post
Do you have an addon that does anything to the objective frame even as simple as moving it ?

I've noticed that the moment the main frame is re-parented in an addon the quest button becomes unsecure and kicks off a fuss with an error or just refuse to work. Could be coincidental.
Code:
local wf = ObjectiveTrackerFrame
wf:SetClampedToScreen(true)
wf:SetMovable(true)
wf:SetUserPlaced(true)
wf:ClearAllPoints()
wf.ClearAllPoints = function() end
wf:SetPoint("TOPRIGHT", UIParent, "TOPRIGHT", -100, -250)
wf.SetPoint = function() end
wf:SetHeight(450)
local function Moveit(f)
	f:EnableMouse(true)
	f:RegisterForDrag("LeftButton")
	f:SetHitRectInsets(-15, -15, -5, -5)
	f:SetScript("OnDragStart", function(s)
		wf:StartMoving()
	end)
	f:SetScript("OnDragStop", function(s)
		wf:StopMovingOrSizing()
	end)
end
Moveit(ObjectiveTrackerBlocksFrame.QuestHeader)
Moveit(ObjectiveTrackerBlocksFrame.ScenarioHeader)
Moveit(ObjectiveTrackerBlocksFrame.AchievementHeader)
These are the codes I use for move the frame.
  Reply With Quote