View Single Post
10-30-09, 07:57 AM   #6
shurshik
An Aku'mai Servant
AddOn Author - Click to view addons
Join Date: Aug 2009
Posts: 31
Thanks It's working, but... how to add tooltip info onmouseover?

Update: did it! By adding:
xml scripts:
Code:
<Scripts>
			<OnLoad>
				this:RegisterForClicks("LeftButtonUp","RightButtonUp")
				this:RegisterForDrag("LeftButton","RightButton")
			</OnLoad>
			<OnEnter>
				if (not self.dragging) then
					PS_MinimapButton_OnEnter(self)
				end
			</OnEnter>
			<OnLeave>
				GameTooltip:Hide()
			</OnLeave>
			<OnDragStart>
				self.dragging = true
				GameTooltip:Hide()
				this:LockHighlight()
				PS_MinimapButton_DraggingFrame:Show()
			</OnDragStart>
			<OnDragStop>
				self.dragging = false
				this:UnlockHighlight()
				PS_MinimapButton_DraggingFrame:Hide()
			</OnDragStop>
			<OnClick>
				PS_MinimapButton_OnClick() -- do your thing in here, arg1 is mouse button clicked
			</OnClick>
		</Scripts>
LUA:
Code:
function PS_MinimapButton_OnEnter(self)
	if (self.dragging) then
		return
	end
	GameTooltip:SetOwner(self or UIParent, "ANCHOR_LEFT")
	PS_MinimapButton_Details(GameTooltip)
end


function PS_MinimapButton_Details(tt, ldb)
	tt:SetText("PhoenixStyle")

end

Last edited by shurshik : 10-30-09 at 08:42 AM.
  Reply With Quote