Skip to content

Commit

Permalink
add hideIfEmptyOrFull toggle
Browse files Browse the repository at this point in the history
  • Loading branch information
Krealle committed Aug 29, 2024
1 parent 073ae7e commit a76aa80
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion Menu/Builder.lua
Original file line number Diff line number Diff line change
Expand Up @@ -840,7 +840,7 @@ function Builder:CreateHealthFormatOptions(parent, widgetName)

---@class HealthFormatOptions: OptionsFrame
local f = CUF:CreateFrame(nil, parent, 1, 1, true, true)
f.optionHeight = 70
f.optionHeight = 100
f.id = "HealthFormatOptions"

f.formatDropdown = self:CreateDropdown(parent, widgetName, "Format", 200,
Expand All @@ -864,6 +864,10 @@ function Builder:CreateHealthFormatOptions(parent, widgetName)
SetEnabled(text == L["Custom"])
end)

f.hideIfEmptyOrFull = self:CreateCheckBox(f, widgetName, L["hideIfEmptyOrFull"],
const.OPTION_KIND.HIDE_IF_EMPTY_OR_FULL)
self:AnchorBelow(f.hideIfEmptyOrFull, f.formatEditBox, 35)

local function LoadPageDB()
SetEnabled(HandleWidgetOption(widgetName, const.OPTION_KIND.FORMAT) == const.HealthTextFormat.CUSTOM)
end
Expand Down

0 comments on commit a76aa80

Please sign in to comment.