parent
848d859cb3
commit
fac67acb75
|
@ -365,9 +365,10 @@ end)
|
||||||
local offset = 0
|
local offset = 0
|
||||||
GVS:EnableMouseWheel(true)
|
GVS:EnableMouseWheel(true)
|
||||||
GVS:SetScript("OnMouseWheel", function(self, value) scrollbar:SetValue(scrollbar:GetValue() - value * SCROLLSTEP) end)
|
GVS:SetScript("OnMouseWheel", function(self, value) scrollbar:SetValue(scrollbar:GetValue() - value * SCROLLSTEP) end)
|
||||||
GVS:SetScript("OnShow", function()
|
GVS:SetScript("OnShow", function(self, noreset)
|
||||||
scrollbar:SetMinMaxValues(0, math.max(0, GetMerchantNumItems() - NUMROWS))
|
local max = math.max(0, GetMerchantNumItems() - NUMROWS)
|
||||||
scrollbar:SetValue(0)
|
scrollbar:SetMinMaxValues(0, max)
|
||||||
|
scrollbar:SetValue(noreset and math.min(scrollbar:GetValue(), max) or 0)
|
||||||
Refresh()
|
Refresh()
|
||||||
end)
|
end)
|
||||||
GVS:SetScript("OnHide", function() if StackSplitFrame:IsVisible() then StackSplitFrame:Hide() end end)
|
GVS:SetScript("OnHide", function() if StackSplitFrame:IsVisible() then StackSplitFrame:Hide() end end)
|
||||||
|
@ -380,7 +381,7 @@ MerchantBuyBackItem:SetPoint("BOTTOMLEFT", 189, 90)
|
||||||
|
|
||||||
local function Show()
|
local function Show()
|
||||||
for i=1,12 do _G["MerchantItem"..i]:Hide() end
|
for i=1,12 do _G["MerchantItem"..i]:Hide() end
|
||||||
if GVS:IsShown() then Refresh() else GVS:Show() end
|
if GVS:IsShown() then GVS:GetScript("OnShow")(GVS, true) else GVS:Show() end
|
||||||
end
|
end
|
||||||
hooksecurefunc("MerchantFrame_UpdateMerchantInfo", Show)
|
hooksecurefunc("MerchantFrame_UpdateMerchantInfo", Show)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue