update np

This commit is contained in:
Bunny67
2018-08-12 20:33:44 +03:00
parent e642378544
commit 615810f44a
2 changed files with 15 additions and 14 deletions
+15 -4
View File
@@ -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)