Thread Tools Display Modes
10-29-12, 03:33 AM   #1
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
CompactUnitFrame dropdown

Has anyone ever made use of the compactunitframe code?

Sth like:
Lua Code:
  1. function createUnitStyle(self)
  2.  
  3.   --click attributes
  4.   self:SetAttribute("*type1", "target")
  5.   self:SetAttribute("*type2", "menu")
  6.   self:RegisterForClicks("LeftButtonUp", "RightButtonUp")
  7.  
  8.   --the dropdown container
  9.   self.dropDown = CreateFrame("Frame", self:GetName().."DropDown", self, "UIDropDownMenuTemplate")
  10.   tinsert(UnitPopupFrames, self.dropDown:GetName())
  11.  
  12.   --menu function
  13.   local menuFunc = CompactUnitFrameDropDown_Initialize
  14.  
  15.   --menu init
  16.   UIDropDownMenu_Initialize(self.dropDown, menuFunc, "MENU")
  17.   self.menu = function() ToggleDropDownMenu(1, nil, self.dropDown, self:GetName(), 0, 0) end
  18.  
  19.  
  20. end
__________________
| Simple is beautiful.
| WoWI AddOns | GitHub | Zork (WoW)

"I wonder what the non-pathetic people are doing tonight?" - Rajesh Koothrappali (The Big Bang Theory)
  Reply With Quote
10-29-12, 06:14 AM   #2
Phanx
Cat.
 
Phanx's Avatar
AddOn Author - Click to view addons
Join Date: Mar 2006
Posts: 5,617
Combining the CompactUnitFrames and UIDropDownMenu in addon code? You might as well divide by zero and drop your Nokia at the same time!
__________________
Retired author of too many addons.
Message me if you're interested in taking over one of my addons.
Don’t message me about addon bugs or programming questions.
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » CompactUnitFrame dropdown

Thread Tools
Display Modes

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