Like many people, with the new DF UI overhaul I was excited to try the game without ElvUI but was disappointed you couldn't move some elements. Motivated by that I searched for a solution and came across the following code for moving the pet frame:
Code:
PetFrame:SetMovable(true);
PetFrame:EnableMouse(true);
PetFrame:RegisterForDrag("LeftButton");
PetFrame:SetScript("OnDragStart", function(self) self:StartMoving() end);
PetFrame:SetScript("OnDragStop", function(self) self:StopMovingOrSizing() end);
Using a similar code I was able to make a very simple addon to move some other stuff around (XP bar, LFG eye and mini menu/bags bar) and mostly they stay I where I leave them, even after logging out, but the pet frame resets to its position under the player frame every reload. How do I make the pet frame stay as well?
I was also wondering how to make them moveable only in edit mode and/or save their positions in a edit mode layout. Ideally I'd like to incorporate these assets into edit mode.
I can code a little (C++ and python) but I'm not terribly familiar with lua. Don't be afraid to get a little technical if you need to, I'm always eager to learn new stuff!
Any help is appreciated!