no edit summary
No edit summary |
|||
| Line 53: | Line 53: | ||
Some advanced dragging addons use overlays that make default blizzard frames draggable. This is possible by using GetParent when starting and stopping drag. Unfortunetly this means that the parent frame must already | Some advanced dragging addons use overlays that make default blizzard frames draggable. This is possible by using GetParent when starting and stopping drag. Unfortunetly this means that the parent frame must already | ||
be movable="true". (In the upcomming patch you will be able to use SetMovable(1) to modify a frames' movable tag.) Another drawback with overlay frames that are mouse enabled is that they will prevent the parent frame's click script tags from being called so you often have to simulate their click events. | be movable="true". (In the upcomming patch you will be able to use SetMovable(1) to modify a frames' movable tag.) Another drawback with overlay frames that are mouse enabled is that they will prevent the parent frame's click script tags from being called so you often have to simulate their click events. | ||
== Quick Dragging Code == | |||
While somewhat untested there is an easier and more automatic way to activate dragging. If you have your <Frame> delcaration attributes "enableMouse" and "movable" set to true, dragging may be accomplished by adding a <TitleRegion> tag inside of your <Frame> | |||
<Frame name="myname" frameStrata="HIGH" toplevel="true" enableMouse="true" movable="true" parent="UIParent"> | |||
<TitleRegion setAllPoints="true"/> | |||
... | |||
</Frame> | |||
I haven't discovered any adverse side effects to doing this yet, I am not even sure if this is the intended use for it. | |||