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 0c72da6 commit 3d8547d
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 @@ -893,7 +893,7 @@ function Builder:CreatePowerFormatOptions(parent, widgetName)

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

f.formatDropdown = self:CreateDropdown(parent, widgetName, "Format", 200,
Expand All @@ -917,6 +917,10 @@ function Builder:CreatePowerFormatOptions(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.PowerTextFormat.CUSTOM)
end
Expand Down

0 comments on commit 3d8547d

Please sign in to comment.