mirror of
https://codeberg.org/Duvelcorp/MetaHunt.git
synced 2026-10-09 18:10:00 +00:00
zAmmo low-ammo flash + usage tracker; zPet unhappy flash; split parent/child tooltips
This commit is contained in:
@@ -313,6 +313,21 @@ local function MTH_ZB_EnsureButtonOptionDefaults(buttonName)
|
||||
saved["counttotal"] = false
|
||||
end
|
||||
saved["counttotal"] = saved["counttotal"] and true or false
|
||||
if saved["lowflash"] == nil then
|
||||
saved["lowflash"] = true
|
||||
end
|
||||
saved["lowflash"] = saved["lowflash"] and true or false
|
||||
if saved["parenttooltip"] == nil then
|
||||
saved["parenttooltip"] = true
|
||||
end
|
||||
saved["parenttooltip"] = saved["parenttooltip"] and true or false
|
||||
end
|
||||
|
||||
if buttonName == "zButtonPet" then
|
||||
if saved["unhappyflash"] == nil then
|
||||
saved["unhappyflash"] = true
|
||||
end
|
||||
saved["unhappyflash"] = saved["unhappyflash"] and true or false
|
||||
end
|
||||
|
||||
if buttonName == "zButtonTrap" then
|
||||
@@ -478,6 +493,16 @@ local function MTH_SetupButtonOptions(containerName, buttonName, displayName, ma
|
||||
parentBox:Note(containerName.."AQFilterDesc", MTH_ZB_L("ZB_DESC_AQ_FILTER", "Hide Qiraji mounts outside AQ40. Show only Qiraji inside."))
|
||||
end
|
||||
|
||||
if buttonName == "zButtonPet" then
|
||||
parentBox:Checkbox(containerName.."UnhappyFlash", MTH_ZB_L("ZB_LABEL_UNHAPPY_FLASH", "Flash when pet is unhappy"), {
|
||||
checked = saved["unhappyflash"],
|
||||
onClick = function()
|
||||
if not this then return end
|
||||
ZHunterMod_Saved[buttonName]["unhappyflash"] = this:GetChecked() == 1
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
if buttonName == "zButtonAmmo" then
|
||||
parentBox:Checkbox(containerName.."ShowTotalPercent", MTH_ZB_L("ZB_LABEL_SHOW_TOTAL_PERCENT", "Show total % (center)"), {
|
||||
checked = saved["showtotalperc"],
|
||||
@@ -512,6 +537,26 @@ local function MTH_SetupButtonOptions(containerName, buttonName, displayName, ma
|
||||
end
|
||||
end,
|
||||
})
|
||||
parentBox:Checkbox(containerName.."LowFlash", MTH_ZB_L("ZB_LABEL_LOW_AMMO_FLASH", "Flash when low on ammo"), {
|
||||
checked = saved["lowflash"],
|
||||
onClick = function()
|
||||
if not this then return end
|
||||
local checked = this:GetChecked() == 1
|
||||
ZHunterMod_Saved[buttonName]["lowflash"] = checked
|
||||
if buttonObj and buttonObj.ammoname and not buttonObj.isspell then
|
||||
zButtonAmmo_UpdateButton(buttonObj)
|
||||
end
|
||||
end,
|
||||
})
|
||||
parentBox:Checkbox(containerName.."ParentTooltip", MTH_ZB_L("ZB_LABEL_SHOW_PARENT_TOOLTIP", "Show parent tooltip (usage report)"), {
|
||||
checked = saved["parenttooltip"],
|
||||
onClick = function()
|
||||
if not this then return end
|
||||
local checked = this:GetChecked() == 1
|
||||
ZHunterMod_Saved[buttonName]["parenttooltip"] = checked
|
||||
if buttonObj then buttonObj.parentTooltip = checked end
|
||||
end,
|
||||
})
|
||||
end
|
||||
|
||||
local childrenBox = panel:Box("left", containerName.."ChildrenSection", MTH_ZB_L("ZB_SECTION_CHILDREN_BUTTONS", "Children Buttons"))
|
||||
|
||||
Reference in New Issue
Block a user