WoWInterface SVN PhanxConfigWidgets

Compare Revisions

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

Rev 64 → Rev 87

PhanxConfig-Button.lua
25,6 → 25,14
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
51,6 → 59,7
 
button:SetScript( "OnEnter", OnEnter )
button:SetScript( "OnLeave", OnLeave )
button:SetScript( "OnClick", OnClick )
 
button:SetText( name )
button:SetWidth( math.min( 44, button:GetTextWidth() + 8 ) )