mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 16:34:45 +00:00
Add support MouseWheel for mail, merchant and spellbook
This commit is contained in:
@@ -26,6 +26,19 @@ local function LoadSkin()
|
|||||||
E:Point(MailFrame.backdrop, "TOPLEFT", 10, -12)
|
E:Point(MailFrame.backdrop, "TOPLEFT", 10, -12)
|
||||||
E:Point(MailFrame.backdrop, "BOTTOMRIGHT", -30, 74)
|
E:Point(MailFrame.backdrop, "BOTTOMRIGHT", -30, 74)
|
||||||
|
|
||||||
|
MailFrame:EnableMouseWheel(true)
|
||||||
|
MailFrame:SetScript("OnMouseWheel", function()
|
||||||
|
if arg1 > 0 then
|
||||||
|
if InboxPrevPageButton:IsEnabled() == 1 then
|
||||||
|
InboxPrevPage()
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if InboxNextPageButton:IsEnabled() == 1 then
|
||||||
|
InboxNextPage()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
for i = 1, INBOXITEMS_TO_DISPLAY do
|
for i = 1, INBOXITEMS_TO_DISPLAY do
|
||||||
local mail = _G["MailItem"..i]
|
local mail = _G["MailItem"..i]
|
||||||
local button = _G["MailItem"..i.."Button"]
|
local button = _G["MailItem"..i.."Button"]
|
||||||
|
|||||||
@@ -22,6 +22,19 @@ local function LoadSkin()
|
|||||||
E:Point(MerchantFrame.backdrop, "TOPLEFT", 10, -11)
|
E:Point(MerchantFrame.backdrop, "TOPLEFT", 10, -11)
|
||||||
E:Point(MerchantFrame.backdrop, "BOTTOMRIGHT", -28, 60)
|
E:Point(MerchantFrame.backdrop, "BOTTOMRIGHT", -28, 60)
|
||||||
|
|
||||||
|
MerchantFrame:EnableMouseWheel(true)
|
||||||
|
MerchantFrame:SetScript("OnMouseWheel", function()
|
||||||
|
if arg1 > 0 then
|
||||||
|
if MerchantPrevPageButton:IsShown() and MerchantPrevPageButton:IsEnabled() == 1 then
|
||||||
|
MerchantPrevPageButton_OnClick()
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if MerchantNextPageButton:IsShown() and MerchantNextPageButton:IsEnabled() == 1 then
|
||||||
|
MerchantNextPageButton_OnClick()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
S:HandleCloseButton(MerchantFrameCloseButton, MerchantFrame.backdrop)
|
S:HandleCloseButton(MerchantFrameCloseButton, MerchantFrame.backdrop)
|
||||||
|
|
||||||
for i = 1, 12 do
|
for i = 1, 12 do
|
||||||
|
|||||||
@@ -15,6 +15,26 @@ local function LoadSkin()
|
|||||||
E:Point(SpellBookFrame.backdrop, "TOPLEFT", 10, -12)
|
E:Point(SpellBookFrame.backdrop, "TOPLEFT", 10, -12)
|
||||||
E:Point(SpellBookFrame.backdrop, "BOTTOMRIGHT", -31, 75)
|
E:Point(SpellBookFrame.backdrop, "BOTTOMRIGHT", -31, 75)
|
||||||
|
|
||||||
|
SpellBookFrame:EnableMouseWheel(true)
|
||||||
|
SpellBookFrame:SetScript("OnMouseWheel", function()
|
||||||
|
--do nothing if not on an appropriate book type
|
||||||
|
if SpellBookFrame.bookType ~= BOOKTYPE_SPELL then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
local currentPage, maxPages = SpellBook_GetCurrentPage()
|
||||||
|
|
||||||
|
if arg1 > 0 then
|
||||||
|
if currentPage > 1 then
|
||||||
|
PrevPageButton_OnClick()
|
||||||
|
end
|
||||||
|
else
|
||||||
|
if currentPage < maxPages then
|
||||||
|
NextPageButton_OnClick()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end)
|
||||||
|
|
||||||
for i = 1, 3 do
|
for i = 1, 3 do
|
||||||
local tab = _G["SpellBookFrameTabButton"..i]
|
local tab = _G["SpellBookFrameTabButton"..i]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user