add configuration option for health bar texture (#39)

* add configuration option for health bar texture

* add usage example for bartexture

* add desc

* fix needing to reload ui

* fix needing to reload ui

---------

Co-authored-by: pepopo978 <149287158+pepopo978@users.noreply.github.com>
This commit is contained in:
seybsen
2025-07-27 12:27:32 -07:00
committed by GitHub
co-authored by pepopo978
parent cd1b47ec45
commit 01385ba2a7
3 changed files with 29 additions and 2 deletions
+6 -2
View File
@@ -159,6 +159,11 @@ Cursive.UpdateFramesFromConfig = function()
end
end
Cursive.ResetUnitFrames = function()
-- clear cached frames so they are recreated
ui.unitFrames = {}
end
ui.BarEnter = function()
if this.parent.healthBar then
this.parent.healthBar.border:SetBackdropBorderColor(1, 1, 1, 1)
@@ -312,7 +317,7 @@ local function CreateBarSecondSection(unitFrame, guid)
-- create health bar
if config.showhealthbar then
local healthBar = CreateFrame("StatusBar", "CursiveHealthBar", secondSection)
healthBar:SetStatusBarTexture("Interface\\TargetingFrame\\UI-StatusBar")
healthBar:SetStatusBarTexture(config.bartexture)
healthBar:SetStatusBarColor(1, .8, .2, 1)
healthBar:SetMinMaxValues(0, 100)
healthBar:SetValue(20)
@@ -599,7 +604,6 @@ local function CheckForCleanup(guid, time)
end
end
local shouldDisplayGuids = {};
local displayedGuids = {};