Thread Tools Display Modes
11-27-08, 08:08 AM   #1
ngollon
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jan 2007
Posts: 9
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

Last edited by ngollon : 11-27-08 at 12:08 PM.
  Reply With Quote
11-28-08, 04:29 AM   #2
ngollon
A Murloc Raider
AddOn Author - Click to view addons
Join Date: Jan 2007
Posts: 9
Found it, thanks =)
  Reply With Quote

WoWInterface » Developer Discussions » General Authoring Discussion » Question about a SecureUnitButton


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off