Show pfUI's dropdowns and menus with ClassicAPI's menu system

pfUIDropdownTemplate (a DropdownButton) replaces CreateDropDownButton in
the config GUI, addon profiles, the trigger editor and the icon picker
filter. The equipment set gear menu and the tracking menu open
MenuUtil context menus. pfUIMenuStyleMixin draws pfUI's backdrop behind
them, and the skin module makes it the default style and draws the
checkboxes and radios as pfUI boxes.
This commit is contained in:
Brues
2026-10-30 19:33:40 -05:00
parent f37ea00226
commit af9edb215d
7 changed files with 292 additions and 444 deletions
+48
View File
@@ -102,4 +102,52 @@
<OnLoad method="InitScrollBar" inherit="prepend"/>
</Scripts>
</Frame>
<!--
A ClassicAPI dropdown in pfUI's style: the selection as right-aligned text
and pfUI's arrow box at the right. Its menu takes pfUIMenuStyleMixin. Fill it
with dropdown:SetupMenu(function(dropdown, rootDescription) ... end), and call
dropdown:GenerateMenu() when the data behind the selection changes.
-->
<DropdownButton name="pfUIDropdownTemplate" mixin="pfUIDropdownMixin" virtual="true">
<Size y="20"/>
<KeyValues>
<KeyValue key="menuMixin" value="pfUIMenuStyleMixin" type="global"/>
<KeyValue key="menuPointY" value="-2" type="number"/>
</KeyValues>
<Frames>
<Frame parentKey="Arrow">
<Size x="16" y="16"/>
<Anchors>
<Anchor point="RIGHT" x="-2"/>
</Anchors>
<Layers>
<Layer level="ARTWORK">
<Texture parentKey="Icon">
<Anchors>
<Anchor point="TOPLEFT" x="3" y="-3"/>
<Anchor point="BOTTOMRIGHT" x="-3" y="3"/>
</Anchors>
</Texture>
</Layer>
</Layers>
</Frame>
</Frames>
<Layers>
<Layer level="OVERLAY">
<FontString parentKey="Text" inherits="GameFontWhite" wordwrap="false" justifyH="RIGHT">
<Anchors>
<Anchor point="LEFT" x="2"/>
<Anchor point="RIGHT" relativeKey="$parent.Arrow" relativePoint="LEFT" x="-4"/>
</Anchors>
</FontString>
</Layer>
</Layers>
<Scripts>
<OnLoad method="OnLoad"/>
<OnShow method="OnShow"/>
<OnEnter method="OnEnter"/>
<OnLeave method="OnLeave"/>
</Scripts>
</DropdownButton>
</Ui>