WoWInterface SVN LevelSnap

Compare Revisions

  • This comparison shows the changes necessary to convert path
    /
    from Rev 13 to Rev 14
    Reverse comparison

Rev 13 → Rev 14

trunk/LevelSnap/LevelSnap.lua
49,14 → 49,14
 
local CHARACTER_MAXLEVEL = 80;
 
LevelSnap = {
LevelSnap = {}
 
Setting = {
LevelSnap.Setting = {
Version = GetAddOnMetadata("LevelSnap", "Version");
Revision = tonumber(strsub("$Rev$", 7, strlen("$Rev$") - 2));
},
}
 
On = {
LevelSnap.On = {
 
Event = function(event)
 
75,17 → 75,31
 
end;
 
},
}
 
Function = {
LevelSnap.Function = {
 
TakeScreenshot = function()
Chronos.schedule(1, TakeScreenshot)
end;
 
},
SetMinLevel = function(value)
if (value >= LevelSnap.maxControl:GetValue()) then
LevelSnap.maxControl:SetValue(value)
LevelSnap.maxControl:Update()
end
end;
 
SetMaxLevel = function(value)
if (value <= LevelSnap.minControl:GetValue()) then
LevelSnap.minControl:SetValue(value)
LevelSnap.minControl:Update()
end
end;
 
}
 
Out = {
LevelSnap.Out = {
 
Print = function(msg)
DEFAULT_CHAT_FRAME:AddMessage(LS_TITLE..": "..msg, NORMAL_FONT_COLOR.r, NORMAL_FONT_COLOR.g, NORMAL_FONT_COLOR.b)
114,9 → 128,9
LevelSnap.Out.Print(LS_VERSION..": "..LevelSnap.Color.Green(version))
end;
 
},
}
 
Color = {
LevelSnap.Color = {
 
Green = function(msg)
return "|cff00cc00"..msg.."|r";
126,8 → 140,6
return "|cffff0000"..msg.."|r";
end;
 
},
 
}
 
if (not LevelSnapFrame) then
137,6 → 149,11
frame:RegisterEvent("PLAYER_LEVEL_UP")
end
 
SLASH_LSNAP1 = "/lsnap";
SlashCmdList["LSNAP"] = function()
InterfaceOptionsFrame_OpenToCategory("LevelSnap")
end
 
--[[ Portfolio Registration ]]--
 
local Portfolio = LibStub("Portfolio", true)
168,7 → 185,7
},
{
id = "MinLevel",
text = LS_MINIMUM,
text = LS_MINIMUM.." (%s)",
subText = LS_HELP_MIN,
type = CONTROLTYPE_SLIDER,
minText = "Min",
177,15 → 194,11
minValue = 1,
maxValue = CHARACTER_MAXLEVEL,
valueStep = 1,
callback = function(value)
if (value >= LevelSnap_SavedVars["MaxLevel"]) then
LevelSnap_SavedVars["MaxLevel"] = value
end
end,
callback = LevelSnap.Function.SetMinLevel,
},
{
id = "MaxLevel",
text = LS_MAXIMUM,
text = LS_MAXIMUM.." (%s)",
subText = LS_HELP_MAX,
type = CONTROLTYPE_SLIDER,
minText = "Min",
194,11 → 207,7
minValue = 1,
maxValue = CHARACTER_MAXLEVEL,
valueStep = 1,
callback = function(value)
if (value <= LevelSnap_SavedVars["MinLevel"]) then
LevelSnap_SavedVars["MinLevel"] = value
end
end,
callback = LevelSnap.Function.SetMaxLevel,
point = {"TOPLEFT", "MinLevel", "TOPRIGHT", 80, 0},
},
--[[
215,6 → 224,8
savedVarTable = "LevelSnap_SavedVars",
}
 
Portfolio.RegisterOptionSet(optionTable)
local optionsFrame = Portfolio.RegisterOptionSet(optionTable)
LevelSnap.minControl = optionsFrame:GetControl("MinLevel")
LevelSnap.maxControl = optionsFrame:GetControl("MaxLevel")
 
end
\ No newline at end of file