docs: add function-level documentation comments across various source files to improve the readability of codebase

This commit is contained in:
Bluewhale1337
2026-08-24 12:42:23 +02:00
parent d09e49d26a
commit 6d977f6963
24 changed files with 335 additions and 27 deletions
+14
View File
@@ -14,10 +14,12 @@ HealBot_Options_EmergencyFilter_List = {
HEALBOT_OPTIONS_MONITORCUSTOM,
}
-- HealBot_Options_AddDebug: UI handler for AddDebug options panel.
function HealBot_Options_AddDebug(msg)
HealBot_AddDebug("Options: " .. msg);
end
-- HealBot_Options_Pct_OnLoad: UI handler for OnLoad options panel.
function HealBot_Options_Pct_OnLoad(this,text)
this.text = text;
getglobal(this:GetName().."Text"):SetText(text);
@@ -27,6 +29,7 @@ function HealBot_Options_Pct_OnLoad(this,text)
this:SetValueStep(0.01);
end
-- HealBot_Options_Pct_OnLoad_MinMax: UI handler for MinMax options panel.
function HealBot_Options_Pct_OnLoad_MinMax(this,text,Min,Max)
this.text = text;
local MinTxt,MaxTxt
@@ -41,6 +44,7 @@ function HealBot_Options_Pct_OnLoad_MinMax(this,text,Min,Max)
this:SetValueStep(0.01);
end
-- HealBot_Options_val_OnLoad: UI handler for OnLoad options panel.
function HealBot_Options_val_OnLoad(this,text,Min,Max)
this.text = text;
@@ -51,6 +55,7 @@ function HealBot_Options_val_OnLoad(this,text,Min,Max)
this:SetValueStep(1);
end
-- HealBot_Options_Pct_OnValueChanged: UI handler for OnValueChanged options panel.
function HealBot_Options_Pct_OnValueChanged(this)
local pct = math.floor(this:GetValue()*100+0.5);
getglobal(this:GetName().."Text"):SetText(this.text .. " (" .. pct .. "%)");
@@ -106,10 +111,12 @@ end
-- HealBot_Options_CastNotify_OnLoad: UI handler for OnLoad options panel.
function HealBot_Options_CastNotify_OnLoad(this,text)
getglobal(this:GetName().."Text"):SetText(text);
end
-- HealBot_Options_CastNotify_OnClick: UI handler for OnClick options panel.
function HealBot_Options_CastNotify_OnClick(this,id)
-- CastNotify UI elements were removed and replaced by Custom Chat Messages
end
@@ -147,6 +154,7 @@ end
--------------------------------------------------------------------------------
-- HealBot_Returned_Colours: Internal utility: HealBot_Returned_Colours
function HealBot_Returned_Colours()
local A = OpacitySliderFrame:GetValue();
A = ((0-A)+1);
@@ -188,6 +196,7 @@ function HealBot_Returned_Colours()
HealBot_SetSkinColours()
HealBot_SetCDCBarColours()
end
-- HealBot_UseColourPick: Internal utility: HealBot_UseColourPick
function HealBot_UseColourPick(R, G, B, A)
if ColorPickerFrame:IsVisible() then
ColorPickerFrame:Hide();
@@ -208,6 +217,7 @@ function HealBot_UseColourPick(R, G, B, A)
end
return ColorPickerFrame:GetColorRGB();
end
-- HealBot_Options_Defaults_OnClick: UI handler for OnClick options panel.
function HealBot_Options_Defaults_OnClick(this)
HealBot_Options_CastNotify_OnClick(nil,0);
-- HealBot_Config = HealBot_ConfigDefaults;
@@ -219,6 +229,7 @@ function HealBot_Options_Defaults_OnClick(this)
HealBot_Action_Reset();
HealBot_Config.ActionVisible = HealBot_Action:IsVisible();
end
-- HealBot_Options_OnLoad: UI handler for OnLoad options panel.
function HealBot_Options_OnLoad(this)
table.insert(UISpecialFrames,this:GetName());
@@ -228,6 +239,7 @@ function HealBot_Options_OnLoad(this)
PanelTemplates_UpdateTabs(this);
HealBot_Options_ShowPanel(this.selectedTab);
end
-- HealBot_Options_OnShow: UI handler for OnShow options panel.
function HealBot_Options_OnShow(this)
HealBot_Skins = HealBot_Config.Skins;
HealBot_Options_SetSkins()
@@ -295,6 +307,7 @@ function HealBot_Options_OnShow(this)
HealBot_Options_SetChatMessages();
HealBot_Options_ShowPanel(this.selectedTab or 1);
end
-- HealBot_Options_SetSkins: UI handler for SetSkins options panel.
function HealBot_Options_SetSkins()
HealBot_Options_Skins_Refresh()
HealBot_Options_BarAlpha:SetValue(HealBot_Config.Barcola[HealBot_Config.Current_Skin]);
@@ -334,6 +347,7 @@ function HealBot_Options_SetSkins()
HealBot_Options_DeleteSkin:Enable();
end
end
-- HealBot_Options_ShowPanel: UI handler for ShowPanel options panel.
function HealBot_Options_ShowPanel(id)
if HealBot_Options_CurrentPanel>0 then
local panel = getglobal("HealBot_Options_Panel"..HealBot_Options_CurrentPanel);