WoWInterface SVN BabySeal

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /trunk
    from Rev 3 to Rev 4
    Reverse comparison

Rev 3 → Rev 4

BabySeal.toc
5,10 → 5,6
## Version: 40000.wowi:revision
## SavedVariables: BabySealDB
 
Libs\LibStub\LibStub.lua
Libs\CallbackHandler-1.0\CallbackHandler-1.0.xml
Libs\LibSharedMedia-3.0\lib.xml
 
BabySeal.lua
Data.lua
Options.lua
\ No newline at end of file
Options.lua
7,8 → 7,6
local addon, BabySeal = ...
local db
 
local LSM = LibStub("LibSharedMedia-3.0")
 
local title, desc = select(2, GetAddOnInfo(addon))
local f = CreateFrame("Frame", nil, InterfaceOptionsFramePanelContainer)
BabySeal.panel = f
64,30 → 62,6
sound.tooltipText = "Sound"
sound.tooltipRequirement = "Toggle to play the RaidWarning sound on warning."
 
local drop = CreateFrame("Button", "BabySealSoundDrop", f, "UIDropDownMenuTemplate")
drop:SetPoint("TOPLEFT", sound, "BOTTOMLEFT", 0, -2)
 
local list = LSM:HashTable("sound")
 
local function initialize(self, level)
local info = UIDropDownMenu_CreateInfo()
for k,v in pairs(LSM:List("sound")) do
info = UIDropDownMenu_CreateInfo()
info.text = k
info.value = k
info.checked = db.soundFile == k and true or false
info.func = function(self)
UIDropDownMenu_SetSelectedValue(drop, self.value)
db.soundFile = self.value
end
UIDropDownMenu_AddButton(info, level)
end
end
UIDropDownMenu_Initialize(drop, initialize)
UIDropDownMenu_SetWidth(drop, 100);
UIDropDownMenu_JustifyText(drop, "LEFT")
UIDropDownMenu_SetText(drop, db.soundFile)
 
self:SetScript("OnShow", nil)
end)
 
BabySeal.lua
8,15 → 8,11
BabySeal.prefix = string.format("|cff00aaff%s|r", addon)
BabySeal.wp = "|cffff0000Warning!|r"
 
local LSM = LibStub("LibSharedMedia-3.0")
LSM:Register("sound", "RaidWarning", "Sound\\Interface\\RaidWarning.ogg")
 
function BabySeal:PLAYER_LOGIN()
BabySealDB = BabySealDB or {
prewarning = true,
raidwarning = false,
sound = false,
soundFile = "RaidWarning",
}
db = BabySealDB
 
69,7 → 65,7
end
 
if db.sound then
PlaySoundFile(LSM:Fetch("sound", db.soundFile))
PlaySound("RaidWarning")
end
end