mirror of
https://github.com/Bluewhale1337/ElvUIModernized.git
synced 2026-07-27 08:24:44 +00:00
test nameplate
This commit is contained in:
@@ -165,7 +165,15 @@ end
|
||||
function mod:ConstructElement_HealthBar(parent)
|
||||
local frame = CreateFrame("StatusBar", nil, parent)
|
||||
self:StyleFrame(frame)
|
||||
frame:SetFrameLevel(parent:GetFrameLevel())
|
||||
|
||||
frame:SetScript("OnSizeChanged", function()
|
||||
parent:SetWidth(this:GetWidth())
|
||||
parent:SetHeight(this:GetHeight())
|
||||
|
||||
local health = this:GetValue()
|
||||
local _, maxHealth = this:GetMinMaxValues()
|
||||
this:GetStatusBarTexture():SetPoint("TOPRIGHT", -(this:GetWidth() * ((maxHealth - health) / maxHealth)), 0)
|
||||
end)
|
||||
|
||||
frame.text = frame:CreateFontString(nil, "OVERLAY")
|
||||
frame.scale = CreateAnimationGroup(frame)
|
||||
|
||||
Reference in New Issue
Block a user