The trouble I am having is with button texture sizes. The button active area seems to be fine, the pushed texture is the right size, its just the normaltexture that is insisting on being large. Like clown shoes size.
I'll add in the button creation code here so someone can show me that I'm being stupid or that yes indeed its broken.
I find it interesting that even if I explicitly set a scale for the button, it ignores me. If I comment out the setwidth/height it remains the same.
Basically, the below checks for the existence of a button. If it exists, just grab its width and height. If it doesn't exist, make one and make its width and height a little smaller (20% smaller) than standard.
Code:
if trap_b[t]==nil then
trap_b[t] = CreateFrame("Button","trapper_button"..t,trapper,"ActionButtonTemplate,SecureActionButtonTemplate")
-- Gather its width and height because the textures are larger than the button as given
-- this way we can set those sizes right and make all the other buttons match the size
W = trap_b[t]:GetWidth()*.8
H = trap_b[t]:GetHeight()*.8
else
W = trap_b[t]:GetWidth()
H = trap_b[t]:GetHeight()
end
-- Set type and spell for each state
trap_b[t]:SetAttribute("type","spell")
trap_b[t]:SetAttribute("spell",trap_n[t])
-- Set the image for the button
trap_b[t]:SetNormalTexture(trap_i[t])
trap_b[t]:SetPushedTexture(trap_i[t])
trap_b[t]:SetWidth(W)
trap_b[t]:SetHeight(H)
trap_b[t]:GetNormalTexture():SetWidth(W)
trap_b[t]:GetNormalTexture():SetHeight(H)
trap_b[t]:GetPushedTexture():SetWidth(W)
trap_b[t]:GetPushedTexture():SetHeight(H)