Skip to content

Commit

Permalink
Fix problem with different versions of this lib and NewFeature button…
Browse files Browse the repository at this point in the history
…; github issue ticket #3
  • Loading branch information
hizuro committed Feb 23, 2024
1 parent 7b71288 commit c1ce91d
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions LibDropDownMenu.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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);

Expand Down

0 comments on commit c1ce91d

Please sign in to comment.