View Single Post
10-21-10, 03:32 AM   #2
Xubera
A Cobalt Mageweaver
 
Xubera's Avatar
AddOn Author - Click to view addons
Join Date: May 2009
Posts: 207
Code:
<Button name="PointMe_Button" inherits="GameMenuButtonTemaplte" parent="WorldMapFrame" text="Point Me" movable="true">
    <Anchors>
      <Anchor point="TOPRIGHT" x="-213" y="-1" />
    </Anchors>
    <Scripts>
      <OnLoad>self:RegisterForDrag("LeftButton")</OnLoad>
      <OnDragStart>self:StartMoving()</OnDragStart>
      <OnDragStop>self:StopMovingOrSizing()</OnDragStop>
      <OnClick>PointMe_ButtonOnClick(self,button,down)</OnClick>
    </Scripts>
  </Button>
I added movable=true to the button tag, I forget if its implied, but I set it just in case.

added 3 scripts, you must register the frame to listen for dragging, only the left mouse button works in this case.
other 2 scripts are self explanatory

hope this helps
__________________
Chat Consolidate is the solution to any out of control trade chat. Ignore lines, throttle chat, consolidate posts!Follow the link to find out how!

▲ ▲ WoWInterface wont let me triforce >.>
  Reply With Quote