WoWInterface SVN FluidFrames

Compare Revisions

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

Rev 3 → Rev 4

trunk/FluidFrames/FluidFrames.lua
56,7 → 56,10
"SkillFrame",
"PVPFrameHonor",
"PetPaperDollFrame",
"PetPaperDollFrameCompanionFrame",
"TokenFrame",
"PVPFrame",
"SendMailFrame",
}
 
FluidFrames.FramesToInitLater = {
134,10 → 137,8
frame:SetMovable(1)
frame:SetUserPlaced(1)
frame.FFImmobilized = true
hooksecurefunc(frame, "SetPoint", FluidFrames.SetPointHook)
hooksecurefunc(frame, "SetWidth", FluidFrames.SetWidthHook)
hooksecurefunc(frame, "SetHeight", FluidFrames.SetHeightHook)
frame.FFSetXHooked = true
 
FluidFrames.SetImmobilizeHooks(frame)
end
 
-- Store frame to hide later (so that it doesn't hide moved child frames before they are reparented)
175,7 → 176,8
end
end
 
for frameName,info in pairs(UIChildWindows) do
--[[
for i,frameName in pairs(UIChildWindows) do
local frame = getglobal(frameName)
if (frame and frame.GetTitleRegion) then
local titleRegion = frame:GetTitleRegion()
186,6 → 188,7
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
236,7 → 239,8
end
end
 
for frameName,info in pairs(UIChildWindows) do
--[[
for i,frameName in pairs(UIChildWindows) do
local frame = getglobal(frameName)
if (frame and frame.GetTitleRegion) then
local titleRegion = frame:GetTitleRegion()
251,6 → 255,7
end
end
end
]]--
 
--Exceptions
local titleRegion = MinimapCluster:GetTitleRegion()
981,7 → 986,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
995,7 → 1000,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
 
1033,15 → 1038,33
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
if (not frame.FFSetXHooked) then
hooksecurefunc(frame, "SetPoint", FluidFrames.SetPointHook)
hooksecurefunc(frame, "SetWidth", FluidFrames.SetWidthHook)
hooksecurefunc(frame, "SetHeight", FluidFrames.SetHeightHook)
frame.FFSetXHooked = true
end
 
FluidFrames.SetImmobilizeHooks(frame)
 
-- Should be just a single point relative to UIParent. Maybe store in SV? Set relativeTo = "UIParent"?
local data = FluidFramesModifiedFrames[frame:GetName()]
if (data) then
1075,12 → 1098,9
 
function FluidFrames.ImmobilizeAndStoreDimentions(frame, storeScale, storeDimentions)
if (frame.GetName and frame:GetName()) then
if (not frame.FFSetXHooked) then
hooksecurefunc(frame, "SetPoint", FluidFrames.SetPointHook)
hooksecurefunc(frame, "SetWidth", FluidFrames.SetWidthHook)
hooksecurefunc(frame, "SetHeight", FluidFrames.SetHeightHook)
frame.FFSetXHooked = true
end
 
FluidFrames.SetImmobilizeHooks(frame)
 
-- Should be just a single point relative to UIParent. Maybe store in SV? Set relativeTo = "UIParent"?
local data = FluidFramesModifiedFrames[frame:GetName()]
if (data) then
trunk/FluidFrames/FluidFrames.toc
5,7 → 5,7
## RequiredDeps: Portfolio
## OptionalDeps:
## SavedVariablesPerCharacter: FluidFramesModifiedFrames, FluidFrames_SavedVars
## Version: 2.1
## Version: 2.2
## X-Date: Oct 15 2008
## X-Category: Frames
## X-Website: http://www.wowinterface.com/downloads/info7080-FluidFrames.html
trunk/FluidFrames/readme.rtf
112,6 → 112,10
\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\