Chanes: add test mode bars and options for UI testing and layout configuration

This commit is contained in:
Bluewhale1337
2026-10-08 16:16:19 +02:00
parent b298ad7047
commit 8050561733
18 changed files with 377 additions and 401 deletions
+1 -1
View File
@@ -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
+4
View File
@@ -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)<UnitHealthMax(unit)*HealBot_Config.AlertLevel or HealBot_AlwaysHeal());
end
@@ -33,6 +35,7 @@ end
-- HealBot_MustHeal: Internal utility: HealBot_MustHeal
function HealBot_MustHeal(unit)
if string.find(unit, "^Test") then return true end
return HealBot_ShouldHeal(unit) and UnitHealth(unit)<UnitHealthMax(unit)*HealBot_Config.AlertLevel
end
@@ -56,6 +59,7 @@ end
-- HealBot_CanHeal: Internal utility: HealBot_CanHeal
function HealBot_CanHeal(unit)
if string.find(unit, "^Test") then return true end
if UnitIsDeadOrGhost(unit) then
local rezSpell = HealBot_GetRezSpellForClass();
if rezSpell and HealBot_GetHealSpell(unit, rezSpell) then
+3
View File
@@ -6,6 +6,7 @@ local StaticHasBuff = {}
-- HealBot_UnitAffected: Checks if a specific buff/debuff exists on a unit.
function HealBot_UnitAffected(unit, effect)
if string.find(unit, "^Test") then return nil; end
if not effect then return nil; end
local i = 1
while true do
@@ -73,6 +74,7 @@ end
-- HealBot_CheckBuffs: Scans unit for missing tracked buffs.
function HealBot_CheckBuffs(unit)
if string.find(unit, "^Test") then return end
if HealBot_Config.BuffWatch ~= 1 then
HealBot_MissingBuffs[unit] = nil
return
@@ -180,6 +182,7 @@ local HealBot_AuraWarningPlayed = {}
-- HealBot_OnEvent_UnitAura: Updates debuff lists and icon textures on aura change.
function HealBot_OnEvent_UnitAura(this, unit)
if string.find(unit, "^Test") then return end
if not HealBot_DebuffTypeMap then
HealBot_DebuffTypeMap = {
[HEALBOT_DISEASE] = HEALBOT_DISEASE_en,
+1 -1
View File
@@ -33,7 +33,7 @@ function HealBot_Range_Check(unit, range)
return _rangeCache[range][unit]
end
if ( unit == "player" ) then
if ( unit == "player" or string.find(unit, "^Test") ) then
return_val = 1;
elseif HealBot_Integrations_ClassicAPI_Active and UnitDistanceSquared and UnitInLineOfSight then
local inSight = UnitInLineOfSight("player", unit)
+6 -2
View File
@@ -567,10 +567,14 @@ end
-- HealBot_GetHealSpell: Resolves spell rank based on health deficit.
function HealBot_GetHealSpell(unit, pattern)
if (not UnitName(unit)) then return nil end;
if not string.find(unit, "^Test") then
if (not UnitName(unit)) then return nil end;
end
if not pattern then return nil end;
if UnitOnTaxi("player") then return nil end;
if HealBot_Config.ProtectPvP == 1 and UnitIsPVP(unit) and not UnitIsPVP("player") then return nil end
if not string.find(unit, "^Test") then
if HealBot_Config.ProtectPvP == 1 and UnitIsPVP(unit) and not UnitIsPVP("player") then return nil end
end
if HealBot_UnitClass("player") == "DRUID" then
if HealBot_GetShapeshiftForm() and HealBot_Config.AutoUnshift ~= 1 then return nil end;
end
+2
View File
@@ -390,3 +390,5 @@ HEALBOT_WORDS_SEC = "sec";
HEALBOT_WORDS_TO = "to";
HEALBOT_WORDS_CAST = "Cast"
HEALBOT_WORDS_FOR = "for";
HEALBOT_OPTIONS_TESTBARS = "Test Bars";
HEALBOT_WORD_TEST = "Test";
+1 -1
View File
@@ -144,7 +144,7 @@ end
-- Updates base unit info (Name, Class)
function HealBot_Model:UpdateUnitIdentity(unit)
if not self.units[unit] then return false end
if not self.units[unit] or string.find(unit, "^Test") then return false end
local oldName = self.units[unit].name
local oldEnglishClass = self.units[unit].englishClass
+11 -1
View File
@@ -342,7 +342,17 @@ function HealBot_Options_SetSkins()
HealBot_Options_BarWidthS:SetValue(HealBot_Config.bwidth[HealBot_Config.Current_Skin])
HealBot_Options_BarNumColsS:SetValue(HealBot_Config.numcols[HealBot_Config.Current_Skin])
HealBot_Options_BarMaxRowsS:SetValue((HealBot_Config.bmaxrows and HealBot_Config.bmaxrows[HealBot_Config.Current_Skin]) or 0)
HealBot_Options_GridOrientation:SetChecked(((HealBot_Config.GridOrientation and HealBot_Config.GridOrientation[HealBot_Config.Current_Skin]) == 2) and 1 or nil)
local orient = (HealBot_Config.GridOrientation and HealBot_Config.GridOrientation[HealBot_Config.Current_Skin]) or 1
UIDropDownMenu_SetSelectedID(HealBot_Options_GridOrientation_Dropdown, orient)
if orient == 2 then
HealBot_Options_GridOrientation_DropdownText:SetText("Horizontal (Rows)")
HealBot_Options_BarMaxRowsS:Hide()
HealBot_Options_BarNumColsS:Show()
else
HealBot_Options_GridOrientation_DropdownText:SetText("Vertical (Columns)")
HealBot_Options_BarMaxRowsS:Show()
HealBot_Options_BarNumColsS:Hide()
end
HealBot_Options_BarBRSpaceS:SetValue(HealBot_Config.brspace[HealBot_Config.Current_Skin])
HealBot_Options_BarBCSpaceS:SetValue(HealBot_Config.bcspace[HealBot_Config.Current_Skin])
HealBot_Options_FramePaddingS:SetValue((HealBot_Config.bpadding and HealBot_Config.bpadding[HealBot_Config.Current_Skin]) or 10)
+1 -7
View File
@@ -4,13 +4,7 @@
<Script file="HealBot_Options_Buffs.lua" />
<Frame name="HealBot_Options_Panel6" parent="HealBot_Options" hidden="true" setAllPoints="true">
<Frames>
<Frame name="HealBot_Options_BuffFrame" inherits="OptionFrameBoxTemplate">
<Scripts>
<OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4);
this:SetBackdropColor(0, 0, 0, 0);
</OnLoad>
</Scripts>
<Frame name="HealBot_Options_BuffFrame">
<Size>
<AbsDimension y="330"/>
</Size>
+23 -41
View File
@@ -9,7 +9,7 @@
<Anchors>
<Anchor point="TOP">
<Offset>
<AbsDimension x="-20" y="-30" />
<AbsDimension x="40" y="-30" />
</Offset>
</Anchor>
</Anchors>
@@ -45,13 +45,7 @@
</Scripts>
</CheckButton>
<Frame name="HealBot_Options_CureDispelCleanse" inherits="OptionFrameBoxTemplate">
<Scripts>
<OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4);
this:SetBackdropColor(0, 0, 0, 0);
</OnLoad>
</Scripts>
<Frame name="HealBot_Options_CureDispelCleanse">
<Size>
<AbsDimension y="110"/>
</Size>
@@ -83,9 +77,9 @@
</Frame>
<Frame name="HealBot_Options_CDCButLeft" inherits="UIDropDownMenuTemplate" id="1">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_CureDispelCleanse" relativePoint="TOPLEFT">
<Anchor point="TOP" relativeTo="HealBot_Options_CureDispelCleanse" relativePoint="TOP">
<Offset>
<AbsDimension x="150" y="-35" />
<AbsDimension x="40" y="-35" />
</Offset>
</Anchor>
</Anchors>
@@ -93,9 +87,9 @@
<Layer level="OVERLAY">
<FontString inherits="GameFontNormalSmall" text="HEALBOT_OPTIONS_CDCLEFT">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_CureDispelCleanse" relativePoint="TOPLEFT">
<Anchor point="RIGHT" relativeTo="HealBot_Options_CDCButLeft" relativePoint="LEFT">
<Offset>
<AbsDimension x="70" y="-42"/>
<AbsDimension x="-5" y="3"/>
</Offset>
</Anchor>
</Anchors>
@@ -110,9 +104,9 @@
</Frame>
<Frame name="HealBot_Options_CDCButRight" inherits="UIDropDownMenuTemplate" id="1">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_CureDispelCleanse" relativePoint="TOPLEFT">
<Anchor point="TOP" relativeTo="HealBot_Options_CureDispelCleanse" relativePoint="TOP">
<Offset>
<AbsDimension x="150" y="-67" />
<AbsDimension x="40" y="-67" />
</Offset>
</Anchor>
</Anchors>
@@ -120,9 +114,9 @@
<Layer level="OVERLAY">
<FontString inherits="GameFontNormalSmall" text="HEALBOT_OPTIONS_CDCRIGHT">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_CureDispelCleanse" relativePoint="TOPLEFT">
<Anchor point="RIGHT" relativeTo="HealBot_Options_CDCButRight" relativePoint="LEFT">
<Offset>
<AbsDimension x="70" y="-74"/>
<AbsDimension x="-5" y="3"/>
</Offset>
</Anchor>
</Anchors>
@@ -136,13 +130,7 @@
</Scripts>
</Frame>
<Frame name="HealBot_Options_CureDispelCleanseCol" inherits="OptionFrameBoxTemplate">
<Scripts>
<OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4);
this:SetBackdropColor(0, 0, 0, 0);
</OnLoad>
</Scripts>
<Frame name="HealBot_Options_CureDispelCleanseCol">
<Size>
<AbsDimension y="95"/>
</Size>
@@ -177,9 +165,9 @@
<AbsDimension x="130" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_CureDispelCleanseCol" relativePoint="TOPLEFT">
<Anchor point="TOPRIGHT" relativeTo="HealBot_Options_CureDispelCleanseCol" relativePoint="TOP">
<Offset>
<AbsDimension x="70" y="-35"/>
<AbsDimension x="-2" y="-35"/>
</Offset>
</Anchor>
</Anchors>
@@ -192,9 +180,9 @@
<AbsDimension x="130" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_CureDispelCleanseCol" relativePoint="TOPLEFT">
<Anchor point="TOPRIGHT" relativeTo="HealBot_Options_CureDispelCleanseCol" relativePoint="TOP">
<Offset>
<AbsDimension x="70" y="-35"/>
<AbsDimension x="-2" y="-35"/>
</Offset>
</Anchor>
</Anchors>
@@ -269,9 +257,9 @@
<AbsDimension x="130" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_CureDispelCleanseCol" relativePoint="TOPLEFT">
<Anchor point="TOPRIGHT" relativeTo="HealBot_Options_CureDispelCleanseCol" relativePoint="TOP">
<Offset>
<AbsDimension x="70" y="-65"/>
<AbsDimension x="-2" y="-65"/>
</Offset>
</Anchor>
</Anchors>
@@ -284,9 +272,9 @@
<AbsDimension x="130" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_CureDispelCleanseCol" relativePoint="TOPLEFT">
<Anchor point="TOPRIGHT" relativeTo="HealBot_Options_CureDispelCleanseCol" relativePoint="TOP">
<Offset>
<AbsDimension x="70" y="-65"/>
<AbsDimension x="-2" y="-65"/>
</Offset>
</Anchor>
</Anchors>
@@ -356,13 +344,7 @@
<BarColor r="0" g="1" b="0"/>
</StatusBar>
<Frame name="HealBot_Options_CureDispelCleanseWarn" inherits="OptionFrameBoxTemplate">
<Scripts>
<OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4);
this:SetBackdropColor(0, 0, 0, 0);
</OnLoad>
</Scripts>
<Frame name="HealBot_Options_CureDispelCleanseWarn">
<Size>
<AbsDimension y="120"/>
</Size>
@@ -394,9 +376,9 @@
</Frame>
<CheckButton name="HealBot_Options_ShowDebuffWarning" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_CureDispelCleanseWarn" relativePoint="TOPLEFT">
<Anchor point="TOP" relativeTo="HealBot_Options_CureDispelCleanseWarn" relativePoint="TOP">
<Offset>
<AbsDimension x="70" y="-35" />
<AbsDimension x="-90" y="-35" />
</Offset>
</Anchor>
</Anchors>
@@ -409,7 +391,7 @@
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_ShowDebuffWarning" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="5" />
<AbsDimension x="0" y="-5" />
</Offset>
</Anchor>
</Anchors>
+8 -14
View File
@@ -23,7 +23,7 @@
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_ActionLocked" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="5" />
<AbsDimension x="0" y="-5" />
</Offset>
</Anchor>
</Anchors>
@@ -36,7 +36,7 @@
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_GrowUpwards" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="5" />
<AbsDimension x="0" y="-5" />
</Offset>
</Anchor>
</Anchors>
@@ -94,13 +94,7 @@
</Scripts>
</CheckButton>
<Frame name="HealBot_Options_GenFrame" inherits="OptionFrameBoxTemplate">
<Scripts>
<OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4);
this:SetBackdropColor(0, 0, 0, 0);
</OnLoad>
</Scripts>
<Frame name="HealBot_Options_GenFrame">
<Size>
<AbsDimension y="95"/>
</Size>
@@ -178,7 +172,7 @@
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_ShowManaBars" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-2" />
<AbsDimension x="0" y="-5" />
</Offset>
</Anchor>
</Anchors>
@@ -216,7 +210,7 @@
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_HideOptions" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-2" />
<AbsDimension x="0" y="-5" />
</Offset>
</Anchor>
</Anchors>
@@ -229,7 +223,7 @@
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_HideAbort" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-2" />
<AbsDimension x="0" y="-5" />
</Offset>
</Anchor>
</Anchors>
@@ -242,7 +236,7 @@
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_QualityRange" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-2" />
<AbsDimension x="0" y="-5" />
</Offset>
</Anchor>
</Anchors>
@@ -255,7 +249,7 @@
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_ProtectPvP" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-2" />
<AbsDimension x="0" y="-5" />
</Offset>
</Anchor>
</Anchors>
+18 -30
View File
@@ -5,13 +5,7 @@
<Frame name="HealBot_Options_Panel3" parent="HealBot_Options" hidden="true" setAllPoints="true">
<Frames>
<Frame name="HealBot_Options_HealTargetFrame" inherits="OptionFrameBoxTemplate">
<Scripts>
<OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4);
this:SetBackdropColor(0, 0, 0, 0);
</OnLoad>
</Scripts>
<Frame name="HealBot_Options_HealTargetFrame">
<Size>
<AbsDimension y="88"/>
</Size>
@@ -32,9 +26,9 @@
<Layer level="BACKGROUND">
<FontString name="HealBot_HealButtons_Text" text="HEALBOT_OPTIONS_HEAL_BUTTONS" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT">
<Anchor point="TOP">
<Offset>
<AbsDimension x="100" y="-8" />
<AbsDimension x="0" y="-8" />
</Offset>
</Anchor>
</Anchors>
@@ -47,7 +41,7 @@
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="25" y="-21" />
<AbsDimension x="85" y="-21" />
</Offset>
</Anchor>
</Anchors>
@@ -60,7 +54,7 @@
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_GroupHeals" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="5" />
<AbsDimension x="0" y="-5" />
</Offset>
</Anchor>
</Anchors>
@@ -86,7 +80,7 @@
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_GroupHeals" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="122" y="5" />
<AbsDimension x="122" y="-5" />
</Offset>
</Anchor>
</Anchors>
@@ -99,7 +93,7 @@
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_GroupHeals" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="244" y="5" />
<AbsDimension x="244" y="-5" />
</Offset>
</Anchor>
</Anchors>
@@ -114,9 +108,9 @@
<Slider name="HealBot_Options_AlertLevel" inherits="HealBot_Options_SliderTemplate">
<Anchors>
<Anchor point="TOPLEFT">
<Anchor point="TOP">
<Offset>
<AbsDimension x="45" y="-132" />
<AbsDimension x="0" y="-132" />
</Offset>
</Anchor>
</Anchors>
@@ -142,9 +136,9 @@
<Frame name="HealBot_Options_EmergencyFilter" inherits="UIDropDownMenuTemplate" id="1">
<Anchors>
<Anchor point="TOPLEFT">
<Anchor point="TOP">
<Offset>
<AbsDimension x="155" y="-205" />
<AbsDimension x="40" y="-205" />
</Offset>
</Anchor>
</Anchors>
@@ -170,9 +164,9 @@
<Frame name="HealBot_Options_ExtraSort" inherits="UIDropDownMenuTemplate" id="1">
<Anchors>
<Anchor point="TOPLEFT">
<Anchor point="TOP">
<Offset>
<AbsDimension x="155" y="-238" />
<AbsDimension x="40" y="-238" />
</Offset>
</Anchor>
</Anchors>
@@ -198,9 +192,9 @@
<Frame name="HealBot_Options_HealthText" inherits="UIDropDownMenuTemplate" id="1">
<Anchors>
<Anchor point="TOPLEFT">
<Anchor point="TOP">
<Offset>
<AbsDimension x="155" y="-271" />
<AbsDimension x="40" y="-271" />
</Offset>
</Anchor>
</Anchors>
@@ -224,13 +218,7 @@
</Scripts>
</Frame>
<Frame name="HealBot_Options_EmergLFrame" inherits="OptionFrameBoxTemplate">
<Scripts>
<OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4);
this:SetBackdropColor(0, 0, 0, 0);
</OnLoad>
</Scripts>
<Frame name="HealBot_Options_EmergLFrame">
<Size>
<AbsDimension y="125"/>
</Size>
@@ -251,9 +239,9 @@
<Frame name="HealBot_Options_EmergencyFClass" inherits="UIDropDownMenuTemplate" id="1">
<Anchors>
<Anchor point="TOPLEFT">
<Anchor point="TOP">
<Offset>
<AbsDimension x="128" y="-10" />
<AbsDimension x="40" y="-10" />
</Offset>
</Anchor>
</Anchors>
+49 -7
View File
@@ -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
+170 -277
View File
@@ -21,9 +21,9 @@
</Layer>
</Layers>
<Anchors>
<Anchor point="TOPLEFT">
<Anchor point="TOP">
<Offset>
<AbsDimension x="70" y="-28" />
<AbsDimension x="-50" y="-28" />
</Offset>
</Anchor>
</Anchors>
@@ -92,14 +92,41 @@
<OnClick>HealBot_Options_NewSkinb_OnClick(this)</OnClick>
</Scripts>
</Button>
<Frame name="HealBot_Options_Scale" inherits="OptionFrameBoxTemplate">
<Button name="HealBot_Options_TestBarsButton" inherits="UIPanelButtonTemplate" text="HEALBOT_OPTIONS_TESTBARS">
<Size>
<AbsDimension x="100" y="22"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_NewSkinb" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="10" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4);
this:SetBackdropColor(0, 0, 0, 0);
</OnLoad>
<OnClick>HealBot_Options_TestBarsButton_OnClick(this)</OnClick>
</Scripts>
</Button>
<Slider name="HealBot_Options_NumTestBarsS" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="100" y="18" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_TestBarsButton" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="15" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_TESTBARS,1,40)</OnLoad>
<OnValueChanged>HealBot_Options_NumTestBars_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Frame name="HealBot_Options_Scale">
<Size>
<AbsDimension y="325"/>
</Size>
@@ -115,326 +142,192 @@
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="BACKGROUND">
<FontString name="HealBot_Options_ScaleFrameText3" text="HEALBOT_OPTIONS_SKINBARS" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="50" y="-12" />
</Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Frames>
<CheckButton name="HealBot_Options_ShowHeaders" inherits="SendMailRadioButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="155" y="-8" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_ShowHeaders_OnLoad(this,HEALBOT_OPTIONS_SHOWHEADERS)</OnLoad>
<OnClick>HealBot_Options_ShowHeaders_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_BarColorMode" inherits="SendMailRadioButtonTemplate">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="290" y="-8" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>getglobal(this:GetName().."Text"):SetText("Class Colors")</OnLoad>
<OnClick>HealBot_Config.bcolormode[HealBot_Config.Current_Skin] = (this:GetChecked() and 2 or 1); HealBot_Action_ResetSkin()</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_FontOutline" inherits="SendMailRadioButtonTemplate">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="290" y="-33" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>getglobal(this:GetName().."Text"):SetText("Font Outline")</OnLoad>
<OnClick>HealBot_Config.bfontoutline[HealBot_Config.Current_Skin] = (this:GetChecked() and 1 or 0); HealBot_Action_ResetSkin()</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_1pxBorders" inherits="SendMailRadioButtonTemplate">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="290" y="-58" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>getglobal(this:GetName().."Text"):SetText("1px Borders")</OnLoad>
<OnClick>HealBot_Config.bborder[HealBot_Config.Current_Skin] = (this:GetChecked() and 1 or 2); HealBot_Action_ResetSkin()</OnClick>
</Scripts>
</CheckButton>
<Slider name="HealBot_Options_BarTextureS" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="17" />
</Size>
<Anchors>
<Anchor point="TOPLEFT">
<Offset>
<AbsDimension x="20" y="-40" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINTEXTURE,1,14)</OnLoad>
<OnValueChanged>HealBot_Options_BarTextureS_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_BarNumColsS" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="18" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarTextureS" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="10" y="0" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINNUMCOLS,1,8)</OnLoad>
<OnValueChanged>HealBot_Options_BarNumColsS_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<!-- COLUMN 1: Geometry -->
<Slider name="HealBot_Options_BarHeightS" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="18" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarTextureS" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-32" />
</Offset>
</Anchor>
</Anchors>
<Size><AbsDimension x="123" y="18" /></Size>
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="45" y="-15" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINHEIGHT,10,100)</OnLoad>
<OnValueChanged>HealBot_Options_BarHeightS_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_BarWidthS" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="17" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarHeightS" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="10" y="0" />
</Offset>
</Anchor>
</Anchors>
<Size><AbsDimension x="123" y="17" /></Size>
<Anchors><Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarHeightS" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-20" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINWIDTH,50,225)</OnLoad>
<OnValueChanged>HealBot_Options_BarWidthS_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_BarBRSpaceS" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="17" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarHeightS" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-32" />
</Offset>
</Anchor>
</Anchors>
<Size><AbsDimension x="123" y="17" /></Size>
<Anchors><Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarWidthS" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-20" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINBRSPACE,0,10)</OnLoad>
<OnValueChanged>HealBot_Options_BarBRSpaceS_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_BarBCSpaceS" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="17" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarBRSpaceS" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="10" y="0" />
</Offset>
</Anchor>
</Anchors>
<Size><AbsDimension x="123" y="17" /></Size>
<Anchors><Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarBRSpaceS" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-20" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINBCSPACE,0,25)</OnLoad>
<OnValueChanged>HealBot_Options_BarBCSpaceS_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_FramePaddingS" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="17" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarBCSpaceS" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="10" y="0" />
</Offset>
</Anchor>
</Anchors>
<Size><AbsDimension x="123" y="17" /></Size>
<Anchors><Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarBCSpaceS" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-20" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,"Frame Padding",0,50)</OnLoad>
<OnValueChanged>HealBot_Options_FramePaddingS_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_BarAlpha" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="17" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarBRSpaceS" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-35" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_Pct_OnLoad_MinMax(this,HEALBOT_OPTIONS_BARALPHA,0.25,1)</OnLoad>
<OnValueChanged>HealBot_Options_BarAlpha_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_BarAlphaInHeal" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="17" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarAlpha" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="10" y="0" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_Pct_OnLoad_MinMax(this,HEALBOT_OPTIONS_BARALPHAINHEAL,0.05,0.75)</OnLoad>
<OnValueChanged>HealBot_Options_BarAlphaInHeal_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_BarAlphaDis" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="17" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarAlpha" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-35" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_Pct_OnLoad(this,HEALBOT_OPTIONS_BARALPHADIS)</OnLoad>
<OnValueChanged>HealBot_Options_BarAlphaDis_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_AbortBarSize" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="17" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarAlphaDis" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="10" y="0" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,"Abort size",0,15)</OnLoad>
<OnValueChanged>HealBot_Options_AbortBarSize_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_FontHeight" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="17" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarAlphaDis" relativePoint="TOPLEFT">
<Offset>
<AbsDimension x="0" y="-35" />
</Offset>
</Anchor>
</Anchors>
<Size><AbsDimension x="123" y="17" /></Size>
<Anchors><Anchor point="TOPLEFT" relativeTo="HealBot_Options_FramePaddingS" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-20" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINFHEIGHT,7,18)</OnLoad>
<OnValueChanged>HealBot_Options_FontHeight_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_IconSizeS" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="17" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_FontHeight" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="10" y="0" />
</Offset>
</Anchor>
</Anchors>
<Size><AbsDimension x="123" y="17" /></Size>
<Anchors><Anchor point="TOPLEFT" relativeTo="HealBot_Options_FontHeight" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-20" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,"Icon size",5,30)</OnLoad>
<OnValueChanged>HealBot_Options_IconSizeS_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<!-- COLUMN 2: Grid & Layout -->
<CheckButton name="HealBot_Options_ShowHeaders" inherits="SendMailRadioButtonTemplate">
<Anchors><Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarMaxRowsS" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-5" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>HealBot_Options_ShowHeaders_OnLoad(this,HEALBOT_OPTIONS_SHOWHEADERS)</OnLoad>
<OnClick>HealBot_Options_ShowHeaders_OnClick(this)</OnClick>
</Scripts>
</CheckButton>
<Frame name="HealBot_Options_GridOrientation_Dropdown" inherits="UIDropDownMenuTemplate" id="1">
<Anchors><Anchor point="TOPLEFT" relativeTo="HealBot_Options_ShowHeaders" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="-15" y="-20" /></Offset></Anchor></Anchors>
<Layers>
<Layer level="OVERLAY">
<FontString inherits="GameFontNormalSmall" text="Grid Layout">
<Anchors>
<Anchor point="BOTTOM" relativePoint="TOP">
<Offset><AbsDimension x="15" y="0"/></Offset>
</Anchor>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad>HealBot_Options_GridOrientationDD_OnLoad(this)</OnLoad>
</Scripts>
</Frame>
<Slider name="HealBot_Options_BarNumColsS" inherits="HealBot_Options_SliderTemplate">
<Size><AbsDimension x="123" y="18" /></Size>
<Anchors><Anchor point="TOPLEFT" relativeTo="HealBot_Options_GridOrientation_Dropdown" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="15" y="-15" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>
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
</OnLoad>
<OnValueChanged>HealBot_Options_BarNumColsS_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_BarMaxRowsS" inherits="HealBot_Options_SliderTemplate">
<Size><AbsDimension x="123" y="17" /></Size>
<Anchors><Anchor point="TOPLEFT" relativeTo="HealBot_Options_GridOrientation_Dropdown" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="15" y="-15" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>
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
</OnLoad>
<OnValueChanged>HealBot_Options_BarMaxRowsS_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_AbortBarSize" inherits="HealBot_Options_SliderTemplate">
<Size><AbsDimension x="123" y="17" /></Size>
<Anchors><Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarMaxRowsS" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-20" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,"Abort size",0,15)</OnLoad>
<OnValueChanged>HealBot_Options_AbortBarSize_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<!-- COLUMN 3: Visuals & Opacity -->
<CheckButton name="HealBot_Options_BarColorMode" inherits="SendMailRadioButtonTemplate">
<Anchors><Anchor point="TOPLEFT"><Offset><AbsDimension x="335" y="-5" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>getglobal(this:GetName().."Text"):SetText("Class Colors")</OnLoad>
<OnClick>HealBot_Config.bcolormode[HealBot_Config.Current_Skin] = (this:GetChecked() and 2 or 1); HealBot_Action_ResetSkin()</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_FontOutline" inherits="SendMailRadioButtonTemplate">
<Anchors><Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarColorMode" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-5" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>getglobal(this:GetName().."Text"):SetText("Font Outline")</OnLoad>
<OnClick>HealBot_Config.bfontoutline[HealBot_Config.Current_Skin] = (this:GetChecked() and 1 or 0); HealBot_Action_ResetSkin()</OnClick>
</Scripts>
</CheckButton>
<CheckButton name="HealBot_Options_1pxBorders" inherits="SendMailRadioButtonTemplate">
<Anchors><Anchor point="TOPLEFT" relativeTo="HealBot_Options_FontOutline" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-5" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>getglobal(this:GetName().."Text"):SetText("1px Borders")</OnLoad>
<OnClick>HealBot_Config.bborder[HealBot_Config.Current_Skin] = (this:GetChecked() and 1 or 2); HealBot_Action_ResetSkin()</OnClick>
</Scripts>
</CheckButton>
<Slider name="HealBot_Options_BarTextureS" inherits="HealBot_Options_SliderTemplate">
<Size><AbsDimension x="123" y="17" /></Size>
<Anchors><Anchor point="TOPLEFT" relativeTo="HealBot_Options_1pxBorders" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-15" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,HEALBOT_OPTIONS_SKINTEXTURE,1,14)</OnLoad>
<OnValueChanged>HealBot_Options_BarTextureS_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_BarAlpha" inherits="HealBot_Options_SliderTemplate">
<Size><AbsDimension x="123" y="17" /></Size>
<Anchors><Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarTextureS" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-20" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>HealBot_Options_Pct_OnLoad_MinMax(this,HEALBOT_OPTIONS_BARALPHA,0.25,1)</OnLoad>
<OnValueChanged>HealBot_Options_BarAlpha_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_BarAlphaInHeal" inherits="HealBot_Options_SliderTemplate">
<Size><AbsDimension x="123" y="17" /></Size>
<Anchors><Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarAlpha" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-20" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>HealBot_Options_Pct_OnLoad_MinMax(this,HEALBOT_OPTIONS_BARALPHAINHEAL,0.05,0.75)</OnLoad>
<OnValueChanged>HealBot_Options_BarAlphaInHeal_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_BarAlphaDis" inherits="HealBot_Options_SliderTemplate">
<Size><AbsDimension x="123" y="17" /></Size>
<Anchors><Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarAlphaInHeal" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-20" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>HealBot_Options_Pct_OnLoad(this,HEALBOT_OPTIONS_BARALPHADIS)</OnLoad>
<OnValueChanged>HealBot_Options_BarAlphaDis_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_BorderThicknessS" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="17" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarAlphaInHeal" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="10" y="0" />
</Offset>
</Anchor>
</Anchors>
<Size><AbsDimension x="123" y="17" /></Size>
<Anchors><Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarAlphaDis" relativePoint="BOTTOMLEFT"><Offset><AbsDimension x="0" y="-20" /></Offset></Anchor></Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,"Solid Border",1,10)</OnLoad>
<OnValueChanged>HealBot_Options_BorderThicknessS_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<Slider name="HealBot_Options_BarMaxRowsS" inherits="HealBot_Options_SliderTemplate">
<Size>
<AbsDimension x="123" y="17" />
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_AbortBarSize" relativePoint="TOPRIGHT">
<Offset>
<AbsDimension x="10" y="0" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>HealBot_Options_val_OnLoad(this,"Max Rows",0,40)</OnLoad>
<OnValueChanged>HealBot_Options_BarMaxRowsS_OnValueChanged(this)</OnValueChanged>
</Scripts>
</Slider>
<CheckButton name="HealBot_Options_GridOrientation" inherits="OptionsCheckButtonTemplate">
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_BarMaxRowsS" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="-5" y="-10" />
</Offset>
</Anchor>
</Anchors>
<Scripts>
<OnLoad>
getglobal(this:GetName().."Text"):SetText("Horizontal Grid");
</OnLoad>
<OnClick>
HealBot_Options_GridOrientation_OnClick(this);
</OnClick>
</Scripts>
</CheckButton>
<Button name="HealBot_EnTextColorpickb">
<Size>
<AbsDimension x="87" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_FontHeight" relativePoint="BOTTOMLEFT">
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_IconSizeS" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-15"/>
<AbsDimension x="58" y="-15"/>
</Offset>
</Anchor>
</Anchors>
@@ -447,9 +340,9 @@
<AbsDimension x="87" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_FontHeight" relativePoint="BOTTOMLEFT">
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_IconSizeS" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-15"/>
<AbsDimension x="58" y="-15"/>
</Offset>
</Anchor>
</Anchors>
@@ -477,9 +370,9 @@
<AbsDimension x="87" y="20"/>
</Size>
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_FontHeight" relativePoint="BOTTOMLEFT">
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_IconSizeS" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="0" y="-15"/>
<AbsDimension x="58" y="-15"/>
</Offset>
</Anchor>
</Anchors>
+6 -12
View File
@@ -4,7 +4,7 @@
<Script file="HealBot_Options_Spells.lua" />
<Frame name="HealBot_Options_Panel2" parent="HealBot_Options" hidden="true" setAllPoints="true">
<Frames>
<Frame name="HealBot_Options_KeysFrame" inherits="OptionFrameBoxTemplate">
<Frame name="HealBot_Options_KeysFrame">
<Size>
<AbsDimension y="268"/>
</Size>
@@ -24,9 +24,9 @@
<Layer level="BACKGROUND">
<FontString name="HealBot_ComboButtons_ButtonText1" text="HEALBOT_OPTIONS_USEBUTTONS" inherits="GameFontNormalSmall">
<Anchors>
<Anchor point="TOPLEFT">
<Anchor point="TOP">
<Offset>
<AbsDimension x="110" y="-10" />
<AbsDimension x="0" y="-10" />
</Offset>
</Anchor>
</Anchors>
@@ -50,7 +50,7 @@
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_Dummy" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="-5" y="-25" />
<AbsDimension x="0" y="-25" />
</Offset>
</Anchor>
</Anchors>
@@ -132,7 +132,7 @@
<Anchors>
<Anchor point="TOPLEFT" relativeTo="HealBot_Options_Dummy" relativePoint="BOTTOMLEFT">
<Offset>
<AbsDimension x="-5" y="-68"/>
<AbsDimension x="0" y="-68"/>
</Offset>
</Anchor>
</Anchors>
@@ -212,13 +212,7 @@
</Frames>
</Frame>
<Frame name="HealBot_Options_TooltipsPanel" inherits="OptionFrameBoxTemplate">
<Scripts>
<OnLoad>
this:SetBackdropBorderColor(0.4, 0.4, 0.4);
this:SetBackdropColor(0, 0, 0, 0);
</OnLoad>
</Scripts>
<Frame name="HealBot_Options_TooltipsPanel">
<Size>
<AbsDimension y="118"/>
</Size>
+57 -3
View File
@@ -41,7 +41,12 @@ function HealBot_HealthColor(unit, hlth, maxhlth)
return dr, dg, db, HealBot_Config.Barcola[HealBot_Config.Current_Skin];
end
local text = UnitName(unit);
local text
if string.find(unit, "^Test") then
text = HealBot_Model.units[unit] and HealBot_Model.units[unit].name or unit
else
text = UnitName(unit) or unit
end
if not HealBot_HealsIn[text] then
HealBot_HealsIn[text] = 0;
end
@@ -284,7 +289,10 @@ function HealBot_Action_EnableButton(button)
local raidIcon = getglobal(button:GetName() .. "BarRaidIcon")
if raidIcon then
local index = GetRaidTargetIndex(unit)
local index
if not string.find(unit, "^Test") then
index = GetRaidTargetIndex(unit)
end
if index then
SetRaidTargetIconTexture(raidIcon, index)
raidIcon:Show()
@@ -539,7 +547,52 @@ function HealBot_Action_PartyChanged()
local i = 0;
local last = 0;
local GroupValid = numBars;
last = last + 6
if HealBot_Config.TestBarsOn then
local testBars = HealBot_Config.numTestBars or 25
if HealBot_Config.ShowHeader[HealBot_Config.Current_Skin] == 1 then
HeaderPos[i + 1] = HEALBOT_OPTIONS_TESTBARS or "Test Bars"
end
local testClasses = {"PRIEST", "DRUID", "SHAMAN", "PALADIN", "WARRIOR", "MAGE", "WARLOCK", "HUNTER", "ROGUE"}
local testNames = {"Arthas", "Illidan", "Sylvanas", "Thrall", "Jaina", "Uther", "Grommash", "Malfurion", "Tyrande", "Guldan", "Kael", "Rexxar", "Varian", "Voljin", "Baine"}
for j = 1, testBars do
i = i + 1
local unit = "Test" .. j
HealBot_Action_SetHealButton(i, unit)
if not HealBot_Model.units[unit] then
local rClass = testClasses[math.random(1, #testClasses)]
local rName = testNames[math.random(1, #testNames)] .. j
local mHealth = math.random(4000, 8000)
local cHealth = math.random(1, mHealth)
local pt = 0
if rClass == "WARRIOR" then pt = 1 elseif rClass == "ROGUE" then pt = 3 end
HealBot_Model.units[unit] = { name = rName, guid = "TestGuid"..j, class = rClass, englishClass = rClass, health = cHealth, maxHealth = mHealth, mana = 2000, maxMana = 4000, powerType = pt, incomingHeal = 0, hasAggro = false, range = 1 }
if not HealBot_UnitIcons then HealBot_UnitIcons = {} end
HealBot_UnitIcons[unit] = {}
local testIcons = {
"Interface\\Icons\\Spell_Holy_Renew",
"Interface\\Icons\\Spell_Nature_Rejuvenation",
"Interface\\Icons\\Spell_Nature_ResistNature", -- Regrowth
"Interface\\Icons\\Spell_Holy_PowerWordShield",
"Interface\\Icons\\Spell_Holy_Excorcism" -- Fear Ward
}
-- Shuffle icons
for k = #testIcons, 2, -1 do
local j = math.random(k)
testIcons[k], testIcons[j] = testIcons[j], testIcons[k]
end
local numIcons = math.random(0, 3)
for k = 1, numIcons do
HealBot_UnitIcons[unit][k] = testIcons[k]
end
end
numBars = numBars + 1
end
if HealBot_Config.ShowHeader[HealBot_Config.Current_Skin] == 1 then
numBars = numBars + 1
numHeaders = numHeaders + 1
end
else
last = last + 6
if HealBot_Config.GroupHeals == 1 then
if HealBot_Config.ShowHeader[HealBot_Config.Current_Skin] == 1 then
HeaderPos[i + 1] = HEALBOT_OPTIONS_GROUPHEALS
@@ -892,6 +945,7 @@ function HealBot_Action_PartyChanged()
numBars = numBars - 1;
numHeaders = numHeaders - 1;
end
end
local bpadding = (HealBot_Config.bpadding and HealBot_Config.bpadding[HealBot_Config.Current_Skin]) or 10
local OffsetY = bpadding;
+12 -4
View File
@@ -20,8 +20,15 @@ function HealBot_Action_RefreshTooltip(unit)
if not unit then unit = HealBot_Action_TooltipUnit end
if not unit then return end;
local hlth=UnitHealth(unit);
local maxhlth=UnitHealthMax(unit);
local hlth=0;
local maxhlth=100;
if string.find(unit, "^Test") then
hlth = HealBot_Model.units[unit] and HealBot_Model.units[unit].health or 5000;
maxhlth = HealBot_Model.units[unit] and HealBot_Model.units[unit].maxHealth or 10000;
else
hlth=UnitHealth(unit);
maxhlth=UnitHealthMax(unit);
end
local spellLeft = HealBot_GetHealSpell(unit,HealBot_Action_SpellPattern("Left"));
local spellMiddle = HealBot_GetHealSpell(unit,HealBot_Action_SpellPattern("Middle"));
@@ -33,8 +40,9 @@ function HealBot_Action_RefreshTooltip(unit)
HealBot_Action_Tooltip_ClearLines();
if HealBot_Config.Tooltip_ShowTarget==1 then
if UnitName(unit) then
HealBot_Action_Tooltip_SetLineLeft(UnitName(unit),0,1,0,linenum)
local uname = HealBot_Model.units[unit] and HealBot_Model.units[unit].name or UnitName(unit)
if uname then
HealBot_Action_Tooltip_SetLineLeft(uname,0,1,0,linenum)
if hlth and maxhlth then
local r,g,b,a=HealBot_HealthColor(unit,hlth,maxhlth);
HealBot_Action_Tooltip_SetLineRight(hlth.."/"..maxhlth.." (-"..maxhlth-hlth..")",r,g,b,linenum)
+4
View File
@@ -50,6 +50,10 @@ Default installation path: `C:\Program Files\World of Warcraft\Interface\AddOns\
### Change Log
**v1.7.5**
* **Feature - Test Bars** - Implemented a "Test Bars" button and slider in the Skins options tab, allowing you to spawn and adjust a dummy raid group of up to 40 members without being in a real raid. This allows for easy layout and appearance customization out of combat.
* **UI - Cleanup** - While adding new funcionalities I ignored how menus look, just adding things for each tab where there was free space, so now I tried to clean up this convoluted mess I made. Menu Tabs are now aligned and grouped in a manner that makes more sense.
**v1.7.4**
* **Performance Fix - CPU Spikes** - Fixed massive FPS drops during raid combat. The `HealBot_CheckBuffs` function previously forced the client to generate hidden UI tooltips for up to 32 buffs per player on every single `UNIT_AURA` event. Tooltip parsing is now cached per texture, bypassing thousands of redundant API calls per second.
* **Performance Fix - Frame Rendering** - Eliminated redundant UI layout recalculations in `HealBot_Action_EnableButton`. The UI no longer forces `SetFont`, `SetWidth`, `SetHeight`, and `GetGlobal` lookups on every single combat tick (which previously caused 4,000+ layout updates per second in 40-man raids).