/trunk/PhanxConfig-Button
function lib.CreateButton( parent, name, desc ) |
local button = CreateFrame( "Button", nil, parent ) |
button:SetWidth( 44 ) |
button:SetHeight( 19 ) |
button:SetNormalFontObject( GameFontNormalSmall ) |
button:SetDisabledFontObject( GameFontDisable ) |
button:SetScript( "OnEnter", OnEnter ) |
button:SetScript( "OnLeave", OnLeave ) |
button:SetText( name ) |
button:SetWidth( math.min( 44, button:GetTextWidth() + 8 ) ) |
button:SetHeight( 22 ) |
button.desc = desc |
return button |