WoWInterface SVN DeathSnap

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 8 to Rev 9
    Reverse comparison

Rev 8 → Rev 9

trunk/DeathSnap/DeathSnap.lua
38,14 → 38,14
 
local CHARACTER_MAXLEVEL = 80;
 
DeathSnap = {
DeathSnap = {}
 
Setting = {
Version = GetAddOnMetadata("DeathSnap", "Version");
Revision = tonumber(strsub("$Rev: 1056 $", 7, strlen("$Rev: 1056 $") - 2));
},
}
 
On = {
DeathSnap.On = {
 
Event = function(event)
 
64,17 → 64,31
 
end;
 
},
}
 
Function = {
DeathSnap.Function = {
 
TakeScreenshot = function()
Chronos.schedule(1, TakeScreenshot)
end;
 
SetMinLevel = function(value)
if (value >= DeathSnap.maxControl:GetValue()) then
DeathSnap.maxControl:SetValue(value)
DeathSnap.maxControl:Update()
end
end;
 
SetMaxLevel = function(value)
if (value <= DeathSnap.minControl:GetValue()) then
DeathSnap.minControl:SetValue(value)
DeathSnap.minControl:Update()
end
end;
 
},
}
 
Out = {
DeathSnap.Out = {
 
Print = function(msg)
DEFAULT_CHAT_FRAME:AddMessage(DS_TITLE..": "..msg, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b)
102,9 → 116,9
DeathSnap.Out.Print(DS_VERSION..": "..DeathSnap.Color.Green(version))
end;
 
},
}
 
Color = {
DeathSnap.Color = {
 
Green = function(msg)
return "|cff00cc00"..msg.."|r";
114,8 → 128,6
return "|cffff0000"..msg.."|r";
end;
 
},
 
}
 
if (not DeathSnapFrame) then
126,6 → 138,11
frame:RegisterEvent("PLAYER_DEAD")
end
 
SLASH_DSNAP1 = "/dsnap";
SlashCmdList["DSNAP"] = function()
InterfaceOptionsFrame_OpenToCategory("DeathSnap")
end
 
--[[ Portfolio Registration ]]--
 
local Portfolio = LibStub("Portfolio", true)
157,7 → 174,7
},
{
id = "MinLevel",
text = DS_MINIMUM,
text = DS_MINIMUM.." (%s)",
subText = DS_HELP_MIN,
type = CONTROLTYPE_SLIDER,
minText = "Min",
166,15 → 183,11
minValue = 1,
maxValue = CHARACTER_MAXLEVEL,
valueStep = 1,
callback = function(value)
if (value >= DeathSnap_SavedVars["MaxLevel"]) then
DeathSnap_SavedVars["MaxLevel"] = value
end
end,
callback = DeathSnap.Function.SetMinLevel,
},
{
id = "MaxLevel",
text = DS_MAXIMUM,
text = DS_MAXIMUM.." (%s)",
subText = DS_HELP_MAX,
type = CONTROLTYPE_SLIDER,
minText = "Min",
183,11 → 196,7
minValue = 1,
maxValue = CHARACTER_MAXLEVEL,
valueStep = 1,
callback = function(value)
if (value <= DeathSnap_SavedVars["MinLevel"]) then
DeathSnap_SavedVars["MinLevel"] = value
end
end,
callback = DeathSnap.Function.SetMaxLevel,
point = {"TOPLEFT", "MinLevel", "TOPRIGHT", 80, 0},
},
--[[
204,6 → 213,8
savedVarTable = "DeathSnap_SavedVars",
}
 
Portfolio.RegisterOptionSet(optionTable)
local optionsFrame = Portfolio.RegisterOptionSet(optionTable)
DeathSnap.minControl = optionsFrame:GetControl("MinLevel")
DeathSnap.maxControl = optionsFrame:GetControl("MaxLevel")
 
end
\ No newline at end of file