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