WoWInterface SVN PhanxConfigWidgets

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 175 to Rev 176
    Reverse comparison

Rev 175 → Rev 176

PhanxConfig-Checkbox/PhanxConfig-Checkbox.lua
21,8 → 21,10
local checked = not not self:GetChecked() -- WOD: won't need typecasting
PlaySound(checked and "igMainMenuOptionCheckBoxOn" or "igMainMenuOptionCheckBoxOff")
self:GetScript("OnLeave")(self)
if self.Callback then
self:Callback(checked)
 
local callback = self.Callback or self.OnValueChanged
if callback then
callback(self, checked)
end
end
 
PhanxConfig-ScrollingDropdown/PhanxConfig-ScrollingDropdown.lua
94,8 → 94,9
 
dropdown.valueText:SetText(self:GetText() or self.value)
 
if dropdown.Callback then
dropdown:Callback(self.value)
local callback = dropdown.OnValueChanged or dropdown.Callback
if callback then
callback(dropdown, self.value)
end
 
PlaySound("UChatScrollButton")
224,8 → 225,9
button:Hide()
end
 
if dropdown.ListButtonCallback then
dropdown:ListButtonCallback(button, item, selected)
local callback = dropdown.OnListButtonChanged or dropdown.ListButtonCallback
if callback then
callback(dropdown, button, item, selected)
end
end
 
PhanxConfig-ColorPicker/PhanxConfig-ColorPicker.lua
63,9 → 63,11
self.swatch:SetVertexColor(r, g, b, a)
self.bg:SetAlpha(a)
 
if self.Callback then
 
local callback = self.Callback or self.OnValueChanged
if callback then
-- Ignore updates while ColorPickerFrame:IsShown() if desired.
self:Callback(r, g, b, a)
callback(self, r, g, b, a)
end
end
 
PhanxConfig-EditBox/PhanxConfig-EditBox.lua
61,8 → 61,9
if text:len() == 0 then text = nil end -- experimental
 
local parent = self:GetParent()
if parent.CallbackOnTextChanged and text ~= self.currText then
parent:CallbackOnTextChanged(text)
local callback = parent.CallbackOnTextChanged or parent.OnTextChanged
if callback and text ~= self.currText then
callback(parent, text)
self.currText = text
end
end
73,8 → 74,9
self:ClearFocus()
 
local parent = self:GetParent()
if parent.Callback then
parent:Callback(text)
local callback = parent.Callback or parent.OnValueChanged
if callback then
callback(parent, text)
end
end
 
PhanxConfig-Slider/PhanxConfig-Slider.lua
70,8 → 70,9
 
self:SetValue(value)
 
if parent.Callback then
parent:Callback(value)
local callback = parent.OnValueChanged or parent.Callback
if callback then
callback(parent, value)
end
end