WoWInterface SVN PhanxConfigWidgets

Compare Revisions

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

Rev 176 → Rev 175

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