Thread Tools Display Modes
08-30-12, 02:49 PM   #1
FaulTier
A Theradrim Guardian
 
FaulTier's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 61
UnitPopup - missing leave group for instances?

Aloha!

Due to the rename of the simple "leave group" in instances to something else (should be "leave instance group"?) it won't show up in the unit-dropdownmenu.

So, my dropdownlist ist currently

Code:
UnitPopupMenus["SELF"] = { "SET_FOCUS", "PVP_FLAG", "LOOT_METHOD", "LOOT_THRESHOLD", "OPT_OUT_LOOT_TITLE", "LOOT_PROMOTE", "CONVERT_TO_RAID", "CONVERT_TO_PARTY", "DUNGEON_DIFFICULTY", "RAID_DIFFICULTY", "RESET_INSTANCES", "RAID_TARGET_ICON", "SELECT_ROLE", "LEAVE", "CANCEL" };
What's missing to show the missing/new entry?
__________________
  Reply With Quote
08-30-12, 02:57 PM   #2
FaulTier
A Theradrim Guardian
 
FaulTier's Avatar
AddOn Author - Click to view addons
Join Date: Jun 2009
Posts: 61
Done, already found it.

Here are some/all of the new DropDownMenuEntries:

http://wowprogramming.com/utils/xmlb.../UnitPopup.lua
__________________
  Reply With Quote
08-30-12, 03:26 PM   #3
zork
A Pyroguard Emberseer
 
zork's Avatar
AddOn Author - Click to view addons
Join Date: Jul 2008
Posts: 1,740
The compact unitframe has an excellent dropdown menu example.

You could use that and create your own dropdown.

http://wowprogramming.com/utils/xmlb...tUnitFrame.lua
Lua Code:
  1. --Dropdown
  2. function CompactUnitFrameDropDown_Initialize(self)
  3.     local unit = self:GetParent().unit;
  4.     if ( not unit ) then
  5.         return;
  6.     end
  7.     local menu;
  8.     local name;
  9.     local id = nil;
  10.     if ( UnitIsUnit(unit, "player") ) then
  11.         menu = "SELF";
  12.     elseif ( UnitIsUnit(unit, "vehicle") ) then
  13.         -- NOTE: vehicle check must come before pet check for accuracy's sake because
  14.         -- a vehicle may also be considered your pet
  15.         menu = "VEHICLE";
  16.     elseif ( UnitIsUnit(unit, "pet") ) then
  17.         menu = "PET";
  18.     elseif ( UnitIsPlayer(unit) ) then
  19.         id = UnitInRaid(unit);
  20.         if ( id ) then
  21.             menu = "RAID_PLAYER";
  22.             name = GetRaidRosterInfo(id);
  23.         elseif ( UnitInParty(unit) ) then
  24.             menu = "PARTY";
  25.         else
  26.             menu = "PLAYER";
  27.         end
  28.     else
  29.         menu = "TARGET";
  30.         name = RAID_TARGET_ICON;
  31.     end
  32.     if ( menu ) then
  33.         UnitPopup_ShowMenu(self, menu, unit, name, id);
  34.     end
  35. 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

WoWInterface » Featured Projects » oUF (Otravi Unit Frames) » UnitPopup - missing leave group for instances?


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