View Single Post
07-30-06, 01:49 AM   #2
LaRIC
Premium Member
 
LaRIC's Avatar
Premium Member
AddOn Author - Click to view addons
Join Date: Jan 2005
Posts: 23
Actually I found the problem at last.

--Frame Functions
function AoFHeal_Function_OnMouseUp()
if ( aofhf.isMoving ) then
aofhf:StopMovingOrSizing();
aofhf.isMoving = false;
end
end
function AoFHeal_Function_OnMouseDown()
if ( ( ( not aofhf.isLocked ) or ( aofhf.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then
aofhf:StartMoving();
aofhf.isMoving = true;
end
end
function AoFHeal_Function_OnHide()
if ( ( ( not aofhf.isLocked ) or ( aofhf.isLocked == 0 ) ) and ( arg1 == "LeftButton" ) ) then
aofhf:StartMoving();
aofhf.isMoving = true;
end
end
-- Creating a frame
aofhf = CreateFrame("Frame","AofHeal_Frame_Main",UIParent)
aofhf:SetMovable(true)
aofhf:EnableMouse(true)
aofhf:SetScript("OnMouseUp",AoFHeal_Function_OnMouseUp)
aofhf:SetScript("OnMouseDown",AoFHeal_Function_OnMouseDown)
aofhf:SetScript("OnHide",AoFHeal_Function_OnHide)
aofhf:SetFrameStrata("LOW")
aofhf:SetWidth(160)
aofhf:SetHeight(110)
aofhf:SetBackdrop({bgFile = "Interface/DialogFrame/UI-DialogBox-Background",
edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
tile = true, tileSize = 32, edgeSize = 16,
insets = { left = 5, right = 5, top = 5, bottom = 5 }});
aofhftit = aofhf:CreateFontString("aofh_title","BACKGROUND",GameFontNormalSmall)
aofhftit:SetFont(STANDARD_TEXT_FONT, 11, "OUTLINE")
aofhftit:SetTextColor(1, 1, 0.2)
aofhftit:SetPoint("TOP", aofhf, "TOP", 0, 15)
aofhftit:SetText("AoF Heal")
aofhf:SetPoint("CENTER",0,0)
aofhf:RegisterForDrag("LeftButton")
aofhf:Show()
  Reply With Quote