From 8050561733ac8b4f62ee570bda14eaaa92b94fcb Mon Sep 17 00:00:00 2001
From: Bluewhale1337 <295648290+Bluewhale1337@users.noreply.github.com>
Date: Thu, 8 Oct 2026 16:16:19 +0200
Subject: [PATCH] Chanes: add test mode bars and options for UI testing and
layout configuration
---
HealBotBlue.toc | 2 +-
HealBot_Action.lua | 4 +
HealBot_Controller_Aura.lua | 3 +
HealBot_Controller_Range.lua | 2 +-
HealBot_Controller_Spells.lua | 8 +-
HealBot_Localization.en.lua | 2 +
HealBot_Model.lua | 2 +-
HealBot_Options.lua | 12 +-
HealBot_Options_Buffs.xml | 8 +-
HealBot_Options_CDC.xml | 64 ++---
HealBot_Options_General.xml | 22 +-
HealBot_Options_Healing.xml | 48 ++--
HealBot_Options_Skins.lua | 56 ++++-
HealBot_Options_Skins.xml | 447 +++++++++++++---------------------
HealBot_Options_Spells.xml | 18 +-
HealBot_View_Layout.lua | 60 ++++-
HealBot_View_Tooltip.lua | 16 +-
README.md | 4 +
18 files changed, 377 insertions(+), 401 deletions(-)
diff --git a/HealBotBlue.toc b/HealBotBlue.toc
index 4a508a7..2a890a3 100644
--- a/HealBotBlue.toc
+++ b/HealBotBlue.toc
@@ -1,6 +1,6 @@
## Interface: 11200
## Title: HealBotBlue
-## Version: 1.7.4
+## Version: 1.7.5
## Author: Bluewhale
## Notes: Raidframe replacement for healing, decursing, resource tracking and buffing with optional support for SuperWow, ClassicAPI, UnitXP_SP3 and Nampower.
## SavedVariablesPerCharacter: HealBot_Config
diff --git a/HealBot_Action.lua b/HealBot_Action.lua
index 207d7ad..33e8151 100644
--- a/HealBot_Action.lua
+++ b/HealBot_Action.lua
@@ -7,6 +7,7 @@ end
-- HealBot_MayHeal: Checks if unit is eligible for healing UI.
function HealBot_MayHeal(unit)
+ if string.find(unit, "^Test") then return true end
if not UnitName(unit) or not HealBot_Heals[unit] then return false end
if unit ~= 'target' then return true end
if not HealBot_Config.TargetHeals or UnitCanAttack("player",unit) then return false end
@@ -20,6 +21,7 @@ function HealBot_ShouldHeal(unit)
return true;
end
end
+ if string.find(unit, "^Test") then return true end
return HealBot_MayHeal(unit) and UnitHealth(unit)>0 and not UnitIsDeadOrGhost(unit)
and (UnitHealth(unit)
-
-
-
- this:SetBackdropBorderColor(0.4, 0.4, 0.4);
- this:SetBackdropColor(0, 0, 0, 0);
-
-
+
diff --git a/HealBot_Options_CDC.xml b/HealBot_Options_CDC.xml
index 415f393..3c82f4d 100644
--- a/HealBot_Options_CDC.xml
+++ b/HealBot_Options_CDC.xml
@@ -9,7 +9,7 @@
-
+
@@ -45,13 +45,7 @@
-
-
-
- this:SetBackdropBorderColor(0.4, 0.4, 0.4);
- this:SetBackdropColor(0, 0, 0, 0);
-
-
+
@@ -83,9 +77,9 @@
-
+
-
+
@@ -93,9 +87,9 @@
-
+
-
+
@@ -110,9 +104,9 @@
-
+
-
+
@@ -120,9 +114,9 @@
-
+
-
+
@@ -136,13 +130,7 @@
-
-
-
- this:SetBackdropBorderColor(0.4, 0.4, 0.4);
- this:SetBackdropColor(0, 0, 0, 0);
-
-
+
@@ -177,9 +165,9 @@
-
+
-
+
@@ -192,9 +180,9 @@
-
+
-
+
@@ -269,9 +257,9 @@
-
+
-
+
@@ -284,9 +272,9 @@
-
+
-
+
@@ -356,13 +344,7 @@
-
-
-
- this:SetBackdropBorderColor(0.4, 0.4, 0.4);
- this:SetBackdropColor(0, 0, 0, 0);
-
-
+
@@ -394,9 +376,9 @@
-
+
-
+
@@ -409,7 +391,7 @@
-
+
diff --git a/HealBot_Options_General.xml b/HealBot_Options_General.xml
index 0742fed..c4c5ac5 100644
--- a/HealBot_Options_General.xml
+++ b/HealBot_Options_General.xml
@@ -23,7 +23,7 @@
-
+
@@ -36,7 +36,7 @@
-
+
@@ -94,13 +94,7 @@
-
-
-
- this:SetBackdropBorderColor(0.4, 0.4, 0.4);
- this:SetBackdropColor(0, 0, 0, 0);
-
-
+
@@ -178,7 +172,7 @@
-
+
@@ -216,7 +210,7 @@
-
+
@@ -229,7 +223,7 @@
-
+
@@ -242,7 +236,7 @@
-
+
@@ -255,7 +249,7 @@
-
+
diff --git a/HealBot_Options_Healing.xml b/HealBot_Options_Healing.xml
index 18d0a13..53ffd36 100644
--- a/HealBot_Options_Healing.xml
+++ b/HealBot_Options_Healing.xml
@@ -5,13 +5,7 @@
-
-
-
- this:SetBackdropBorderColor(0.4, 0.4, 0.4);
- this:SetBackdropColor(0, 0, 0, 0);
-
-
+
@@ -32,9 +26,9 @@
-
+
-
+
@@ -47,7 +41,7 @@
-
+
@@ -60,7 +54,7 @@
-
+
@@ -86,7 +80,7 @@
-
+
@@ -99,7 +93,7 @@
-
+
@@ -114,9 +108,9 @@
-
+
-
+
@@ -142,9 +136,9 @@
-
+
-
+
@@ -170,9 +164,9 @@
-
+
-
+
@@ -198,9 +192,9 @@
-
+
-
+
@@ -224,13 +218,7 @@
-
-
-
- this:SetBackdropBorderColor(0.4, 0.4, 0.4);
- this:SetBackdropColor(0, 0, 0, 0);
-
-
+
@@ -251,9 +239,9 @@
-
+
-
+
diff --git a/HealBot_Options_Skins.lua b/HealBot_Options_Skins.lua
index 0c81e1d..41bdd18 100644
--- a/HealBot_Options_Skins.lua
+++ b/HealBot_Options_Skins.lua
@@ -8,15 +8,41 @@ function HealBot_Options_BarMaxRowsS_OnValueChanged(this)
HealBot_Action_PartyChanged()
end
--- HealBot_Options_GridOrientation_OnClick: UI handler for OnClick options panel.
-function HealBot_Options_GridOrientation_OnClick(this)
+function HealBot_Options_GridOrientationDD_OnLoad(this)
+ UIDropDownMenu_Initialize(this, HealBot_Options_GridOrientationDD_Initialize);
+ UIDropDownMenu_SetWidth(110, this);
+end
+
+function HealBot_Options_GridOrientationDD_Initialize()
+ local orient = HealBot_Config.GridOrientation and HealBot_Config.GridOrientation[HealBot_Config.Current_Skin] or 1;
+ local info = {};
+ info.text = "Vertical (Columns)";
+ info.func = HealBot_Options_GridOrientationDD_OnClick;
+ info.value = 1;
+ info.checked = (orient == 1);
+ UIDropDownMenu_AddButton(info);
+
+ info = {};
+ info.text = "Horizontal (Rows)";
+ info.func = HealBot_Options_GridOrientationDD_OnClick;
+ info.value = 2;
+ info.checked = (orient == 2);
+ UIDropDownMenu_AddButton(info);
+end
+
+function HealBot_Options_GridOrientationDD_OnClick()
+ UIDropDownMenu_SetSelectedID(HealBot_Options_GridOrientation_Dropdown, this:GetID());
if not HealBot_Config.GridOrientation then HealBot_Config.GridOrientation = {} end
- if this:GetChecked() then
- HealBot_Config.GridOrientation[HealBot_Config.Current_Skin] = 2 -- Horizontal
- else
- HealBot_Config.GridOrientation[HealBot_Config.Current_Skin] = 1 -- Vertical
- end
+ HealBot_Config.GridOrientation[HealBot_Config.Current_Skin] = this.value;
HealBot_Action_PartyChanged()
+
+ if (this.value == 2) then
+ HealBot_Options_BarMaxRowsS:Hide();
+ HealBot_Options_BarNumColsS:Show();
+ else
+ HealBot_Options_BarMaxRowsS:Show();
+ HealBot_Options_BarNumColsS:Hide();
+ end
end
-- HealBot_Options_NewSkin_OnTextChanged: UI handler for OnTextChanged options panel.
@@ -158,3 +184,19 @@ function HealBot_Options_Skins_OnSelect()
HealBot_Options_SetSkins()
end
end
+
+function HealBot_Options_TestBarsButton_OnClick(this)
+ if HealBot_Config.TestBarsOn then
+ HealBot_Config.TestBarsOn = false
+ this:SetText(HEALBOT_OPTIONS_TESTBARS.." OFF")
+ else
+ HealBot_Config.TestBarsOn = true
+ this:SetText(HEALBOT_OPTIONS_TESTBARS.." ON")
+ end
+ HealBot_Action_PartyChanged()
+end
+
+function HealBot_Options_NumTestBars_OnValueChanged(this)
+ HealBot_Config.numTestBars = this:GetValue()
+ if HealBot_Config.TestBarsOn then HealBot_Action_PartyChanged() end
+end
diff --git a/HealBot_Options_Skins.xml b/HealBot_Options_Skins.xml
index a85fb30..bbcb57e 100644
--- a/HealBot_Options_Skins.xml
+++ b/HealBot_Options_Skins.xml
@@ -21,9 +21,9 @@
-
+
-
+
@@ -92,14 +92,41 @@
HealBot_Options_NewSkinb_OnClick(this)
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_TESTBARS,1,40)
+ HealBot_Options_NumTestBars_OnValueChanged(this)
+
+
+
+
@@ -115,326 +142,192 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- HealBot_Options_ShowHeaders_OnLoad(this,HEALBOT_OPTIONS_SHOWHEADERS)
- HealBot_Options_ShowHeaders_OnClick(this)
-
-
-
-
-
- getglobal(this:GetName().."Text"):SetText("Class Colors")
- HealBot_Config.bcolormode[HealBot_Config.Current_Skin] = (this:GetChecked() and 2 or 1); HealBot_Action_ResetSkin()
-
-
-
-
-
- getglobal(this:GetName().."Text"):SetText("Font Outline")
- HealBot_Config.bfontoutline[HealBot_Config.Current_Skin] = (this:GetChecked() and 1 or 0); HealBot_Action_ResetSkin()
-
-
-
-
-
- getglobal(this:GetName().."Text"):SetText("1px Borders")
- HealBot_Config.bborder[HealBot_Config.Current_Skin] = (this:GetChecked() and 1 or 2); HealBot_Action_ResetSkin()
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINTEXTURE,1,14)
- HealBot_Options_BarTextureS_OnValueChanged(this)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINNUMCOLS,1,8)
- HealBot_Options_BarNumColsS_OnValueChanged(this)
-
-
+
-
-
-
-
-
-
-
-
-
-
+
+
HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINHEIGHT,10,100)
HealBot_Options_BarHeightS_OnValueChanged(this)
-
-
-
-
-
-
-
-
-
-
+
+
HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINWIDTH,50,225)
HealBot_Options_BarWidthS_OnValueChanged(this)
-
-
-
-
-
-
-
-
-
-
-
+
+
HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINBRSPACE,0,10)
HealBot_Options_BarBRSpaceS_OnValueChanged(this)
-
-
-
-
-
-
-
-
-
-
+
+
HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINBCSPACE,0,25)
HealBot_Options_BarBCSpaceS_OnValueChanged(this)
-
-
-
-
-
-
-
-
-
-
+
+
HealBot_Options_val_OnLoad(this,"Frame Padding",0,50)
HealBot_Options_FramePaddingS_OnValueChanged(this)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- HealBot_Options_Pct_OnLoad_MinMax(this,HEALBOT_OPTIONS_BARALPHA,0.25,1)
- HealBot_Options_BarAlpha_OnValueChanged(this)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- HealBot_Options_Pct_OnLoad_MinMax(this,HEALBOT_OPTIONS_BARALPHAINHEAL,0.05,0.75)
- HealBot_Options_BarAlphaInHeal_OnValueChanged(this)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- HealBot_Options_Pct_OnLoad(this,HEALBOT_OPTIONS_BARALPHADIS)
- HealBot_Options_BarAlphaDis_OnValueChanged(this)
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- HealBot_Options_val_OnLoad(this,"Abort size",0,15)
- HealBot_Options_AbortBarSize_OnValueChanged(this)
-
-
-
-
-
-
-
-
-
-
-
-
+
+
HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINFHEIGHT,7,18)
HealBot_Options_FontHeight_OnValueChanged(this)
-
-
-
-
-
-
-
-
-
-
+
+
HealBot_Options_val_OnLoad(this,"Icon size",5,30)
HealBot_Options_IconSizeS_OnValueChanged(this)
-
+
+
+
+
+
+ HealBot_Options_ShowHeaders_OnLoad(this,HEALBOT_OPTIONS_SHOWHEADERS)
+ HealBot_Options_ShowHeaders_OnClick(this)
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ HealBot_Options_GridOrientationDD_OnLoad(this)
+
+
+
+
+
+
+
+ HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINNUMCOLS,1,8)
+ local orient = HealBot_Config.GridOrientation and HealBot_Config.GridOrientation[HealBot_Config.Current_Skin] or 1; if (orient == 2) then this:Show() else this:Hide() end
+
+ HealBot_Options_BarNumColsS_OnValueChanged(this)
+
+
+
+
+
+
+
+ HealBot_Options_val_OnLoad(this,"Max Rows",0,40)
+ local orient = HealBot_Config.GridOrientation and HealBot_Config.GridOrientation[HealBot_Config.Current_Skin] or 1; if (orient == 2) then this:Hide() else this:Show() end
+
+ HealBot_Options_BarMaxRowsS_OnValueChanged(this)
+
+
+
+
+
+
+ HealBot_Options_val_OnLoad(this,"Abort size",0,15)
+ HealBot_Options_AbortBarSize_OnValueChanged(this)
+
+
+
+
+
+
+
+ getglobal(this:GetName().."Text"):SetText("Class Colors")
+ HealBot_Config.bcolormode[HealBot_Config.Current_Skin] = (this:GetChecked() and 2 or 1); HealBot_Action_ResetSkin()
+
+
+
+
+
+ getglobal(this:GetName().."Text"):SetText("Font Outline")
+ HealBot_Config.bfontoutline[HealBot_Config.Current_Skin] = (this:GetChecked() and 1 or 0); HealBot_Action_ResetSkin()
+
+
+
+
+
+ getglobal(this:GetName().."Text"):SetText("1px Borders")
+ HealBot_Config.bborder[HealBot_Config.Current_Skin] = (this:GetChecked() and 1 or 2); HealBot_Action_ResetSkin()
+
+
+
+
+
+
+ HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINTEXTURE,1,14)
+ HealBot_Options_BarTextureS_OnValueChanged(this)
+
+
+
+
+
+
+ HealBot_Options_Pct_OnLoad_MinMax(this,HEALBOT_OPTIONS_BARALPHA,0.25,1)
+ HealBot_Options_BarAlpha_OnValueChanged(this)
+
+
+
+
+
+
+ HealBot_Options_Pct_OnLoad_MinMax(this,HEALBOT_OPTIONS_BARALPHAINHEAL,0.05,0.75)
+ HealBot_Options_BarAlphaInHeal_OnValueChanged(this)
+
+
+
+
+
+
+ HealBot_Options_Pct_OnLoad(this,HEALBOT_OPTIONS_BARALPHADIS)
+ HealBot_Options_BarAlphaDis_OnValueChanged(this)
+
+
-
-
-
-
-
-
-
-
-
-
+
+
HealBot_Options_val_OnLoad(this,"Solid Border",1,10)
HealBot_Options_BorderThicknessS_OnValueChanged(this)
-
-
-
-
-
-
-
-
-
-
-
-
- HealBot_Options_val_OnLoad(this,"Max Rows",0,40)
- HealBot_Options_BarMaxRowsS_OnValueChanged(this)
-
-
-
-
-
-
-
-
-
-
-
-
- getglobal(this:GetName().."Text"):SetText("Horizontal Grid");
-
-
- HealBot_Options_GridOrientation_OnClick(this);
-
-
-
-
+