WoWInterface

WoWInterface (https://www.wowinterface.com/forums/index.php)
-   General Authoring Discussion (https://www.wowinterface.com/forums/forumdisplay.php?f=20)
-   -   Question about a SecureUnitButton (https://www.wowinterface.com/forums/showthread.php?t=19523)

ngollon 11-27-08 08:08 AM

Question about a SecureUnitButton
 
Hi!

I am currently trying to understand the SecureUnitButtonTemplate.
Reading a little in the FrameXML, I've come to think, that this example code should basically create a frame that behaven like the player frame:
Code:

f = CreateFrame("Button", nil, UIParent, "SecureUnitButtonTemplate")
f:SetHeight(100)
f:SetWidth(100)
f:SetPoint("TOPLEFT",UIParet, "TOPLEFT", 100, -100)
f:SetAttribute("unit", "player")
f:EnableMouse(true)
f:SetBackdrop({bgFile = "Interface/Tooltips/UI-Tooltip-Background",
        edgeFile = "",
        tile = true, tileSize = 32, edgeSize = 16,
        insets = { left = 0, right = 0, top = 0, bottom = 0 }})
RegisterUnitWatch(f)

This frame is automatically shown (and hides, when I set unit as "target"), but I cannot left-click it to target myself and right-click does not produce a menu.
Any help is greatly appreciated.

Greetz
Vaeyl of Nozdormu

ngollon 11-28-08 04:29 AM

Found it, thanks =)


All times are GMT -6. The time now is 07:01 AM.

vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI