mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
update RegisterForClicks
This commit is contained in:
@@ -292,7 +292,7 @@ function AB:LoadKeyBinder()
|
||||
E:Point(header, "CENTER", f, "TOP")
|
||||
header:SetFrameLevel(header:GetFrameLevel() + 2)
|
||||
header:EnableMouse(true)
|
||||
header:RegisterForClicks("AnyUp", "AnyDown")
|
||||
header:RegisterForClicks("LeftButtonUp", "RightButtonUp", "LeftButtonDown", "RightButtonDown")
|
||||
header:SetScript("OnMouseDown", function() f:StartMoving() end)
|
||||
header:SetScript("OnMouseUp", function() f:StopMovingOrSizing() end)
|
||||
|
||||
|
||||
@@ -13,7 +13,7 @@ local NUM_BAG_FRAMES = NUM_BAG_FRAMES
|
||||
local TOTAL_BAGS = NUM_BAG_FRAMES + 2
|
||||
|
||||
local ElvUIKeyRing = CreateFrame("CheckButton", "ElvUIKeyRingButton", UIParent, "ItemButtonTemplate")
|
||||
ElvUIKeyRing:RegisterForClicks("anyUp")
|
||||
ElvUIKeyRing:RegisterForClicks("LeftButtonUp", "RightButtonUp")
|
||||
E:StripTextures(ElvUIKeyRing)
|
||||
ElvUIKeyRing:SetScript("OnClick", function() if CursorHasItem() then PutKeyInKeyRing() else ToggleKeyRing() end end)
|
||||
ElvUIKeyRing:SetScript("OnReceiveDrag", function() if CursorHasItem() then PutKeyInKeyRing() end end)
|
||||
|
||||
@@ -961,7 +961,7 @@ function B:ContructContainerFrame(name, isBank)
|
||||
--Allow dragging the frame around
|
||||
f:SetMovable(true)
|
||||
f:RegisterForDrag("LeftButton", "RightButton")
|
||||
f:RegisterForClicks("AnyUp")
|
||||
f:RegisterForClicks("LeftButtonUp", "RightButtonUp")
|
||||
f:SetScript("OnDragStart", function() if IsShiftKeyDown() then this:StartMoving() end end)
|
||||
f:SetScript("OnDragStop", function() this:StopMovingOrSizing() end)
|
||||
f:SetScript("OnClick", function() if IsControlKeyDown() then B.PostBagMove(this.mover) end end)
|
||||
|
||||
@@ -180,7 +180,7 @@ function UF:UnshowChildUnits(header, ...)
|
||||
|
||||
for i = 1, arg.n do
|
||||
local frame = arg[i]
|
||||
frame:RegisterForClicks(self.db.targetOnMouseDown and "AnyDown" or "AnyUp")
|
||||
frame:RegisterForClicks(self.db.targetOnMouseDown and "LeftButtonDown" or "RightButtonDown" or "LeftButtonUp" or "RightButtonUp")
|
||||
self:UnforceShow(frame)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -196,7 +196,7 @@ local function Constructor()
|
||||
|
||||
button:EnableMouse(true)
|
||||
button:EnableMouseWheel(false)
|
||||
button:RegisterForClicks("AnyDown")
|
||||
button:RegisterForClicks("LeftButtonDown", "RightButtonDown")
|
||||
button:SetScript("OnEnter", Control_OnEnter)
|
||||
button:SetScript("OnLeave", Control_OnLeave)
|
||||
button:SetScript("OnMouseUp", Keybinding_OnMouseUp)
|
||||
|
||||
Reference in New Issue
Block a user