Quantcast
WoWInterface - View Single Post - How does SetActionUIButton work?
View Single Post
02-15-19, 05:49 PM   #3
Ethly
A Fallenroot Satyr
Join Date: Mar 2018
Posts: 23
Here's my code and it does not work:
Code:
<CheckButton parent="UIParent">
		<Size x="28" y="28"/>
		<Anchors>
			<Anchor point="BOTTOMLEFT" relativeTo="PlayerFrame" relativePoint="TOPLEFT" x="108" y="-16"/>
		</Anchors>
		<Layers>
			<Layer level="BACKGROUND">
				<Texture parentKey="myicon"/>
			</Layer>
		</Layers>
		<Frames>
			<Cooldown inherits="CooldownFrameTemplate" parentKey="mycooldown"/>
		</Frames>
		<Scripts>
			<OnLoad function="MUShieldSlam_OnLoad"/>
		</Scripts>
	</CheckButton>
Code:
function MUShieldSlam_OnLoad(self)
	local texture = GetActionTexture(2);
	self.myicon:SetTexture(texture);
	SetActionUIButton(self, 2, self.mycooldown);
end
I have shield slam ability on action button 2.
  Reply With Quote