m
Move page script moved page API Frame StartMoving to WoW:API Frame StartMoving without leaving a redirect
No edit summary |
m (Move page script moved page API Frame StartMoving to WoW:API Frame StartMoving without leaving a redirect) |
||
| (One intermediate revision by one other user not shown) | |||
| Line 1: | Line 1: | ||
{{widgetmethod}} | {{widgetmethod}} | ||
Moves the frame-based object in relation to where the mouse is being moved. | Moves the frame-based object in relation to where the mouse is being moved. | ||
frame:StartMoving() | frame:StartMoving() | ||
== Details == | == Details == | ||
* Use this with the | * Use this with the {{api|Frame:RegisterForDrag|t=w}}() function and the <OnDragStart>...</OnDragStart> event to allow your frame-based object to be moved by the user. | ||
* Use the | * Use the {{api|Frame:StopMovingOrSizing|t=w}}() function inside the <OnDragStop>...</OnDragStop> XML section to stop the moving process. | ||
* Moving a frame using this function sets the user placed flag for the frame, making the client save its position and reposition the frame on reload. To avoid this behavior, you can call frame:[[API Frame SetUserPlaced|SetUserPlaced]](false) immediately after StopMovingOrSizing(). | * Moving a frame using this function sets the user placed flag for the frame, making the client save its position and reposition the frame on reload. To avoid this behavior, you can call frame:[[API Frame SetUserPlaced|SetUserPlaced]](false) immediately after StopMovingOrSizing(). | ||
*For pixel-precise movements, you should instead use [[API EnableMouse|EnableMouse()]] and the <OnMouseDown>...</OnMouseDown> and <OnMouseUp>...</OnMouseUp> events (and probably also the <OnHide>...</OnHide> event). | *For pixel-precise movements, you should instead use [[API EnableMouse|EnableMouse()]] and the <OnMouseDown>...</OnMouseDown> and <OnMouseUp>...</OnMouseUp> events (and probably also the <OnHide>...</OnHide> event). | ||