mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
update np
This commit is contained in:
@@ -318,10 +318,6 @@ end
|
||||
|
||||
function mod:OnShow(self, isUpdate)
|
||||
self = self or this
|
||||
if mod.db.motionType == "OVERLAP" then
|
||||
self:SetWidth(0.01)
|
||||
self:SetHeight(0.01)
|
||||
end
|
||||
|
||||
if not isUpdate then
|
||||
self.UnitFrame.moveUp:Play()
|
||||
@@ -335,6 +331,21 @@ function mod:OnShow(self, isUpdate)
|
||||
self.UnitFrame.UnitClass = mod:UnitClass(self.UnitFrame.oldName:GetText(), unitType)
|
||||
self.UnitFrame.UnitReaction = unitReaction
|
||||
|
||||
local width, height = mod.db.clickableWidth + ((E.PixelMode and 2) or 6), mod.db.clickableHeight + mod.db.units[unitType].castbar.height + 3
|
||||
self.UnitFrame:SetWidth(width)
|
||||
self.UnitFrame:SetHeight(height)
|
||||
|
||||
if mod.db.motionType == "OVERLAP" then
|
||||
width, height = .5*width, .5*height
|
||||
self:SetWidth(0.01)
|
||||
self:SetHeight(0.01)
|
||||
self:SetHitRectInsets(-width, -width, -height, -height)
|
||||
else
|
||||
self:SetWidth(width)
|
||||
self:SetHeight(height)
|
||||
self:SetHitRectInsets(0, 0, 0, 0)
|
||||
end
|
||||
|
||||
if unitType == "FRIENDLY_PLAYER" or unitType == "FRIENDLY_NPC" then
|
||||
self:EnableMouse(not mod.db.clickThrough.friendly)
|
||||
self.UnitFrame:EnableMouse(not mod.db.clickThrough.friendly)
|
||||
|
||||
Reference in New Issue
Block a user