Files
MetaHunt/api/AutoStrip.xml
T
2026-02-24 23:00:59 +01:00

98 lines
2.5 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/
..\FrameXML\UI.xsd">
<Button name="AutoStripDisplay" parent="UIParent" enableMouse="true" movable="true" inherits="ActionButtonTemplate" frameStrata="DIALOG" hidden="true">
<Size>
<AbsDimension x="22.5" y="22.5"/>
</Size>
<Anchors>
<Anchor point="CENTER">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
<Layers>
<Layer level="OVERLAY">
<Texture name="$parentAutoCastable" file="Interface\Buttons\UI-AutoCastableOverlay">
<Size>
<AbsDimension x="43.5" y="43.5"/>
</Size>
<Anchors>
<Anchor point="CENTER">
<Offset>
<AbsDimension x="0" y="0"/>
</Offset>
</Anchor>
</Anchors>
</Texture>
</Layer>
</Layers>
<Frames>
<Model name="$parentAutoCast" file="Interface\Buttons\UI-AutoCastButton.mdx" scale="0.9" hidden="true" setAllPoints="true">
<Scripts>
<OnLoad>
this:SetSequence(0);
this:SetSequenceTime(0, 0);
</OnLoad>
</Scripts>
</Model>
</Frames>
<Scripts>
<OnLoad>
this:RegisterForDrag("LeftButton");
this:RegisterForClicks("LeftButtonUp", "RightButtonUp");
</OnLoad>
<OnClick>
if arg1 == "LeftButton" then
if not UnitAffectingCombat("player") then
AutoStrip_UnequipAll()
else
AutoStrip_UnequipAll(1)
end
elseif arg1 == "RightButton" then
AutoStrip_SetAutoStripToggle(not AutoStrip_GetEnabled())
end
</OnClick>
<OnEnter>
GameTooltip:SetOwner(this, "ANCHOR_TOPLEFT");
GameTooltip:SetText("AutoStrip", 1, 1, 1)
GameTooltip:AddLine("Left-Click to strip now.")
GameTooltip:AddLine("Right-Click to toggle auto-strip")
GameTooltip:AddLine("Alt-Drag to move")
GameTooltip:Show()
</OnEnter>
<OnLeave>
GameTooltip:Hide()
</OnLeave>
<OnMouseUp>
if ( this.isMoving ) then
this:StopMovingOrSizing()
this.isMoving = false
end
</OnMouseUp>
<OnDragStart>
if IsAltKeyDown() then
this:StartMoving()
this.isMoving = true
end
</OnDragStart>
<OnDragStop>
this:StopMovingOrSizing()
this.isMoving = false
</OnDragStop>
</Scripts>
<NormalTexture name="$parentNormalTexture" file="Interface\Buttons\UI-Quickslot2">
<Size>
<AbsDimension x="40.5" y="40.5"/>
</Size>
<Anchors>
<Anchor point="CENTER">
<Offset>
<AbsDimension x="0" y="-1"/>
</Offset>
</Anchor>
</Anchors>
</NormalTexture>
</Button>
</Ui>