mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 16:34:45 +00:00
update np
This commit is contained in:
@@ -119,16 +119,6 @@ function mod:ConfigureElement_HealthBar(frame, configuring)
|
|||||||
|
|
||||||
healthBar:SetPoint("TOP", frame, "CENTER", 0, self.db.units[frame.UnitType].castbar.height + 3)
|
healthBar:SetPoint("TOP", frame, "CENTER", 0, self.db.units[frame.UnitType].castbar.height + 3)
|
||||||
|
|
||||||
local width, height = self.db.clickableWidth + ((E.PixelMode and 2) or 6), self.db.clickableHeight + self.db.units[frame.UnitType].castbar.height + 3
|
|
||||||
if self.db.motionType ~= "OVERLAP" then
|
|
||||||
frame:GetParent():SetWidth(width)
|
|
||||||
frame:GetParent():SetHeight(height)
|
|
||||||
else
|
|
||||||
frame:GetParent():SetHitRectInsets(-.5*width, -.5*width, -.5*height, -.5*height)
|
|
||||||
end
|
|
||||||
frame:SetWidth(width)
|
|
||||||
frame:SetHeight(height)
|
|
||||||
|
|
||||||
if frame.isTarget and self.db.useTargetScale then
|
if frame.isTarget and self.db.useTargetScale then
|
||||||
healthBar:SetHeight(self.db.units[frame.UnitType].healthbar.height * ((frame.CustomScale and frame.CustomScale * self.db.targetScale) or self.db.targetScale))
|
healthBar:SetHeight(self.db.units[frame.UnitType].healthbar.height * ((frame.CustomScale and frame.CustomScale * self.db.targetScale) or self.db.targetScale))
|
||||||
healthBar:SetWidth(self.db.units[frame.UnitType].healthbar.width * ((frame.CustomScale and frame.CustomScale * self.db.targetScale) or self.db.targetScale))
|
healthBar:SetWidth(self.db.units[frame.UnitType].healthbar.width * ((frame.CustomScale and frame.CustomScale * self.db.targetScale) or self.db.targetScale))
|
||||||
|
|||||||
@@ -318,10 +318,6 @@ end
|
|||||||
|
|
||||||
function mod:OnShow(self, isUpdate)
|
function mod:OnShow(self, isUpdate)
|
||||||
self = self or this
|
self = self or this
|
||||||
if mod.db.motionType == "OVERLAP" then
|
|
||||||
self:SetWidth(0.01)
|
|
||||||
self:SetHeight(0.01)
|
|
||||||
end
|
|
||||||
|
|
||||||
if not isUpdate then
|
if not isUpdate then
|
||||||
self.UnitFrame.moveUp:Play()
|
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.UnitClass = mod:UnitClass(self.UnitFrame.oldName:GetText(), unitType)
|
||||||
self.UnitFrame.UnitReaction = unitReaction
|
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
|
if unitType == "FRIENDLY_PLAYER" or unitType == "FRIENDLY_NPC" then
|
||||||
self:EnableMouse(not mod.db.clickThrough.friendly)
|
self:EnableMouse(not mod.db.clickThrough.friendly)
|
||||||
self.UnitFrame:EnableMouse(not mod.db.clickThrough.friendly)
|
self.UnitFrame:EnableMouse(not mod.db.clickThrough.friendly)
|
||||||
|
|||||||
Reference in New Issue
Block a user