WoWInterface SVN FluidFrames

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 4 to Rev 3
    Reverse comparison

Rev 4 → Rev 3

trunk/FluidFrames/FluidFrames.toc
5,7 → 5,7
## RequiredDeps: Portfolio
## OptionalDeps:
## SavedVariablesPerCharacter: FluidFramesModifiedFrames, FluidFrames_SavedVars
## Version: 2.2
## Version: 2.1
## X-Date: Oct 15 2008
## X-Category: Frames
## X-Website: http://www.wowinterface.com/downloads/info7080-FluidFrames.html
trunk/FluidFrames/readme.rtf
112,10 → 112,6
\b\fs36 \cf2 Change Log:
\b0\fs24 \cf0 \
\
v2.2\
- Enabled SendMailFrame, TokenFrame, and the PetPaperDollFrameCompanionFrame for dragging their parent frame\
- Found a bug that was breaking UIChildWindows dragging, but then decided to just disable it by design, since those frames are all anchored to their parent frame, which are draggable.\
\
v2.1\
- Changed distribution to distribute FluidFrames with Portfolio unembedded.\
- Fixed bug that caused LoD UI Panels to not be temporarily draggable\
trunk/FluidFrames/FluidFrames.lua
56,10 → 56,7
"SkillFrame",
"PVPFrameHonor",
"PetPaperDollFrame",
"PetPaperDollFrameCompanionFrame",
"TokenFrame",
"PVPFrame",
"SendMailFrame",
}
 
FluidFrames.FramesToInitLater = {
137,8 → 134,10
frame:SetMovable(1)
frame:SetUserPlaced(1)
frame.FFImmobilized = true
 
FluidFrames.SetImmobilizeHooks(frame)
hooksecurefunc(frame, "SetPoint", FluidFrames.SetPointHook)
hooksecurefunc(frame, "SetWidth", FluidFrames.SetWidthHook)
hooksecurefunc(frame, "SetHeight", FluidFrames.SetHeightHook)
frame.FFSetXHooked = true
end
 
-- Store frame to hide later (so that it doesn't hide moved child frames before they are reparented)
176,8 → 175,7
end
end
 
--[[
for i,frameName in pairs(UIChildWindows) do
for frameName,info in pairs(UIChildWindows) do
local frame = getglobal(frameName)
if (frame and frame.GetTitleRegion) then
local titleRegion = frame:GetTitleRegion()
188,7 → 186,6
frame:EnableMouse(1)
end
end
]]--
 
-- Disable the mouse on a few child frames so that the parent is draggable
for i,frameName in ipairs(FluidFrames.FramesToDragByParent) do
239,8 → 236,7
end
end
 
--[[
for i,frameName in pairs(UIChildWindows) do
for frameName,info in pairs(UIChildWindows) do
local frame = getglobal(frameName)
if (frame and frame.GetTitleRegion) then
local titleRegion = frame:GetTitleRegion()
255,7 → 251,6
end
end
end
]]--
 
--Exceptions
local titleRegion = MinimapCluster:GetTitleRegion()
986,7 → 981,7
 
function FluidFrames.SetPointHook(self, ...)
if (self.FFImmobilized) then
--DebugPrint(format("%s:SetPoint intercepted - Immobilized.", self:GetName()))
DebugPrint(format("%s:SetPoint intercepted - Immobilized.", self:GetName()))
local data = FluidFramesModifiedFrames[self:GetName()]
if (data and data.immobilized) then
if (self:IsProtected() and InCombatLockdown()) then
1000,7 → 995,7
end
end
else
--DebugPrint(format("%s:SetPoint intercepted - Mobile: %s.", self:GetName(), (this and this.GetName and this:GetName() or "Unknown")))
DebugPrint(format("%s:SetPoint intercepted - Mobile: %s.", self:GetName(), (this and this.GetName and this:GetName() or "Unknown")))
end
end
 
1038,33 → 1033,15
end
end
 
function FluidFrames.SetParentHook(self, oldParent)
if (self.FFImmobilized) then
local newParent = getglobal(FluidFrames.NEW_PARENT)
DebugPrint(format("%s:SetParent intercepted - %s.", self:GetName(), oldParent.GetName and oldParent:GetName() or oldParent))
-- Undo SetParent
self.FFImmobilized = nil
FluidFrames.ReparentAssociatedFrames(self, oldParent, newParent)
self.FFImmobilized = true
end
end
 
function FluidFrames.SetImmobilizeHooks(frame)
if (not frame.FFSetXHooked) then
hooksecurefunc(frame, "SetPoint", FluidFrames.SetPointHook)
hooksecurefunc(frame, "SetWidth", FluidFrames.SetWidthHook)
hooksecurefunc(frame, "SetHeight", FluidFrames.SetHeightHook)
hooksecurefunc(frame, "SetParent", FluidFrames.SetParentHook)
frame.FFSetXHooked = true
end
end
 
 
function FluidFrames.Immobilize(frame)
if (frame.GetName and frame:GetName()) then
 
FluidFrames.SetImmobilizeHooks(frame)
 
if (not frame.FFSetXHooked) then
hooksecurefunc(frame, "SetPoint", FluidFrames.SetPointHook)
hooksecurefunc(frame, "SetWidth", FluidFrames.SetWidthHook)
hooksecurefunc(frame, "SetHeight", FluidFrames.SetHeightHook)
frame.FFSetXHooked = true
end
-- Should be just a single point relative to UIParent. Maybe store in SV? Set relativeTo = "UIParent"?
local data = FluidFramesModifiedFrames[frame:GetName()]
if (data) then
1098,9 → 1075,12
 
function FluidFrames.ImmobilizeAndStoreDimentions(frame, storeScale, storeDimentions)
if (frame.GetName and frame:GetName()) then
 
FluidFrames.SetImmobilizeHooks(frame)
 
if (not frame.FFSetXHooked) then
hooksecurefunc(frame, "SetPoint", FluidFrames.SetPointHook)
hooksecurefunc(frame, "SetWidth", FluidFrames.SetWidthHook)
hooksecurefunc(frame, "SetHeight", FluidFrames.SetHeightHook)
frame.FFSetXHooked = true
end
-- Should be just a single point relative to UIParent. Maybe store in SV? Set relativeTo = "UIParent"?
local data = FluidFramesModifiedFrames[frame:GetName()]
if (data) then