Thread Tools Display Modes
10-07-11, 06:39 PM   #1
Aftermathhqt
A Molten Giant
 
Aftermathhqt's Avatar
AddOn Author - Click to view addons
Join Date: Dec 2009
Posts: 784
World Markers.

Hey boys & girls. i need help once again.

Basicly i want this dropdownlist to appear like this;

from here

to here

Here is my code so far.

LUA Code:
  1. local function Minimap_CreateDropDown()
  2.     local button = {}
  3.     button[1] = {}
  4.     button[1].text = CHARACTER_BUTTON
  5.     button[1].func = function() ToggleCharacter('PaperDollFrame') end
  6.     UIDropDownMenu_AddButton(button[1])
  7.    
  8.     button[2] = {}
  9.     button[2].text = SPELLBOOK_ABILITIES_BUTTON
  10.     button[2].func = function() ToggleFrame(SpellBookFrame) end
  11.     UIDropDownMenu_AddButton(button[2])
  12.    
  13.     button[3] = {}
  14.     button[3].text = TALENTS_BUTTON
  15.     button[3].func = function() ToggleTalentFrame() end
  16.     UIDropDownMenu_AddButton(button[3])
  17.    
  18.     button[4] = {}
  19.     button[4].text = ACHIEVEMENT_BUTTON
  20.     button[4].func = function() ToggleAchievementFrame() end  
  21.     UIDropDownMenu_AddButton(button[4])
  22.    
  23.     button[5] = {}
  24.     button[5].text = GetCalendarName()
  25.     button[5].func = function() ToggleCalendar() end
  26.     UIDropDownMenu_AddButton(button[5])
  27.    
  28.     button[6] = {}
  29.     button[6].text = QUESTLOG_BUTTON
  30.     button[6].func = function() ToggleFrame(QuestLogFrame) end
  31.     UIDropDownMenu_AddButton(button[6])
  32.    
  33.     button[7] = {}
  34.     button[7].text = SOCIAL_BUTTON
  35.     button[7].func = function() ToggleFriendsFrame() end
  36.     UIDropDownMenu_AddButton(button[7])
  37.    
  38.     button[8] = {}
  39.     button[8].text = GUILD
  40.     button[8].func = function() ToggleGuildFrame() end
  41.     UIDropDownMenu_AddButton(button[8])
  42.    
  43.     button[9] = {}
  44.     button[9].text = PLAYER_V_PLAYER
  45.     button[9].func = function() ToggleFrame(PVPFrame) end
  46.     UIDropDownMenu_AddButton(button[9])
  47.    
  48.     button[10] = {}
  49.     button[10].text = LFG_TITLE
  50.     button[10].func = function() ToggleLFDParentFrame() end
  51.     UIDropDownMenu_AddButton(button[10])
  52.    
  53.     button[11] = {}
  54.     button[11].text = HELP_BUTTON
  55.     button[11].func = function() ToggleHelpFrame() end
  56.     UIDropDownMenu_AddButton(button[11])
  57.        
  58.     button[12] = {}
  59.     button[12].text = "World Markers"
  60.     button[12].func = function() ToggleDropDownList(1, nil, CompactRaidFrameManagerDisplayFrameLeaderOptionsRaidWorldMarkerButtonDropDownList()) end
  61.     UIDropDownMenu_AddButton(button[12])
  62. end
  63.  
  64. TimeManagerClockButton:SetScript('OnClick', function(self, button)
  65.     if (button == 'RightButton') then
  66.         ToggleDropDownMenu(1, nil, TimeManagerClockDropDown, self, -0, -0)
  67.         GameTooltip:SetOwner(self, 'ANCHOR_BOTTOMLEFT')
  68.     else
  69.         if (self.alarmFiring) then
  70.             TimeManager_TurnOffAlarm()
  71.         end
  72.         ToggleTimeManager()
  73.     end
  74.     GameTooltip:Hide()
  75. end)
  76.  
  77. TimeManagerClockDropDown = CreateFrame('Frame', 'TimeManagerClockDropDown', nil, 'UIDropDownMenuTemplate')
  78. UIDropDownMenu_Initialize(TimeManagerClockDropDown, Minimap_CreateDropDown, 'MENU')
  Reply With Quote

WoWInterface » Developer Discussions » Lua/XML Help » World Markers.


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