Shuffle codes about

This commit is contained in:
tekkub ʕ ´ᴥ` ʔ 2016-09-11 22:01:26 -06:00
parent affdbef5c1
commit 36c5228bac
1 changed files with 7 additions and 8 deletions

View File

@ -16,26 +16,20 @@ end
function ns.OnLoad() function ns.OnLoad()
Hide(MerchantNextPageButton)
Hide(MerchantPrevPageButton)
Hide(MerchantPageText)
local GVS = ns.NewMainFrame() local GVS = ns.NewMainFrame()
GVS:SetWidth(315) GVS:SetWidth(315)
GVS:SetHeight(294) GVS:SetHeight(294)
GVS:SetPoint("TOPLEFT", MerchantFrame, 8, -67) GVS:SetPoint("TOPLEFT", MerchantFrame, 8, -67)
GVS:Hide() GVS:Hide()
-- Reanchor the buyback button, it acts weird when switching tabs otherwise... -- Reanchor the buyback button, it acts weird when switching tabs otherwise...
MerchantBuyBackItem:ClearAllPoints() MerchantBuyBackItem:ClearAllPoints()
MerchantBuyBackItem:SetPoint("BOTTOMRIGHT", -7, 33) MerchantBuyBackItem:SetPoint("BOTTOMRIGHT", -7, 33)
-- The little class select dropdown show trigget a refresh
hooksecurefunc("SetMerchantFilter", function() GVS:GetScript("OnShow")(GVS) end) hooksecurefunc("SetMerchantFilter", function() GVS:GetScript("OnShow")(GVS) end)
-- Force show when we're loaded on demand and the tab is already selected
if MerchantFrame:IsVisible() and MerchantFrame.selectedTab == 1 then if MerchantFrame:IsVisible() and MerchantFrame.selectedTab == 1 then
GVS:Show() GVS:Show()
end end
@ -43,6 +37,11 @@ function ns.OnLoad()
-- Reparent the first 10 MerchantItem frames, so they only appear for buyback -- Reparent the first 10 MerchantItem frames, so they only appear for buyback
for i=1,10 do _G["MerchantItem"..i]:SetParent(MerchantItem11) end for i=1,10 do _G["MerchantItem"..i]:SetParent(MerchantItem11) end
-- Hide frames we don't need now
Hide(MerchantNextPageButton)
Hide(MerchantPrevPageButton)
Hide(MerchantPageText)
-- Clean up our frame factories -- Clean up our frame factories
for i,v in pairs(ns) do if i:match("^New") then ns[i] = nil end end for i,v in pairs(ns) do if i:match("^New") then ns[i] = nil end end
end end