WoWInterface SVN BabySeal

Compare Revisions

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

Rev 4 → Rev 3

BabySeal.lua
8,11 → 8,15
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
 
65,7 → 69,7
end
 
if db.sound then
PlaySound("RaidWarning")
PlaySoundFile(LSM:Fetch("sound", db.soundFile))
end
end
 
BabySeal.toc
5,6 → 5,10
## 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
Libs Property changes : Added: svn:externals + CallbackHandler-1.0 svn://svn.wowace.com/wow/callbackhandler/mainline/trunk/CallbackHandler-1.0 LibStub svn://svn.wowace.com/wow/libstub/mainline/tags/1.0 LibSharedMedia-3.0 svn://svn.wowace.com/wow/libsharedmedia-3-0/mainline/trunk/LibSharedMedia-3.0
Options.lua
7,6 → 7,8
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
62,6 → 64,30
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)