document.write('
Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1.  
  2. local _, nMainbar = ...
  3. local cfg = nMainbar.Config
  4.  
  5. if (not cfg.showPicomenu) then
  6. return
  7. end
  8.  
  9. local x, x2, n = nil, false
  10. local v1, v2, v3, v4, v5, v6, v7, v8, v9, v10,
  11.  
  12. v11
  13.  
  14. local menuFrame = CreateFrame('Frame', 'picomenuDropDownMenu', MainMenuBar, 'UIDropDownMenuTemplate')
  15.  
  16. local menuList = {
  17. {
  18. text = MAINMENU_BUTTON,
  19.  
  20.  
  21. isTitle = true,
  22. notCheckable = true,
  23. },
  24. {
  25. text = CHARACTER_BUTTON,
  26. icon = 'Interface\\\\PaperDollInfoFrame\\\\UI-EquipmentManager-Toggle',
  27.  
  28.  
  29. func = function()
  30. securecall(ToggleCharacter, 'PaperDollFrame')
  31. end,
  32. notCheckable = true,
  33. },
  34. {
  35. text = SPELLBOOK_ABILITIES_BUTTON,
  36.  
  37.  
  38. icon = 'Interface\\\\MINIMAP\\\\TRACKING\\\\Class',
  39. func = function()
  40. securecall(ToggleSpellBook, BOOKTYPE_SPELL)
  41. end,
  42. tooltipTitle =
  43.  
  44. securecall(MicroButtonTooltipText, SPELLBOOK_ABILITIES_BUTTON, 'TOGGLESPELLBOOK'),
  45. tooltipText = NEWBIE_TOOLTIP_SPELLBOOK,
  46. notCheckable = true,
  47. },
  48. {
  49.  
  50.  
  51. text = TALENTS_BUTTON,
  52. icon = 'Interface\\\\MINIMAP\\\\TRACKING\\\\Ammunition',
  53. -- icon = 'Interface\\\\AddOns\\\\nMainbar\\\\media\\\\picomenu\\
  54.  
  55. \\picomenuTalents',
  56. func = function()
  57. if (not PlayerTalentFrame) then
  58. LoadAddOn('Blizzard_TalentUI')
  59. end
  60.  
  61. if (not
  62.  
  63. GlyphFrame) then
  64. LoadAddOn('Blizzard_GlyphUI')
  65. end
  66.  
  67. --PlayerTalentFrame_Toggle()
  68. securecall(ToggleTalentFrame)
  69.  
  70.  
  71. end,
  72. tooltipTitle = securecall(MicroButtonTooltipText, TALENTS_BUTTON, 'TOGGLETALENTS'),
  73. tooltipText = NEWBIE_TOOLTIP_TALENTS,
  74. notCheckable = true,
  75.  
  76.  
  77. },
  78.  
  79. {
  80. text = ACHIEVEMENT_BUTTON,
  81. icon = 'Interface\\\\AddOns\\\\nMainbar\\\\media\\\\picomenu\\\\picomenuAchievement',
  82. func = function()
  83. securecall
  84.  
  85. (ToggleAchievementFrame)
  86. end,
  87. tooltipTitle = securecall(MicroButtonTooltipText, ACHIEVEMENT_BUTTON, 'TOGGLEACHIEVEMENT'),
  88. tooltipText =
  89.  
  90. NEWBIE_TOOLTIP_ACHIEVEMENT,
  91. notCheckable = true,
  92. },
  93.  
  94.  
  95. {
  96. text = QUESTLOG_BUTTON,
  97. icon = 'Interface\\\\GossipFrame\\\\ActiveQuestIcon',
  98. func = function()
  99. securecall(ToggleFrame, QuestLogFrame)
  100.  
  101.  
  102. end,
  103. tooltipTitle = securecall(MicroButtonTooltipText, QUESTLOG_BUTTON, 'TOGGLEQUESTLOG'),
  104. tooltipText = NEWBIE_TOOLTIP_QUESTLOG,
  105.  
  106.  
  107. notCheckable = true,
  108. },
  109. {
  110. text = GUILD,
  111. icon = 'Interface\\\\GossipFrame\\\\TabardGossipIcon',
  112. arg1 = IsInGuild('player'),
  113. func =
  114.  
  115. function()
  116. if (IsTrialAccount()) then
  117. UIErrorsFrame:AddMessage(ERR_RESTRICTED_ACCOUNT, 1, 0, 0)
  118. else
  119. securecall
  120.  
  121. (ToggleGuildFrame)
  122. end
  123. end,
  124. notCheckable = true,
  125. },
  126. {
  127. text = SOCIAL_BUTTON,
  128. icon = 'Interface\\\\FriendsFrame\\\\PlusManz-
  129.  
  130. BattleNet',
  131. func = function()
  132. securecall(ToggleFriendsFrame, 1)
  133. end,
  134. notCheckable = true,
  135. },
  136. {
  137. text = PLAYER_V_PLAYER,
  138.  
  139.  
  140. icon = 'Interface\\\\MINIMAP\\\\TRACKING\\\\BattleMaster',
  141. func = function()
  142. if (not PVPUIFrame) then
  143. securecall(PVP_LoadUI)
  144. end
  145.  
  146.  
  147. securecall(PVPUIFrame_ToggleFrame, 'PVPQueueFrame')
  148. end,
  149. tooltipTitle = securecall(MicroButtonTooltipText, PLAYER_V_PLAYER,
  150.  
  151. 'TOGGLECHARACTER4'),
  152. tooltipText = NEWBIE_TOOLTIP_PVP,
  153. notCheckable = true,
  154. },
  155. {
  156. text = DUNGEONS_BUTTON,
  157. icon = 'Interface\\\\LFGFRAME\\
  158.  
  159. \\BattleNetWorking0',
  160. func = function()
  161. securecall(PVEFrame_ToggleFrame, 'GroupFinderFrame', LFDParentFrame)
  162. end,
  163. tooltipTitle =
  164.  
  165. securecall(MicroButtonTooltipText, DUNGEONS_BUTTON, 'TOGGLELFGPARENT'),
  166. tooltipText = NEWBIE_TOOLTIP_LFGPARENT,
  167. notCheckable = true,
  168. },
  169. {
  170.  
  171.  
  172. text = CHALLENGES,
  173. icon = 'Interface\\\\BUTTONS\\\\UI-GroupLoot-DE-Up',
  174. func = function()
  175. securecall(PVEFrame_ToggleFrame, 'ChallengesFrame')
  176.  
  177.  
  178. end,
  179. notCheckable = true,
  180. },
  181. {
  182. text = RAID_FINDER,
  183. icon = 'Interface\\\\TARGETINGFRAME\\\\UI-TargetingFrame-Skull',
  184. func = function()
  185.  
  186.  
  187. securecall(PVEFrame_ToggleFrame, 'GroupFinderFrame', RaidFinderFrame)
  188. end,
  189. notCheckable = true,
  190. },
  191. {
  192. text = RAID,
  193. icon =
  194.  
  195. 'Interface\\\\TARGETINGFRAME\\\\UI-TargetingFrame-Skull',
  196. func = function()
  197. securecall(ToggleFriendsFrame, 4)
  198. end,
  199. notCheckable = true,
  200.  
  201.  
  202. },
  203. {
  204. text = MOUNTS_AND_PETS,
  205. icon = 'Interface\\\\MINIMAP\\\\TRACKING\\\\StableMaster',
  206. func = function()
  207. securecall(TogglePetJournal)
  208.  
  209.  
  210. end,
  211. tooltipTitle = securecall(MicroButtonTooltipText, MOUNTS_AND_PETS, 'TOGGLEPETJOURNAL'),
  212. tooltipText = NEWBIE_TOOLTIP_MOUNTS_AND_PETS,
  213.  
  214.  
  215. notCheckable = true,
  216. },
  217. {
  218. text = ENCOUNTER_JOURNAL,
  219. icon = 'Interface\\\\MINIMAP\\\\TRACKING\\\\Profession',
  220. func = function()
  221.  
  222.  
  223. securecall(ToggleEncounterJournal)
  224. end,
  225. tooltipTitle = securecall(MicroButtonTooltipText, ENCOUNTER_JOURNAL, 'TOGGLEENCOUNTERJOURNAL'),
  226. tooltipText
  227.  
  228. = NEWBIE_TOOLTIP_ENCOUNTER_JOURNAL,
  229. notCheckable = true,
  230. },
  231. {
  232. text = GM_EMAIL_NAME,
  233. icon = 'Interface\\\\CHATFRAME\\\\UI-ChatIcon-Blizz',
  234.  
  235.  
  236. func = function()
  237. securecall(ToggleHelpFrame)
  238. end,
  239. tooltipTitle = HELP_BUTTON,
  240. tooltipText = NEWBIE_TOOLTIP_HELP,
  241. notCheckable =
  242.  
  243. true,
  244. },
  245. { text = "Store", icon = 'Interface\\\\CHATFRAME\\\\UI-ChatIcon-Blizz', func = function() if (not StoreFrame) then LoadAddOn("Blizzard_StoreUI") end
  246.  
  247. securecall(ToggleStoreUI) end, notCheckable = true, }, {
  248. text = BATTLEFIELD_MINIMAP,
  249. colorCode = '|cff999999',
  250. func = function()
  251.  
  252.  
  253. securecall(ToggleBattlefieldMinimap)
  254. end,
  255. notCheckable = true,
  256. },
  257. }
  258.  
  259. local addonMenuTable = {
  260. {
  261. text = '',
  262. isTitle = true,
  263.  
  264.  
  265. notCheckable = true,
  266. },
  267. { text = ADDONS,
  268. hasArrow = true,
  269. notCheckable = true,
  270. menuList = {
  271. {
  272. text = ADDONS,
  273.  
  274.  
  275. isTitle = true,
  276. notCheckable = true,
  277. },
  278. }
  279. }
  280. }
  281.  
  282. local function UpdateAddOnTable()
  283. if (IsAddOnLoaded('oUF_NeavRaid') and not
  284.  
  285. v1) then
  286. x = true
  287. n = (#addonMenuTable[2].menuList)+1
  288. v1 = true
  289. addonMenuTable[2].menuList[n] = {
  290. text = 'NeavRaid',
  291.  
  292.  
  293. func = function()
  294. SlashCmdList['oUF_Neav_Raid_AnchorToggle']()
  295. end,
  296. notCheckable = true,
  297. keepShownOnClick = true,
  298.  
  299.  
  300. }
  301. end
  302.  
  303. if (IsAddOnLoaded('VuhDo') and not v2) then
  304. x = true
  305. n = (#addonMenuTable[2].menuList)+1
  306. v2 = true
  307. addonMenuTable[2].menuList[n]
  308.  
  309. = {
  310. text = 'VuhDo',
  311. func = function()
  312. SlashCmdList['VUHDO']('show')
  313. end,
  314. notCheckable = true,
  315.  
  316.  
  317. keepShownOnClick = true,
  318. }
  319. end
  320.  
  321. if ((IsAddOnLoaded('Grid') or IsAddOnLoaded('Grid2')) and not v3) then
  322. x = true
  323. n = (#addonMenuTable
  324.  
  325. [2].menuList)+1
  326. v3 = true
  327. addonMenuTable[2].menuList[n] = {
  328. text = 'Grid',
  329. func = function()
  330. if (IsAddOnLoaded
  331.  
  332. ('Grid2')) then
  333. ToggleFrame(Grid2LayoutFrame)
  334. elseif (IsAddOnLoaded('Grid')) then
  335. ToggleFrame(GridLayoutFrame)
  336.  
  337.  
  338. end
  339. end,
  340. notCheckable = true,
  341. keepShownOnClick = true,
  342. }
  343. end
  344.  
  345. if (IsAddOnLoaded('Omen') and not v4) then
  346. x
  347.  
  348. = true
  349. n = (#addonMenuTable[2].menuList)+1
  350. v4 = true
  351. addonMenuTable[2].menuList[n] = {
  352. text = 'Omen',
  353. func = function()
  354.  
  355.  
  356. if (IsShiftKeyDown()) then
  357. Omen:Toggle()
  358. else
  359. Omen:ShowConfig()
  360. end
  361. end,
  362.  
  363.  
  364. notCheckable = true,
  365. keepShownOnClick = true,
  366. }
  367. end
  368.  
  369. if (IsAddOnLoaded('PhoenixStyle') and not v5) then
  370. x = true
  371. n =
  372.  
  373. (#addonMenuTable[2].menuList)+1
  374. v5 = true
  375. addonMenuTable[2].menuList[n] = {
  376. text = 'PhoenixStyle',
  377. func = function()
  378.  
  379.  
  380. ToggleFrame(PSFmain1)
  381. ToggleFrame(PSFmain2)
  382. ToggleFrame(PSFmain3)
  383. end,
  384. notCheckable =
  385.  
  386. true,
  387. keepShownOnClick = true,
  388. }
  389. end
  390.  
  391. if (IsAddOnLoaded('DBM-Core') and not v6) then
  392. x = true
  393. n = (#addonMenuTable
  394.  
  395. [2].menuList)+1
  396. v6 = true
  397. addonMenuTable[2].menuList[n] = {
  398. text = 'DBM',
  399. func = function()
  400. DBM:LoadGUI()
  401.  
  402.  
  403. end,
  404. notCheckable = true,
  405. keepShownOnClick = true,
  406. }
  407. end
  408.  
  409. if (IsAddOnLoaded('Skada') and not v7) then
  410. x = true
  411. n =
  412.  
  413. (#addonMenuTable[2].menuList)+1
  414. v7 = true
  415. addonMenuTable[2].menuList[n] = {
  416. text = 'Skada',
  417. func = function()
  418.  
  419.  
  420. Skada:ToggleWindow()
  421. end,
  422. notCheckable = true,
  423. keepShownOnClick = true,
  424. }
  425. end
  426.  
  427. if (IsAddOnLoaded('Recount') and not v8)
  428.  
  429. then
  430. x = true
  431. n = (#addonMenuTable[2].menuList)+1
  432. v8 = true
  433. addonMenuTable[2].menuList[n] = {
  434. text = 'Recount',
  435. func =
  436.  
  437. function()
  438. ToggleFrame(Recount.MainWindow)
  439. if (Recount.MainWindow:IsShown()) then
  440. Recount:RefreshMainWindow()
  441.  
  442.  
  443. end
  444. end,
  445. notCheckable = true,
  446. keepShownOnClick = true,
  447. }
  448. end
  449.  
  450. if (IsAddOnLoaded('TinyDPS') and not v9) then
  451. x =
  452.  
  453. true
  454. n = (#addonMenuTable[2].menuList)+1
  455. v9 = true
  456. addonMenuTable[2].menuList[n] = {
  457. text = 'TinyDPS',
  458. func = function()
  459.  
  460.  
  461. ToggleFrame(tdpsFrame)
  462. end,
  463. notCheckable = true,
  464. keepShownOnClick = true,
  465. }
  466. end
  467.  
  468. if (IsAddOnLoaded('Numeration')
  469.  
  470. and not v10) then
  471. x = true
  472. n = (#addonMenuTable[2].menuList)+1
  473. v10 = true
  474. addonMenuTable[2].menuList[n] = {
  475. text = 'Numeration',
  476.  
  477.  
  478. func = function()
  479. if (not IsShiftKeyDown()) then
  480. ToggleFrame(NumerationFrame)
  481. else
  482.  
  483.  
  484. NumerationFrame:ShowResetWindow()
  485. end
  486. end,
  487. notCheckable = true,
  488. keepShownOnClick = true,
  489. }
  490. end
  491.  
  492. if
  493.  
  494. (IsAddOnLoaded('AtlasLoot') and not v11) then
  495. x = true
  496. n = (#addonMenuTable[2].menuList)+1
  497. v11 = true
  498. addonMenuTable[2].menuList[n] = {
  499.  
  500.  
  501. text = 'AtlasLoot',
  502. func = function()
  503. ToggleFrame(AtlasLootDefaultFrame)
  504. end,
  505. notCheckable = true,
  506.  
  507.  
  508. keepShownOnClick = true,
  509. }
  510. end
  511.  
  512. if (IsAddOnLoaded('Altoholic') and not v12) then
  513. x = true
  514. n = (#addonMenuTable[2].menuList)+1
  515. v12 =
  516.  
  517. true
  518. addonMenuTable[2].menuList[n] = {
  519. text = 'Altoholic',
  520. func = function()
  521. ToggleFrame(AltoholicFrame)
  522. end,
  523.  
  524.  
  525. notCheckable = true,
  526. keepShownOnClick = true,
  527. }
  528. end
  529.  
  530. if (x and not x2) then
  531. table.insert(menuList, addonMenuTable[1])
  532.  
  533.  
  534. table.insert(menuList, addonMenuTable[2])
  535. x2 = true
  536. end
  537. end
  538.  
  539. local f = CreateFrame('Button', nil, MainMenuBar)
  540. f:SetFrameStrata('HIGH')
  541. f:SetToplevel(true)
  542. f:SetSize(30, 30)
  543. f:SetPoint('BOTTOM', MainMenuBarRightEndCap, -13, 8)
  544. f:RegisterForClicks('Anyup')
  545. f:RegisterEvent('ADDON_LOADED')
  546.  
  547. f:SetNormalTexture('Interface\\\\AddOns\\
  548.  
  549. \\nMainbar\\\\media\\\\picomenu\\\\picomenuNormal')
  550. f:GetNormalTexture():SetSize(30, 30)
  551.  
  552. f:SetHighlightTexture('Interface\\\\AddOns\\\\nMainbar\\\\media\\\\picomenu\\
  553.  
  554. \\picomenuHighlight')
  555. f:GetHighlightTexture():SetAllPoints(f:GetNormalTexture())
  556.  
  557. f:SetScript('OnEvent', function()
  558. UpdateAddOnTable(arg1)
  559. end)
  560.  
  561. f:SetScript('OnMouseDown',
  562.  
  563. function(self)
  564. self:GetNormalTexture():ClearAllPoints()
  565. self:GetNormalTexture():SetPoint('CENTER', 1, -1)
  566. end)
  567.  
  568. f:SetScript('OnMouseUp', function(self, button)
  569.  
  570.  
  571. self:GetNormalTexture():ClearAllPoints()
  572. self:GetNormalTexture():SetPoint('CENTER')
  573.  
  574. if (button == 'LeftButton') then
  575. if (self:IsMouseOver()) then
  576.  
  577.  
  578. if (DropDownList1:IsShown()) then
  579. DropDownList1:Hide()
  580. else
  581. securecall(EasyMenu, menuList, menuFrame, self, 27, 190, 'MENU',
  582.  
  583. 8)
  584. -- DropDownList1:ClearAllPoints()
  585. -- DropDownList1:SetPoint('BOTTOMLEFT', self, 'TOPRIGHT')
  586. end
  587. end
  588. else
  589. if
  590.  
  591. (self:IsMouseOver()) then
  592. ToggleFrame(GameMenuFrame)
  593. end
  594. end
  595.  
  596. GameTooltip:Hide()
  597. end)
  598.  
  599. f:SetScript('OnEnter', function(self)
  600.  
  601.  
  602. GameTooltip:SetOwner(self, 'ANCHOR_TOPLEFT', 25, -5)
  603. GameTooltip:AddLine(MAINMENU_BUTTON)
  604. GameTooltip:Show()
  605. end)
  606.  
  607. f:SetScript('OnLeave', function()
  608.  
  609.  
  610. GameTooltip:Hide()
  611. end)
  612.  
  613. HelpOpenTicketButton:ClearAllPoints()
  614. HelpOpenTicketButton:SetPoint('TOPLEFT', f, 'BOTTOMRIGHT', -26, 26)
  615. HelpOpenTicketButton:SetScale(0.6)
  616. HelpOpenTicketButton:SetParent(f)
');