WoWInterface SVN PhanxConfigWidgets

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk/PhanxConfig-Button
    from Rev 87 to Rev 64
    Reverse comparison

Rev 87 → Rev 64

PhanxConfig-Button.lua
25,14 → 25,6
GameTooltip:Hide()
end
 
local function OnClick( self, button )
PlaySound("gsTitleOptionOK")
local func = self.OnClick
if func then
func( self, button )
end
end
 
function lib.CreateButton( parent, name, desc )
assert( type(parent) == "table" and parent.CreateFontString, "PhanxConfig-Button: Parent is not a valid frame!" )
if type(name) ~= "string" then name = nil end
59,7 → 51,6
 
button:SetScript( "OnEnter", OnEnter )
button:SetScript( "OnLeave", OnLeave )
button:SetScript( "OnClick", OnClick )
 
button:SetText( name )
button:SetWidth( math.min( 44, button:GetTextWidth() + 8 ) )