View Single Post
02-16-19, 12:34 PM   #2
Ethly
A Fallenroot Satyr
Join Date: Mar 2018
Posts: 23
I solved it by inheriting from ActionBarButtonTemplate. Unfortunately I couldn't figure out how I could use OnLoad without tainting things, so I did initialization from a completely different frame. It seems to work for now. I'd be thankful if there's simpler way to do so. Here's the code:
Code:
	<CheckButton name="MUShieldSlam" parent="UIParent" inherits="ActionBarButtonTemplate">
		<Size x="28" y="28"/>
		<Anchors>
			<Anchor point="BOTTOMLEFT" relativeTo="PlayerFrame" relativePoint="TOPLEFT" x="75" y="0"/>
		</Anchors>
		<Attributes>
			<Attribute name="action" value="2"/>
		</Attributes>
	</CheckButton>
	
	<Frame>
		<Scripts>
			<OnLoad function="MUEvents_OnLoad"/>
		</Scripts>
	</Frame>
Code:
function MUEvents_OnLoad(self)
	print("MUEvents_OnLoad");
	MUShieldSlam:EnableMouse(false);
	MUShieldSlam:SetNormalTexture(nil);
end

Last edited by Ethly : 02-16-19 at 12:37 PM.
  Reply With Quote