/trunk/PhanxConfig-Button
function scripts:OnClick(button) |
PlaySound("gsTitleOptionOK") |
local func = self.func or self.OnClick |
if func then |
func(self, button) |
if self.Callback then |
self:Callback(button) |
end |
end |
local methods = {} |
function methods:GetTooltipText() |
function methods:GetLabel() |
return self:GetText() |
end |
function methods:SetLabel(text) |
self:SetText(text) |
end |
function methods:GetTooltip() |
return self.tooltipText |
end |
function methods:SetTooltipText(text) |
function methods:SetTooltip(text) |
self.tooltipText = text |
end |
function methods:SetFunction(func) |
self.func = func |
end |
------------------------------------------------------------------------ |
function lib:New(parent, name, tooltipText) |