From c1ce91d40931dc18b229f0968cc59526d2f275f4 Mon Sep 17 00:00:00 2001 From: Hizuro Date: Fri, 23 Feb 2024 20:34:30 +0100 Subject: [PATCH] Fix problem with different versions of this lib and NewFeature button; github issue ticket #3 --- LibDropDownMenu.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/LibDropDownMenu.lua b/LibDropDownMenu.lua index 9d24826..a6f1153 100644 --- a/LibDropDownMenu.lua +++ b/LibDropDownMenu.lua @@ -791,6 +791,7 @@ function UIDropDownMenu_AddButton(info, level) _G[listFrameName.."Button"..index.."UnCheck"]:Hide(); end button.checked = info.checked; + Update_DropDownMenuButton(button:GetName()); button.NewFeature:SetShown(button.showNewLabel); -- If has a colorswatch, show it and vertex color it @@ -893,6 +894,7 @@ function UIDropDownMenu_GetButtonWidth(button) width = width + 10; end if (button.showNewLabel) then + Update_DropDownMenuButton(buttonName); width = width + button.NewFeature.Label:GetUnboundedStringWidth(); end if ( button.notCheckable ) then @@ -968,6 +970,7 @@ function UIDropDownMenu_Refresh(frame, useValue, dropdownLevel) end local normalText = _G[button:GetName().."NormalText"]; + Update_DropDownMenuButton(button:GetName()); button.NewFeature:SetShown(button.showNewLabel); button.NewFeature:SetPoint("LEFT", normalText, "RIGHT", 20, 0);