Blizzard just loves adding buttons that cover up your own UI without a simple way to move it. I was poking around in code, but was unable to find the code that controls where this button appears.
What I need is the variable or function call that positions the button on the screen.
/run local f=ExtraActionBarFrame;f:EnableMouse(true);f:SetMovable(true);f:RegisterForDrag("LeftMouse");f:SetScript("OnDragStart",f.StartMoving);f:SetScript("OnDragStop",f.StopMovingOrSizing)
If it's anchored to UIParent and not another actionbar it should work just fine.
Did you test it?
Also moving the new button is the whole point isn't that the original request?
Problem with some of the other actionbars is that game code repositions them dynamically relative to other bars to accommodate shapeshift/pet/vehicle bars etc.
From screenshots I've seen this new button seems to pop up mid-screen like the alternate power bar so it might just be anchored to a specific spot on UIParent.
If that's the case, macro I posted (or a tiny addon with similar code) should work just fine for making it drag-able.
Also SetUserPlaced() is redundant, SetMovable() is more than sufficient.
First time you drag the frame SetUserPlaced() is automatically set true.
(I've used it alone on a number of addons to store position in the cache instead of saved variables so that part I can say with certainty)
The "only" reason to call SetUserPlaced() explicitly is if you want to invalidate the cache for a user placed frame without disabling the addon + reloading + enabling the addon + reloading.
:SetUserPlaced() was part of my pseudo code which does not include :SetMovable(). :SetPoint() doesn't call it.
At any rate, when a frame (the action buttons) with mouse enabled is on top of another frame (the action bar frame) with mouse enabled, the top frame receives the mouse.
And, yes, I have tried similar code when trying to make my TradesBar frame movable. You either have to make the buttons click through (:EnableMouse(false)) or use the buttons' OnDragStart/Stop to call their parent's *Move* functions.
Edit: Also, even if it's not parented to UIParent, :StartMoving() unparents it.
I won't be able to test this till we do ultraxion again. No idea when, but this issue is going to be a big one when it hits live and everyone will be asking for an addon to move it. Hopefully someone will write one.
If anyone still needs this, you can move it with
/run ExtraActionButton1:SetPoint("CENTER",0,100)
Replacing 0,100 with whatever you need. The artwork is attached to the button, so it will move as well.
If you don't see the button at all (some addons hide it), here's a macro you can use:
/run local b=ExtraActionButton1 b:SetParent(UIParent) b:SetPoint("CENTER",0,-200) b:Show()
What I need is the variable or function call that positions the button on the screen.
Warning: Drycoded.
'Tis better to get an addon like MoveAnything or use :ClearAllPoints() + :SetPoint() + :SetUserPlaced(true).
Did you test it?
Also moving the new button is the whole point isn't that the original request?
Problem with some of the other actionbars is that game code repositions them dynamically relative to other bars to accommodate shapeshift/pet/vehicle bars etc.
From screenshots I've seen this new button seems to pop up mid-screen like the alternate power bar so it might just be anchored to a specific spot on UIParent.
If that's the case, macro I posted (or a tiny addon with similar code) should work just fine for making it drag-able.
Also SetUserPlaced() is redundant, SetMovable() is more than sufficient.
First time you drag the frame SetUserPlaced() is automatically set true.
(I've used it alone on a number of addons to store position in the cache instead of saved variables so that part I can say with certainty)
The "only" reason to call SetUserPlaced() explicitly is if you want to invalidate the cache for a user placed frame without disabling the addon + reloading + enabling the addon + reloading.
At any rate, when a frame (the action buttons) with mouse enabled is on top of another frame (the action bar frame) with mouse enabled, the top frame receives the mouse.
And, yes, I have tried similar code when trying to make my TradesBar frame movable. You either have to make the buttons click through (:EnableMouse(false)) or use the buttons' OnDragStart/Stop to call their parent's *Move* functions.
Edit: Also, even if it's not parented to UIParent, :StartMoving() unparents it.
/run ExtraActionButton1:SetPoint("CENTER",0,100)
Replacing 0,100 with whatever you need. The artwork is attached to the button, so it will move as well.
If you don't see the button at all (some addons hide it), here's a macro you can use:
/run local b=ExtraActionButton1 b:SetParent(UIParent) b:SetPoint("CENTER",0,-200) b:Show()