From 458c8c42bffbbd14f1866d3881721c04eb5577d0 Mon Sep 17 00:00:00 2001 From: Xruptor Date: Mon, 8 Oct 2012 22:06:41 -0400 Subject: [PATCH] -Updated frame positioning to be one right on top of each other, like it used to be. -Frames now properly show up where they are supposed to and don't randomly wander. -Changed to hooksecure functions to capture loot events and modify after it's been called. - --- LootRollMover.lua | 16 +++++++++++++--- LootRollMover.toc | 2 +- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/LootRollMover.lua b/LootRollMover.lua index f205e73..f9c7f40 100644 --- a/LootRollMover.lua +++ b/LootRollMover.lua @@ -78,13 +78,22 @@ local function RepositionLootFrames() if ( frame ) then frame:ClearAllPoints() frame:SetPoint("BOTTOMLEFT", _G["LootRollMoverAnchor_Frame"], "BOTTOMLEFT", 4, 2) - frame:SetParent(UIParent) frame:SetScale(LRMDB.scale) end for i=1, NUM_GROUP_LOOT_FRAMES do frame = _G["GroupLootFrame" .. i] - if ( frame ) then - frame:SetScale(LRMDB.scale) + if i == 1 then + if ( frame ) then + frame:ClearAllPoints() + frame:SetPoint("BOTTOMLEFT", _G["LootRollMoverAnchor_Frame"], "BOTTOMLEFT", 4, 2) + frame:SetScale(LRMDB.scale) + end + elseif i > 1 then + if ( frame ) then + frame:ClearAllPoints() + frame:SetPoint("BOTTOM", "GroupLootFrame" .. (i-1), "TOP", 0, 3) + frame:SetScale(LRMDB.scale) + end end end end @@ -94,6 +103,7 @@ hooksecurefunc("GroupLootContainer_RemoveFrame", RepositionLootFrames) hooksecurefunc("GroupLootFrame_OnShow", RepositionLootFrames) hooksecurefunc("GroupLootFrame_OpenNewFrame", RepositionLootFrames) hooksecurefunc("GroupLootFrame_OnEvent", RepositionLootFrames) +hooksecurefunc("GroupLootContainer_Update", RepositionLootFrames) hooksecurefunc("AlertFrame_FixAnchors", RepositionLootFrames) function f:DrawAnchor() diff --git a/LootRollMover.toc b/LootRollMover.toc index a98cbd3..dd727f0 100644 --- a/LootRollMover.toc +++ b/LootRollMover.toc @@ -1,7 +1,7 @@ ## Interface: 50001 ## Title: LootRollMover ## Author: Xruptor -## Version: 3.1 +## Version: 3.2 ## Notes: A simple mod to move the default Blizzard Group Loot Roll Windows ## SavedVariables: LRMDB -- 1.7.9.5