WoWInterface SVN DeathSnap

Compare Revisions

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

Rev 9 → Rev 8

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