WoWInterface SVN sStats

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk/sStats/libs/AceGUI-3.0-SharedMediaWidgets
    from Rev 7 to Rev 8
    Reverse comparison

Rev 7 → Rev 8

prototypes.lua
3,7 → 3,7
local DataVersion = 9001 -- dev version always overwrites everything else :)
--@end-debug@]===]
--@non-debug@
local DataVersion = 27 or 1
local DataVersion = 32
--@end-non-debug@
local AGSMW = LibStub:NewLibrary("AceGUISharedMediaWidgets-1.0", DataVersion)
 
FontWidget.lua
8,7 → 8,7
 
do
local widgetType = "LSM30_Font"
local widgetVersion = 7
local widgetVersion = 9
 
local contentFrameCache = {}
local function ReturnSelf(self)
91,7 → 91,7
 
local function SetText(self, text) -- Set the text displayed in the box.
self.frame.text:SetText(text or "")
local font = self.list[text] or Media:Fetch('font',text)
local font = self.list[text] ~= text and self.list[text] or Media:Fetch('font',text)
local _, size, outline= self.frame.text:GetFont()
self.frame.text:SetFont(font,size,outline)
end
130,6 → 130,7
self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
AceGUI:ClearFocus()
else
AceGUI:SetFocus(self)
self.dropdown = AGSMW:GetDropDownFrame()
self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT")
for k, v in pairs(self.list) do
139,7 → 140,8
for i, k in ipairs(sortedlist) do
local f = GetContentLine()
local _, size, outline= f.text:GetFont()
f.text:SetFont(self.list[k],size,outline)
local font = self.list[k] ~= k and self.list[k] or Media:Fetch('font',k)
f.text:SetFont(font,size,outline)
f.text:SetText(k)
if k == self.value then
f.check:Show()
147,7 → 149,6
f.obj = self
self.dropdown:AddFrame(f)
end
AceGUI:SetFocus(self)
wipe(sortedlist)
end
end
SoundWidget.lua
8,7 → 8,7
 
do
local widgetType = "LSM30_Sound"
local widgetVersion = 7
local widgetVersion = 9
 
local contentFrameCache = {}
local function ReturnSelf(self)
29,7 → 29,7
local function ContentSpeakerOnClick(this, button)
local self = this.frame.obj
local sound = this.frame.text:GetText()
PlaySoundFile(self.list[sound] or Media:Fetch('sound',sound))
PlaySoundFile(self.list[sound] ~= sound and self.list[sound] or Media:Fetch('sound',sound))
end
 
local function GetContentLine()
155,6 → 155,7
self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
AceGUI:ClearFocus()
else
AceGUI:SetFocus(self)
self.dropdown = AGSMW:GetDropDownFrame()
self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT")
for k, v in pairs(self.list) do
170,7 → 171,6
f.obj = self
self.dropdown:AddFrame(f)
end
AceGUI:SetFocus(self)
wipe(sortedlist)
end
end
199,7 → 199,7
local function WidgetPlaySound(this)
local self = this.obj
local sound = self.frame.text:GetText()
PlaySoundFile(self.list[sound] or Media:Fetch('sound',sound))
PlaySoundFile(self.list[sound] ~= sound and self.list[sound] or Media:Fetch('sound',sound))
end
 
local function Constructor()
StatusbarWidget.lua
8,7 → 8,7
 
do
local widgetType = "LSM30_Statusbar"
local widgetVersion = 7
local widgetVersion = 9
 
local contentFrameCache = {}
local function ReturnSelf(self)
101,7 → 101,7
 
local function SetText(self, text) -- Set the text displayed in the box.
self.frame.text:SetText(text or "")
local statusbar = self.list[k] or Media:Fetch('statusbar',text)
local statusbar = self.list[text] ~= text and self.list[text] or Media:Fetch('statusbar',text)
self.bar:SetTexture(statusbar)
end
 
