mirror of
https://github.com/brues-code/pfUI.git
synced 2026-10-26 14:00:48 +00:00
nameplates: always set mouse state for both variants
This commit is contained in:
+9
-16
@@ -1033,7 +1033,8 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
|
|||||||
|
|
||||||
local parent = self
|
local parent = self
|
||||||
local nameplate = self.nameplate
|
local nameplate = self.nameplate
|
||||||
local plate = C.nameplates["overlap"] == "1" and nameplate or parent
|
local plate = (C.nameplates["overlap"] == "1" or C.nameplates["vertical_offset"] ~= "0") and nameplate or parent
|
||||||
|
local clickable = C.nameplates["clickthrough"] ~= "1" and true or false
|
||||||
|
|
||||||
if C.nameplates["vertical_offset"] ~= "0" then
|
if C.nameplates["vertical_offset"] ~= "0" then
|
||||||
nameplate:SetPoint("TOP", parent, "TOP", 0, tonumber(C.nameplates["vertical_offset"]))
|
nameplate:SetPoint("TOP", parent, "TOP", 0, tonumber(C.nameplates["vertical_offset"]))
|
||||||
@@ -1041,14 +1042,7 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
|
|||||||
|
|
||||||
-- replace clickhandler
|
-- replace clickhandler
|
||||||
if C.nameplates["overlap"] == "1" or C.nameplates["vertical_offset"] ~= "0" then
|
if C.nameplates["overlap"] == "1" or C.nameplates["vertical_offset"] ~= "0" then
|
||||||
parent:SetFrameLevel(0)
|
plate:SetScript("OnClick", function() parent:Click() end)
|
||||||
nameplate:SetScript("OnClick", function() parent:Click() end)
|
|
||||||
|
|
||||||
parent:EnableMouse(false)
|
|
||||||
nameplate:EnableMouse(true)
|
|
||||||
else
|
|
||||||
parent:EnableMouse(true)
|
|
||||||
nameplate:EnableMouse(false)
|
|
||||||
end
|
end
|
||||||
|
|
||||||
-- enable mouselook on rightbutton down
|
-- enable mouselook on rightbutton down
|
||||||
@@ -1058,13 +1052,12 @@ pfUI:RegisterModule("nameplates", "vanilla:tbc", function ()
|
|||||||
plate:SetScript("OnMouseDown", nil)
|
plate:SetScript("OnMouseDown", nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
-- disable click event on frames
|
-- disable all click events
|
||||||
if C.nameplates["clickthrough"] == "1" then
|
parent:EnableMouse(false)
|
||||||
nameplate:EnableMouse(false)
|
nameplate:EnableMouse(false)
|
||||||
plate:EnableMouse(false)
|
|
||||||
else
|
-- make the actual plate clickable
|
||||||
plate:EnableMouse(true)
|
plate:EnableMouse(clickable)
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
local hookOnUpdate = nameplates.OnUpdate
|
local hookOnUpdate = nameplates.OnUpdate
|
||||||
|
|||||||
Reference in New Issue
Block a user