factor: fix UI layout overlaps and anchor constraints in options menu and update changelog
This commit is contained in:
Bluewhale1337
2026-06-24 22:24:47 +02:00
parent dd9cfc301a
commit 03634b37e4
4 changed files with 147 additions and 126 deletions
+62 -56
View File
@@ -1701,62 +1701,68 @@ function HealBot_Options_Buff_Initialize()
func = HealBot_Options_Buff_OnClick,
value = i
}
UIDropDownMenu_AddButton(info)
end
end
end
function HealBot_Options_Buff_OnClick()
local frameName = UIDROPDOWNMENU_OPEN_MENU
local frame = getglobal(frameName)
local myClass = UnitClass("player")
local id = frame:GetID()
if not HealBot_Config.BuffDropDowns then HealBot_Config.BuffDropDowns = {} end
if not HealBot_Config.BuffDropDowns[myClass] then HealBot_Config.BuffDropDowns[myClass] = {} end
HealBot_Config.BuffDropDowns[myClass][id] = this.value
local text = "None"
if this.value > 0 then
text = HealBot_Buff_Spells[myClass][this.value]
end
UIDropDownMenu_SetSelectedID(frame, this.value + 1)
UIDropDownMenu_SetText(text, frame)
end
function HealBot_Options_SetBuffs()
local myClass = UnitClass("player")
if HealBot_Options_BuffWatch then
HealBot_Options_BuffWatch:SetChecked(HealBot_Config.BuffWatch)
HealBot_Options_BuffWatchInCombat:SetChecked(HealBot_Config.BuffWatchInCombat)
if HealBot_Config.BuffWatch == 0 then
HealBot_Options_BuffWatchInCombat:Disable()
else
HealBot_Options_BuffWatchInCombat:Enable()
end
end
if not HealBot_Config.BuffDropDowns then HealBot_Config.BuffDropDowns = {} end
if not HealBot_Config.BuffDropDowns[myClass] then HealBot_Config.BuffDropDowns[myClass] = {} end
for i = 1, 8 do
local dropDown = getglobal("HealBot_Options_Buff" .. i)
if dropDown then
local val = HealBot_Config.BuffDropDowns[myClass][i] or 0
UIDropDownMenu_Initialize(dropDown, HealBot_Options_Buff_Initialize)
UIDropDownMenu_SetSelectedID(dropDown, val + 1)
end
end
end
UIDropDownMenu_AddButton(info)
end
end
end
function HealBot_Options_Buff_OnClick()
local frameName = UIDROPDOWNMENU_OPEN_MENU
local frame = getglobal(frameName)
local myClass = UnitClass("player")
local id = frame:GetID()
if not HealBot_Config.BuffDropDowns then HealBot_Config.BuffDropDowns = {} end
if not HealBot_Config.BuffDropDowns[myClass] then HealBot_Config.BuffDropDowns[myClass] = {} end
HealBot_Config.BuffDropDowns[myClass][id] = this.value
local text = "None"
if this.value > 0 then
text = HealBot_Buff_Spells[myClass][this.value]
end
UIDropDownMenu_SetSelectedID(frame, this.value + 1)
UIDropDownMenu_SetText(text, frame)
end
function HealBot_Options_SetBuffs()
local myClass = UnitClass("player")
if HealBot_Options_BuffWatch then
HealBot_Options_BuffWatch:SetChecked(HealBot_Config.BuffWatch)
HealBot_Options_BuffWatchInCombat:SetChecked(HealBot_Config.BuffWatchInCombat)
if HealBot_Config.BuffWatch == 0 then
HealBot_Options_BuffWatchInCombat:Disable()
else
HealBot_Options_BuffWatchInCombat:Enable()
end
end
if not HealBot_Config.BuffDropDowns then HealBot_Config.BuffDropDowns = {} end
if not HealBot_Config.BuffDropDowns[myClass] then HealBot_Config.BuffDropDowns[myClass] = {} end
for i = 1, 8 do
local dropDown = getglobal("HealBot_Options_Buff" .. i)
if dropDown then
local val = HealBot_Config.BuffDropDowns[myClass][i] or 0
UIDropDownMenu_Initialize(dropDown, HealBot_Options_Buff_Initialize)
UIDropDownMenu_SetSelectedID(dropDown, val + 1)
end
local selfCheck = getglobal("HealBot_Options_BuffSelf" .. i)
if selfCheck then
if HealBot_Config.BuffWatchSelf and HealBot_Config.BuffWatchSelf[i] then
selfCheck:SetChecked(HealBot_Config.BuffWatchSelf[i])
else
selfCheck:SetChecked(0)
end
end
end
end
function HealBot_Options_FramePaddingS_OnValueChanged(this)
if not HealBot_Config.bpadding then HealBot_Config.bpadding = {} end