Files
Guda-ClassicAPI/UI/ItemButton.xml
T
2025-12-23 03:56:36 +04:00

61 lines
2.4 KiB
XML

<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/">
<!-- Item Button Template (inherit Blizzard container item button for classic behavior/skins) -->
<Button name="Guda_ItemButtonTemplate" virtual="true" inherits="ContainerFrameItemButtonTemplate">
<Size>
<AbsDimension x="37" y="37"/>
</Size>
<Layers>
<!-- Empty slot background texture (classic bag pattern) -->
<Layer level="BACKGROUND">
<Texture name="$parent_EmptySlotBg" file="Interface\Buttons\UI-EmptySlot" hidden="false">
<Anchors>
<Anchor point="TOPLEFT"/>
<Anchor point="BOTTOMRIGHT"/>
</Anchors>
</Texture>
</Layer>
<!-- Custom item count (this intentionally co-exists with Blizzard's $parentCount in rollback state) -->
<Layer level="OVERLAY">
<FontString name="$parent_Count" inherits="NumberFontNormal" justifyH="RIGHT">
<Anchors>
<Anchor point="BOTTOMRIGHT">
<Offset>
<AbsDimension x="-8" y="8"/>
</Offset>
</Anchor>
</Anchors>
</FontString>
<Texture name="$parent_Check" file="Interface\Buttons\UI-CheckBox-Check" hidden="true">
<Size>
<AbsDimension x="24" y="24"/>
</Size>
<Anchors>
<Anchor point="CENTER"/>
</Anchors>
</Texture>
</Layer>
</Layers>
<Scripts>
<OnLoad>
-- Our visual setup
Guda_ItemButton_OnLoad(this)
-- Ensure Blizzard default container item button behavior is active
if ContainerFrameItemButton_OnLoad then
ContainerFrameItemButton_OnLoad()
end
</OnLoad>
<OnEnter>
Guda_ItemButton_OnEnter(this)
</OnEnter>
<OnLeave>
Guda_ItemButton_OnLeave(this)
</OnLeave>
</Scripts>
</Button>
</Ui>