From 4694db4f908598ea9d00de5d80432985f1b5a699 Mon Sep 17 00:00:00 2001
From: Bluewhale1337 <295648290+Bluewhale1337@users.noreply.github.com>
Date: Sat, 10 Oct 2026 12:25:28 +0200
Subject: [PATCH] feat: add max/min HP bar color configuration and font
selection options to skins
---
HealBot_Controller_Spells.lua | 8 +-
HealBot_Data.lua | 7 +
HealBot_Localization.de.lua | 2 +
HealBot_Localization.en.lua | 2 +
HealBot_Localization.fr.lua | 2 +
HealBot_Localization.kr.lua | 2 +
HealBot_Options.lua | 29 ++
HealBot_Options_General.lua | 26 ++
HealBot_Options_Skins.lua | 60 ++++
HealBot_Options_Skins.xml | 594 ++++++++++++++++------------------
HealBot_View_Layout.lua | 37 ++-
README.md | 4 +-
12 files changed, 451 insertions(+), 322 deletions(-)
diff --git a/HealBot_Controller_Spells.lua b/HealBot_Controller_Spells.lua
index a377df6..ae95946 100644
--- a/HealBot_Controller_Spells.lua
+++ b/HealBot_Controller_Spells.lua
@@ -473,7 +473,13 @@ end
-- HealBot_AddHeal: Internal utility: HealBot_AddHeal
function HealBot_AddHeal(spell)
HealBot_SetSpellDefaults(spell);
- table.foreachi(HealBot_Spells[spell].Target, function (i, val)
+ local targetList = HealBot_Spells[spell].Target
+ if not targetList and HealBot_Spells[spell].Group and HealBot_Spells[HealBot_Spells[spell].Group] then
+ targetList = HealBot_Spells[HealBot_Spells[spell].Group].Target
+ end
+ if not targetList then targetList = {"player", "party", "pet"} end
+ table.foreachi(targetList, function (i, val)
+ if not HealBot_Heals[val] then HealBot_Heals[val] = {} end
table.insert(HealBot_Heals[val], spell);
end);
HealBot_Spells[spell].BagSlot = HealBot_GetBagSlot(spell);
diff --git a/HealBot_Data.lua b/HealBot_Data.lua
index a4a4c8a..362c495 100644
--- a/HealBot_Data.lua
+++ b/HealBot_Data.lua
@@ -249,6 +249,13 @@ HealBot_ConfigDefaults = {
bboffset = {[HEALBOT_SKINS_STD] = 16, ["HealBot Party"] = 16, ["HealBot Raid"] = 16, ["Alteric Valley"] = 16, ["Modern Flat"] = 3},
bfontoutline = {[HEALBOT_SKINS_STD] = 0, ["HealBot Party"] = 0, ["HealBot Raid"] = 0, ["Alteric Valley"] = 0, ["Modern Flat"] = 1},
biconsize = {[HEALBOT_SKINS_STD] = 12, ["HealBot Party"] = 12, ["HealBot Raid"] = 12, ["Alteric Valley"] = 12, ["Modern Flat"] = 12},
+ bcolormaxr = {[HEALBOT_SKINS_STD] = 0, ["HealBot Party"] = 0, ["HealBot Raid"] = 0, ["Alteric Valley"] = 0, ["Modern Flat"] = 0},
+ bcolormaxg = {[HEALBOT_SKINS_STD] = 1, ["HealBot Party"] = 1, ["HealBot Raid"] = 1, ["Alteric Valley"] = 1, ["Modern Flat"] = 1},
+ bcolormaxb = {[HEALBOT_SKINS_STD] = 0, ["HealBot Party"] = 0, ["HealBot Raid"] = 0, ["Alteric Valley"] = 0, ["Modern Flat"] = 0},
+ bcolorminr = {[HEALBOT_SKINS_STD] = 1, ["HealBot Party"] = 1, ["HealBot Raid"] = 1, ["Alteric Valley"] = 1, ["Modern Flat"] = 1},
+ bcolorming = {[HEALBOT_SKINS_STD] = 0, ["HealBot Party"] = 0, ["HealBot Raid"] = 0, ["Alteric Valley"] = 0, ["Modern Flat"] = 0},
+ bcolorminb = {[HEALBOT_SKINS_STD] = 0, ["HealBot Party"] = 0, ["HealBot Raid"] = 0, ["Alteric Valley"] = 0, ["Modern Flat"] = 0},
+ bfont = {[HEALBOT_SKINS_STD] = "Fonts\\FRIZQT__.TTF", ["HealBot Party"] = "Fonts\\FRIZQT__.TTF", ["HealBot Raid"] = "Fonts\\FRIZQT__.TTF", ["Alteric Valley"] = "Fonts\\FRIZQT__.TTF", ["Modern Flat"] = "Fonts\\FRIZQT__.TTF"},
ShowTooltip = 1,
ShowManaBars = 0,
ManaBarsHealersOnly = 0,
diff --git a/HealBot_Localization.de.lua b/HealBot_Localization.de.lua
index 80cea1b..cc64ac7 100644
--- a/HealBot_Localization.de.lua
+++ b/HealBot_Localization.de.lua
@@ -242,6 +242,8 @@ HEALBOT_OPTIONS_NEWSKINTEXT = "Neuer Skin"
HEALBOT_OPTIONS_SAVESKIN = "Speichern"
HEALBOT_OPTIONS_SKINBARS = "Leisten Optionen"
HEALBOT_OPTIONS_SKINPANEL = "Panel Farben"
+HEALBOT_SKIN_MAXHPTEXT = "Max HP"
+HEALBOT_SKIN_MINHPTEXT = "Min HP"
HEALBOT_SKIN_ENTEXT = "Aktiv"
HEALBOT_SKIN_DISTEXT = "Inaktiv"
HEALBOT_SKIN_DEBTEXT = "Debuff"
diff --git a/HealBot_Localization.en.lua b/HealBot_Localization.en.lua
index 18de362..0147ab8 100644
--- a/HealBot_Localization.en.lua
+++ b/HealBot_Localization.en.lua
@@ -275,6 +275,8 @@ HEALBOT_OPTIONS_BUFF7 = "Buff 7";
HEALBOT_OPTIONS_BUFF8 = "Buff 8";
HEALBOT_OPTIONS_SKINBARS = "Bar options"
HEALBOT_OPTIONS_SKINPANEL = "Panel colours"
+HEALBOT_SKIN_MAXHPTEXT = "Max HP"
+HEALBOT_SKIN_MINHPTEXT = "Min HP"
HEALBOT_SKIN_ENTEXT = "Enabled"
HEALBOT_SKIN_DISTEXT = "Disabled"
HEALBOT_SKIN_DEBTEXT = "Debuff"
diff --git a/HealBot_Localization.fr.lua b/HealBot_Localization.fr.lua
index 56f7b67..7c6f693 100644
--- a/HealBot_Localization.fr.lua
+++ b/HealBot_Localization.fr.lua
@@ -305,6 +305,8 @@ HEALBOT_OPTIONS_NEWSKINTEXT = "New skin" -- *************** needs French
HEALBOT_OPTIONS_SAVESKIN = "Save" -- *************** needs French translation ***************
HEALBOT_OPTIONS_SKINBARS = "Bar options" -- *************** needs French translation ***************
HEALBOT_OPTIONS_SKINPANEL = "Panel colours" -- *************** needs French translation ***************
+HEALBOT_SKIN_MAXHPTEXT = "Max HP"
+HEALBOT_SKIN_MINHPTEXT = "Min HP"
HEALBOT_SKIN_ENTEXT = "Enabled" -- *************** needs French translation ***************
HEALBOT_SKIN_DISTEXT = "Disabled" -- *************** needs French translation ***************
HEALBOT_SKIN_DEBTEXT = "Debuff" -- *************** needs French translation ***************
diff --git a/HealBot_Localization.kr.lua b/HealBot_Localization.kr.lua
index 765ff36..0b7e0ea 100644
--- a/HealBot_Localization.kr.lua
+++ b/HealBot_Localization.kr.lua
@@ -221,6 +221,8 @@ HEALBOT_GREATER_BLESSING_OF_SALVATION = "상급 구원의 축복";
HEALBOT_OPTIONS_SAVESKIN = "저장"
HEALBOT_OPTIONS_SKINBARS = "바 옵션들"
HEALBOT_OPTIONS_SKINPANEL = "패널 색"
+ HEALBOT_SKIN_MAXHPTEXT = "최대 생명력"
+ HEALBOT_SKIN_MINHPTEXT = "최소 생명력"
HEALBOT_SKIN_ENTEXT = "활성화"
HEALBOT_SKIN_DISTEXT = "비활성화"
HEALBOT_SKIN_DEBTEXT = "디버프"
diff --git a/HealBot_Options.lua b/HealBot_Options.lua
index c3837bf..8ca3554 100644
--- a/HealBot_Options.lua
+++ b/HealBot_Options.lua
@@ -202,6 +202,20 @@ function HealBot_Returned_Colours()
HealBot_Config.babortcolg[HealBot_Config.Current_Skin],
HealBot_Config.babortcolb[HealBot_Config.Current_Skin] = ColorPickerFrame:GetColorRGB();
HealBot_Config.babortcola[HealBot_Config.Current_Skin] = A;
+ elseif HealBot_ColourObjWaiting=="MaxHP" then
+ if not HealBot_Config.bcolormaxr then HealBot_Config.bcolormaxr = {} end
+ if not HealBot_Config.bcolormaxg then HealBot_Config.bcolormaxg = {} end
+ if not HealBot_Config.bcolormaxb then HealBot_Config.bcolormaxb = {} end
+ HealBot_Config.bcolormaxr[HealBot_Config.Current_Skin],
+ HealBot_Config.bcolormaxg[HealBot_Config.Current_Skin],
+ HealBot_Config.bcolormaxb[HealBot_Config.Current_Skin] = ColorPickerFrame:GetColorRGB();
+ elseif HealBot_ColourObjWaiting=="MinHP" then
+ if not HealBot_Config.bcolorminr then HealBot_Config.bcolorminr = {} end
+ if not HealBot_Config.bcolorming then HealBot_Config.bcolorming = {} end
+ if not HealBot_Config.bcolorminb then HealBot_Config.bcolorminb = {} end
+ HealBot_Config.bcolorminr[HealBot_Config.Current_Skin],
+ HealBot_Config.bcolorming[HealBot_Config.Current_Skin],
+ HealBot_Config.bcolorminb[HealBot_Config.Current_Skin] = ColorPickerFrame:GetColorRGB();
else
HealBot_Config.CDCBarColour[HealBot_ColourObjWaiting].R,
HealBot_Config.CDCBarColour[HealBot_ColourObjWaiting].G,
@@ -358,6 +372,21 @@ function HealBot_Options_SetSkins()
HealBot_Options_FramePaddingS:SetValue((HealBot_Config.bpadding and HealBot_Config.bpadding[HealBot_Config.Current_Skin]) or 10)
HealBot_Options_BorderThicknessS:SetValue((HealBot_Config.bboffset and HealBot_Config.bboffset[HealBot_Config.Current_Skin]) or 1)
HealBot_Options_FontHeight:SetValue(HealBot_Config.btextheight[HealBot_Config.Current_Skin])
+
+ local fontFile = (HealBot_Config.bfont and HealBot_Config.bfont[HealBot_Config.Current_Skin]) or "Fonts\\FRIZQT__.TTF"
+ local fontName = "Friz Quadrata"
+ if HealBot_Font_List then
+ for i = 1, getn(HealBot_Font_List) do
+ if HealBot_Font_List[i].file == fontFile then
+ fontName = HealBot_Font_List[i].text
+ UIDropDownMenu_SetSelectedID(HealBot_Options_Font_Dropdown, i)
+ break
+ end
+ end
+ end
+ if HealBot_Options_Font_DropdownText then
+ HealBot_Options_Font_DropdownText:SetText(fontName)
+ end
HealBot_Options_BarAlphaDis:SetValue(HealBot_Config.bardisa[HealBot_Config.Current_Skin])
HealBot_Options_AbortBarSize:SetValue(HealBot_Config.abortsize[HealBot_Config.Current_Skin])
local isShowHeaders = (HealBot_Config.ShowHeader[HealBot_Config.Current_Skin] == 1)
diff --git a/HealBot_Options_General.lua b/HealBot_Options_General.lua
index 3a26a6a..22df00b 100644
--- a/HealBot_Options_General.lua
+++ b/HealBot_Options_General.lua
@@ -119,6 +119,16 @@ function HealBot_SkinColorpick_OnClick(SkinType)
HealBot_Config.babortcolg[HealBot_Config.Current_Skin],
HealBot_Config.babortcolb[HealBot_Config.Current_Skin],
HealBot_Config.babortcola[HealBot_Config.Current_Skin])
+ elseif SkinType=="MaxHP" then
+ local r = HealBot_Config.bcolormaxr and HealBot_Config.bcolormaxr[HealBot_Config.Current_Skin] or 0.0
+ local g = HealBot_Config.bcolormaxg and HealBot_Config.bcolormaxg[HealBot_Config.Current_Skin] or 1.0
+ local b = HealBot_Config.bcolormaxb and HealBot_Config.bcolormaxb[HealBot_Config.Current_Skin] or 0.0
+ HealBot_UseColourPick(r, g, b, 1.0)
+ elseif SkinType=="MinHP" then
+ local r = HealBot_Config.bcolorminr and HealBot_Config.bcolorminr[HealBot_Config.Current_Skin] or 1.0
+ local g = HealBot_Config.bcolorming and HealBot_Config.bcolorming[HealBot_Config.Current_Skin] or 0.0
+ local b = HealBot_Config.bcolorminb and HealBot_Config.bcolorminb[HealBot_Config.Current_Skin] or 0.0
+ HealBot_UseColourPick(r, g, b, 1.0)
end
end
-- HealBot_SetSkinColours: Applies skin configuration to UI elements.
@@ -136,6 +146,20 @@ function HealBot_SetSkinColours()
HealBot_EnTextColorpickin:SetStatusBarColor(0, 1, 0, inHealAlpha)
HealBot_DisTextColorpick:SetStatusBarColor(0, 1, 0, disabledAlpha)
+ local maxR = HealBot_Config.bcolormaxr and HealBot_Config.bcolormaxr[skin] or 0.0
+ local maxG = HealBot_Config.bcolormaxg and HealBot_Config.bcolormaxg[skin] or 1.0
+ local maxB = HealBot_Config.bcolormaxb and HealBot_Config.bcolormaxb[skin] or 0.0
+ if HealBot_MaxHPColorpick then
+ HealBot_MaxHPColorpick:SetStatusBarColor(maxR, maxG, maxB, 1.0)
+ end
+
+ local minR = HealBot_Config.bcolorminr and HealBot_Config.bcolorminr[skin] or 1.0
+ local minG = HealBot_Config.bcolorming and HealBot_Config.bcolorming[skin] or 0.0
+ local minB = HealBot_Config.bcolorminb and HealBot_Config.bcolorminb[skin] or 0.0
+ if HealBot_MinHPColorpick then
+ HealBot_MinHPColorpick:SetStatusBarColor(minR, minG, minB, 1.0)
+ end
+
-- 2. Set Text Colors
HealBot_EnTextColorpickt:SetTextColor(
HealBot_Config.btextenabledcolr[skin], HealBot_Config.btextenabledcolg[skin],
@@ -210,6 +234,8 @@ function HealBot_SetSkinColours()
HealBot_EnTextColorpickt:SetText(HEALBOT_SKIN_ENTEXT)
HealBot_DisTextColorpickt:SetText(HEALBOT_SKIN_DISTEXT)
HealBot_DebTextColorpickt:SetText(HEALBOT_SKIN_DEBTEXT)
+ if HealBot_MaxHPColorpickt then HealBot_MaxHPColorpickt:SetText(HEALBOT_SKIN_MAXHPTEXT or "Max HP") end
+ if HealBot_MinHPColorpickt then HealBot_MinHPColorpickt:SetText(HEALBOT_SKIN_MINHPTEXT or "Min HP") end
-- 6. Force UI redraw (Kept the scale hack since it addresses a specific engine quirk)
local barScale = HealBot_EnTextColorpick:GetScale()
diff --git a/HealBot_Options_Skins.lua b/HealBot_Options_Skins.lua
index 41bdd18..5b1522d 100644
--- a/HealBot_Options_Skins.lua
+++ b/HealBot_Options_Skins.lua
@@ -1,6 +1,41 @@
-- HealBot Options panel file: HealBot_Options_Skins.lua
-- Split from original HealBot_Options.lua
+HealBot_Font_List = {
+ { text = "Friz Quadrata", file = "Fonts\\FRIZQT__.TTF" },
+ { text = "Arial Narrow", file = "Fonts\\ARIALN.TTF" },
+ { text = "Skurri", file = "Fonts\\skurri.ttf" },
+ { text = "Morpheus", file = "Fonts\\MORPHEUS.ttf" },
+}
+
+function HealBot_Options_FontDD_OnLoad(this)
+ UIDropDownMenu_Initialize(this, HealBot_Options_FontDD_Initialize)
+ UIDropDownMenu_SetWidth(110, this)
+end
+
+function HealBot_Options_FontDD_Initialize()
+ local currentFont = (HealBot_Config.bfont and HealBot_Config.bfont[HealBot_Config.Current_Skin]) or "Fonts\\FRIZQT__.TTF"
+ for i = 1, getn(HealBot_Font_List) do
+ local fontItem = HealBot_Font_List[i]
+ local info = {}
+ info.text = fontItem.text
+ info.func = HealBot_Options_FontDD_OnClick
+ info.value = fontItem.file
+ info.checked = (currentFont == fontItem.file)
+ UIDropDownMenu_AddButton(info)
+ end
+end
+
+function HealBot_Options_FontDD_OnClick()
+ UIDropDownMenu_SetSelectedID(HealBot_Options_Font_Dropdown, this:GetID())
+ if HealBot_Options_Font_DropdownText then
+ HealBot_Options_Font_DropdownText:SetText(this:GetText())
+ end
+ if not HealBot_Config.bfont then HealBot_Config.bfont = {} end
+ HealBot_Config.bfont[HealBot_Config.Current_Skin] = this.value
+ HealBot_Action_ResetSkin()
+end
+
-- HealBot_Options_BarMaxRowsS_OnValueChanged: UI handler for OnValueChanged options panel.
function HealBot_Options_BarMaxRowsS_OnValueChanged(this)
if not HealBot_Config.bmaxrows then HealBot_Config.bmaxrows = {} end
@@ -97,6 +132,24 @@ function HealBot_Options_NewSkinb_OnClick(this)
HealBot_Config.babortcola[HealBot_Options_NewSkin:GetText()] = HealBot_Config.babortcola[HealBot_Config.Current_Skin]
HealBot_Config.ShowHeader[HealBot_Options_NewSkin:GetText()] = HealBot_Config.ShowHeader[HealBot_Config.Current_Skin]
+ if not HealBot_Config.bcolormaxr then HealBot_Config.bcolormaxr = {} end
+ if not HealBot_Config.bcolormaxg then HealBot_Config.bcolormaxg = {} end
+ if not HealBot_Config.bcolormaxb then HealBot_Config.bcolormaxb = {} end
+ if not HealBot_Config.bcolorminr then HealBot_Config.bcolorminr = {} end
+ if not HealBot_Config.bcolorming then HealBot_Config.bcolorming = {} end
+ if not HealBot_Config.bcolorminb then HealBot_Config.bcolorminb = {} end
+ if not HealBot_Config.bfont then HealBot_Config.bfont = {} end
+
+ local curSkin = HealBot_Config.Current_Skin
+ local newSkin = HealBot_Options_NewSkin:GetText()
+ HealBot_Config.bcolormaxr[newSkin] = HealBot_Config.bcolormaxr[curSkin] or 0
+ HealBot_Config.bcolormaxg[newSkin] = HealBot_Config.bcolormaxg[curSkin] or 1
+ HealBot_Config.bcolormaxb[newSkin] = HealBot_Config.bcolormaxb[curSkin] or 0
+ HealBot_Config.bcolorminr[newSkin] = HealBot_Config.bcolorminr[curSkin] or 1
+ HealBot_Config.bcolorming[newSkin] = HealBot_Config.bcolorming[curSkin] or 0
+ HealBot_Config.bcolorminb[newSkin] = HealBot_Config.bcolorminb[curSkin] or 0
+ HealBot_Config.bfont[newSkin] = HealBot_Config.bfont[curSkin] or "Fonts\\FRIZQT__.TTF"
+
table.insert(HealBot_Skins,2,HealBot_Options_NewSkin:GetText())
HealBot_Config.Skin_ID = 2;
HealBot_Config.Skins = HealBot_Skins; HealBot_Config.Current_Skin = HealBot_Options_NewSkin:GetText();
@@ -144,6 +197,13 @@ function HealBot_Options_DeleteSkin_OnClick(this)
HealBot_Config.babortcolb[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.babortcola[HealBot_Options_SkinsText:GetText()] = nil
HealBot_Config.ShowHeader[HealBot_Options_SkinsText:GetText()] = nil
+ if HealBot_Config.bcolormaxr then HealBot_Config.bcolormaxr[HealBot_Options_SkinsText:GetText()] = nil end
+ if HealBot_Config.bcolormaxg then HealBot_Config.bcolormaxg[HealBot_Options_SkinsText:GetText()] = nil end
+ if HealBot_Config.bcolormaxb then HealBot_Config.bcolormaxb[HealBot_Options_SkinsText:GetText()] = nil end
+ if HealBot_Config.bcolorminr then HealBot_Config.bcolorminr[HealBot_Options_SkinsText:GetText()] = nil end
+ if HealBot_Config.bcolorming then HealBot_Config.bcolorming[HealBot_Options_SkinsText:GetText()] = nil end
+ if HealBot_Config.bcolorminb then HealBot_Config.bcolorminb[HealBot_Options_SkinsText:GetText()] = nil end
+ if HealBot_Config.bfont then HealBot_Config.bfont[HealBot_Options_SkinsText:GetText()] = nil end
table.remove(HealBot_Skins,HealBot_Config.Skin_ID)
HealBot_Config.Skin_ID = 1;
HealBot_Config.Skins = HealBot_Skins;
diff --git a/HealBot_Options_Skins.xml b/HealBot_Options_Skins.xml
index ce7899e..9311f28 100644
--- a/HealBot_Options_Skins.xml
+++ b/HealBot_Options_Skins.xml
@@ -170,13 +170,13 @@
-
+
HealBot_Options_ShowHeaders_OnLoad(this,HEALBOT_OPTIONS_SHOWHEADERS)
HealBot_Options_ShowHeaders_OnClick(this)
-
+
@@ -223,6 +223,23 @@
HealBot_Options_AbortBarSize_OnValueChanged(this)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ HealBot_Options_FontDD_OnLoad(this)
+
+
@@ -287,309 +304,269 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- this:SetMinMaxValues(0,100); this:SetValue(70);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- this:SetMinMaxValues(0,100); this:SetValue(100);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- this:SetMinMaxValues(0,100); this:SetValue(100);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- this:SetMinMaxValues(0,100); this:SetValue(100);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- this:SetMinMaxValues(0,100); this:SetValue(100);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- this:SetMinMaxValues(0,100); this:SetValue(100);
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- this:SetMinMaxValues(0,100); this:SetValue(100);
-
-
-
-
-
-
-
-