forked from Shadowed/ShadowedUnitFrames
-
Notifications
You must be signed in to change notification settings - Fork 74
Expand file tree
/
Copy pathShadowedUnitFrames.xml
More file actions
8 lines (8 loc) · 817 Bytes
/
ShadowedUnitFrames.xml
File metadata and controls
8 lines (8 loc) · 817 Bytes
1
2
3
4
5
6
7
8
<Ui xmlns="http://www.blizzard.com/wow/ui/">
<Button name="SUF_SecureUnitTemplate" virtual="true" registerForClicks="AnyUp" inherits="SecureUnitButtonTemplate, SecureHandlerStateTemplate">
<Attributes>
<Attribute name="refreshUnitChange" type="string" value="local unit = self:GetAttribute('unit'); if unit then RegisterStateDriver(self, 'vehicleui', ('[target=%s,unithasvehicleui]vehicle; no'):format(unit)) else UnregisterStateDriver(self, 'vehicleui') end" />
<Attribute name="_onstate-vehicleui" type="string" value="local unit = self:GetAttribute('unit'); if unit and newstate == 'vehicle' and UnitPlayerOrPetInRaid(unit) and not UnitTargetsVehicleInRaidUI(unit) then self:SetAttribute('toggleForVehicle', false) else self:SetAttribute('toggleForVehicle', true) end" />
</Attributes>
</Button>
</Ui>