139,6 → 139,7
self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
AceGUI:ClearFocus()
else
AceGUI:SetFocus(self)
self.dropdown = AGSMW:GetDropDownFrame()
self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT")
for k, v in pairs(self.list) do
153,13 → 154,12
f.check:Show()
end
 
local statusbar = self.list[k] or Media:Fetch('statusbar',k)
local statusbar = self.list[k] ~= k and self.list[k] or Media:Fetch('statusbar',k)
f.bar:SetTexture(statusbar)
f.obj = self
f.dropdown = self.dropdown
self.dropdown:AddFrame(f)
end
AceGUI:SetFocus(self)
wipe(sortedlist)
end
end
203,6 → 203,8
bar:SetPoint("BOTTOMRIGHT", frame,"BOTTOMRIGHT", -21, 5)
self.bar = bar
 
self.alignoffset = 31
 
self.OnRelease = OnRelease
self.OnAcquire = OnAcquire
self.ClearFocus = ClearFocus
BorderWidget.lua
8,7 → 8,7
 
do
local widgetType = "LSM30_Border"
local widgetVersion = 7
local widgetVersion = 9
 
local contentFrameCache = {}
local function ReturnSelf(self)
29,7 → 29,7
local function ContentOnEnter(this, button)
local self = this.obj
local text = this.text:GetText()
local border = self.list[text] or Media:Fetch('border',text)
local border = self.list[text] ~= text and self.list[text] or Media:Fetch('border',text)
this.dropdown:SetBackdrop({edgeFile = border,
bgFile=[[Interface\DialogFrame\UI-DialogBox-Background-Dark]],
tile = true, tileSize = 16, edgeSize = 16,
103,7 → 103,7
 
local function SetText(self, text) -- Set the text displayed in the box.
self.frame.text:SetText(text or "")
local border = self.list[text] or Media:Fetch('border',text)
local border = self.list[text] ~= text and self.list[text] or Media:Fetch('border',text)
 
self.frame.displayButton:SetBackdrop({edgeFile = border,
bgFile=[[Interface\DialogFrame\UI-DialogBox-Background-Dark]],
145,6 → 145,7
self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
AceGUI:ClearFocus()
else
AceGUI:SetFocus(self)
self.dropdown = AGSMW:GetDropDownFrame()
self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT")
for k, v in pairs(self.list) do
162,7 → 163,6
f.dropdown = self.dropdown
self.dropdown:AddFrame(f)
end
AceGUI:SetFocus(self)
wipe(sortedlist)
end
end
BackgroundWidget.lua
8,7 → 8,7
 
do
local widgetType = "LSM30_Background"
local widgetVersion = 7
local widgetVersion = 9
 
local contentFrameCache = {}
local function ReturnSelf(self)
29,7 → 29,7
local function ContentOnEnter(this, button)
local self = this.obj
local text = this.text:GetText()
local background = self.list[text] or Media:Fetch('background',text)
local background = self.list[text] ~= text and self.list[text] or Media:Fetch('background',text)
self.dropdown.bgTex:SetTexture(background)
end
 
104,7 → 104,7
 
local function SetText(self, text) -- Set the text displayed in the box.
self.frame.text:SetText(text or "")
local background = self.list[text] or Media:Fetch('background',text)
local background = self.list[text] ~= text and self.list[text] or Media:Fetch('background',text)
 
self.frame.displayButton:SetBackdrop({bgFile = background,
edgeFile = "Interface/Tooltips/UI-Tooltip-Border",
148,6 → 148,7
self.dropdown = AGSMW:ReturnDropDownFrame(self.dropdown)
AceGUI:ClearFocus()
else
AceGUI:SetFocus(self)
self.dropdown = AGSMW:GetDropDownFrame()
self.dropdown:SetPoint("TOPLEFT", self.frame, "BOTTOMLEFT")
for k, v in pairs(self.list) do
165,7 → 166,6
f.dropdown = self.dropdown
self.dropdown:AddFrame(f)
end
AceGUI:SetFocus(self)
wipe(sortedlist)
end
end