From c1a53b0568138721332519893039bbdf9b448d53 Mon Sep 17 00:00:00 2001 From: Darthpred Date: Thu, 25 Aug 2016 09:35:27 +0300 Subject: [PATCH] No clue why copy table akts this particular way with colored texts but hey. This fixes #291 --- ElvUI_SLE/core/dropdown.lua | 1 + ElvUI_SLE/modules/minimap/locationbar.lua | 9 +++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/ElvUI_SLE/core/dropdown.lua b/ElvUI_SLE/core/dropdown.lua index 1a01f26..20b7e38 100644 --- a/ElvUI_SLE/core/dropdown.lua +++ b/ElvUI_SLE/core/dropdown.lua @@ -102,6 +102,7 @@ function SLE:DropDown(list, frame, MenuAnchor, FramePoint, xOffset, yOffset, par if list[i].icon then icon = "|T"..list[i].icon..":14:14|t " end + btn.text:SetText(icon..list[i].text) if list[i].title then TitleCount = TitleCount + 1 diff --git a/ElvUI_SLE/modules/minimap/locationbar.lua b/ElvUI_SLE/modules/minimap/locationbar.lua index 113ba34..8030c35 100644 --- a/ElvUI_SLE/modules/minimap/locationbar.lua +++ b/ElvUI_SLE/modules/minimap/locationbar.lua @@ -19,6 +19,9 @@ local DUNGEON_FLOOR_DALARAN1 = DUNGEON_FLOOR_DALARAN1 local CHALLENGE_MODE = CHALLENGE_MODE local PlayerHasToy = PlayerHasToy local IsToyUsable = C_ToyBox.IsToyUsable + +local collectgarbage = collectgarbage + LP.CDformats = { ["DEFAULT"] = [[ (%s |TInterface\FriendsFrame\StatusIcon-Away:16|t)]], ["DEFAULT_ICONFIRST"] = [[ (|TInterface\FriendsFrame\StatusIcon-Away:16|t %s)]], @@ -369,8 +372,8 @@ function LP:ItemList(check) end function LP:SpellList(list, dropdown, check) - local tmp = {} for i = 1, #list do + local tmp = {} local data = list[i] if T.IsSpellKnown(data.secure.ID) then if check then @@ -407,7 +410,7 @@ function LP:PopulateDropdown() T.tinsert(LP.MainMenu, {text = CHALLENGE_MODE.." >>",icon = SLE:GetIconFromID("achiev", 6378), func = function() T.twipe(LP.SecondaryMenu) MENU_WIDTH = LP.db.portals.customWidth and LP.db.portals.customWidthValue or _G["SLE_LocationPanel"]:GetWidth() - T.tinsert(LP.SecondaryMenu, {text = "<< "..BACK, func = function() T.twipe(LP.MainMenu); LP:PopulateDropdown() end}) + T.tinsert(LP.SecondaryMenu, {text = "<< "..BACK, func = function() T.twipe(LP.MainMenu); T.twipe(LP.SecondaryMenu); LP:PopulateDropdown() end}) T.tinsert(LP.SecondaryMenu, {text = CHALLENGE_MODE..":", title = true, nohighlight = true}) LP:SpellList(LP.Spells.challenge, LP.SecondaryMenu) T.tinsert(LP.SecondaryMenu, {text = CLOSE, title = true, ending = true, func = function() T.twipe(LP.MainMenu); T.twipe(LP.SecondaryMenu); ToggleFrame(LP.Menu2) end}) @@ -438,6 +441,8 @@ function LP:PopulateDropdown() T.tinsert(LP.MainMenu, {text = CLOSE, title = true, ending = true, func = function() T.twipe(LP.MainMenu); T.twipe(LP.SecondaryMenu); ToggleFrame(LP.Menu1) end}) MENU_WIDTH = LP.db.portals.customWidth and LP.db.portals.customWidthValue or _G["SLE_LocationPanel"]:GetWidth() SLE:DropDown(LP.MainMenu, LP.Menu1, anchor, point, 0, 1, _G["SLE_LocationPanel"], MENU_WIDTH, LP.db.portals.justify) + + collectgarbage('collect'); end function LP:PLAYER_REGEN_DISABLED() -- 1.7.9.5