to Guardix. ace work there. simple. but was ace.
i did think to start with that it might be to do with
for _, item in pairs(mmframe) do
but could work out what to do. hehe.
ok i got every thing working ok. all thats bugging me is its not saving where i place them, this makes me think its due to the _G
as when i used
Code:
DurabilityFrame:EnableMouse(true)
DurabilityFrame:RegisterForDrag("LeftButton")
DurabilityFrame:SetClampedToScreen(true)
DurabilityFrame:SetMovable(true)
DurabilityFrame:SetScript("OnDragStart", function(self) if IsAltKeyDown() then self:StartMoving() end end)
DurabilityFrame:SetScript("OnDragStop", function(self) if IsAltKeyDown() then self:StopMovingOrSizing() end end)
when i /reload the ui. its in the place i left it.
but with this code it dont
Code:
local mmframe = {
_G["TicketStatusFrame"],
_G["DurabilityFrame"],
_G["Minimap"],
}
for _, item in pairs(mmframe) do
item:SetScript("OnDragStart", item.StartMoving)
item:SetScript("OnDragStop", item.StopMovingOrSizing)
end
SlashCmdList["test"] = function(arg1)
if arg1:lower() == "unlock" then
for _, item in next, mmframe do
item:SetMovable(true)
item:EnableMouse(true)
item:RegisterForDrag("LeftButton")
item:SetClampedToScreen(true)
end
print(wname.."|cFF00FFFF: unlocked for drag.|r")
elseif arg1:lower() == "lock" then
for _, item in next, mmframe do
item:SetMovable(false)
item:EnableMouse(false)
item:SetClampedToScreen(false)
end
print(wname.."|cFF00FFFF: locked for drag.|r")
else
print(wname..": Invalid command.")
end
end
and the bad thing with item:EnableMouse(false) is that you can use the left mouse button on the minimap.
as well as i still cant work out how to keep the place i left them in.