WoWInterface SVN LevelSnap

Compare Revisions

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

Rev 9 → Rev 10

LevelSnap/LevelSnap.xml
23,16 → 23,4
<Script file="LevelSnap.lua"/>
<Script file="PortfolioRegistration.lua"/>
 
<!-- Frames -->
<Frame name="LevelSnapFrame" hidden="true">
<Scripts>
<OnLoad>
LevelSnap.On.Load();
</OnLoad>
<OnEvent>
LevelSnap.On.Event(event);
</OnEvent>
</Scripts>
</Frame>
 
</Ui>
\ No newline at end of file
LevelSnap/PortfolioRegistration.lua
17,59 → 17,66
text = LS_ENABLED,
tooltipText = LS_HELP_ONOFF,
type = CONTROLTYPE_CHECKBOX,
defaultValue = "1",
};
defaultValue = 1,
},
{
id = "MinLevelHeader",
text = LS_MINIMUM,
subText = LS_HELP_MIN,
type = CONTROLTYPE_HEADER,
},
{
id = "CloseWindows",
text = LS_CLOSEWIN,
tooltipText = LS_HELP_CLOSEWIN,
type = CONTROLTYPE_CHECKBOX,
defaultValue = 1,
},
{
id = "MinLevel",
text = LS_MINIMUM,
tooltipText = LS_HELP_MIN,
type = CONTROLTYPE_SLIDER,
minText = "Min",
maxText = "Max",
defaultValue = "1",
minValue = "1",
maxValue = "80",
valueStep = "1",
defaultValue = 1,
minValue = 1,
maxValue = 80,
valueStep = 1,
callback = function(value)
if (value >= LevelSnap_SavedVars["MaxLevel"]) then
LevelSnap_SavedVars.MaxLevel(value == value);
end;
end;
};
if (value >= LevelSnap_SavedVars.MaxLevel) then
LevelSnap_SavedVars.MaxLevel = value
end
end,
},
{
id = "MaxLevelHeader",
text = LS_MAXIMUM,
subText = LS_HELP_MAX,
type = CONTROLTYPE_HEADER,
},
{
id = "MaxLevel",
text = LS_MAXIMUM,
tooltipText = LS_HELP_MAX,
type = CONTROLTYPE_SLIDER,
minText = "Min",
maxText = "Max",
defaultValue = "80",
minValue = "1",
maxValue = "80",
valueStep = "1",
defaultValue = 80,
minValue = 1,
maxValue = 80,
valueStep = 1,
callback = function(value)
if (value <= LevelSnap_SavedVars["MinLevel"]) then
LevelSnap_SavedVars.MinLevel(value == value);
end;
end;
};
if (value <= LevelSnap_SavedVars.MinLevel) then
LevelSnap_SavedVars.MinLevel = value
end
end,
},
{
id = "CloseWindows",
text = LS_CLOSEWIN,
tooltipText = LS_HELP_CLOSEWIN,
type = CONTROLTYPE_CHECKBOX,
defaultValue = "1",
};
{
id = "Status",
text = LS_STATUS,
tooltipText = LS_HELP_STATUS,
type = CONTROLTYPE_BUTTON,
callback = LevelSnap.Out.Status,
};
};
},
},
savedVarTable = "LevelSnap_SavedVars",
}
 
Portfolio.RegisterOptionSet(optionTable)
 
Portfolio.RegisterOptionSet(optionTable)
\ No newline at end of file
LevelSnap/LevelSnap.lua
24,10 → 24,9
1.4.2 - Added Portfolio registration
- Removed Khaos registration
- Removed Slash Commands
- Change version format
- German translation provided by Lakar EU-Azshara
1.4.1 - Bugfix
1.4.0 - Level Cap 80
- Change version format
1.31 - Updated TOC for 2.4
1.30 - Shows /played in screenshots
- Removed hide ui option
59,19 → 58,11
 
LevelSnap.On = {
 
Load = function()
 
LevelSnap.Register.RegisterEvent("PLAYER_LEVEL_UP")
 
--LevelSnap.Register.SlashCommands()
 
end;
 
Event = function(event)
 
if (event == "PLAYER_LEVEL_UP" and LevelSnap_SavedVars["Enabled"] == 1) then
if (arg1 >= LevelSnap_SavedVars["MinLevel"] and arg1 <= LevelSnap_SavedVars["MaxLevel"]) then
if (LevelSnap_SavedVars["CloseWindows"] == 1) then
if (event == "PLAYER_LEVEL_UP" and LevelSnap_SavedVars.Enabled == "1") then
if (arg1 >= LevelSnap_SavedVars.MinLevel and arg1 <= LevelSnap_SavedVars.MaxLevel) then
if (LevelSnap_SavedVars.CloseWindows == "1") then
CloseAllWindows()
RequestTimePlayed()
LevelSnap.Function.TakeScreenshot()
86,20 → 77,6
 
}
 
LevelSnap.Register = {
 
RegisterEvent = function(event)
this:RegisterEvent(event)
end;
 
SlashCommands = function()
SLASH_LS_HELP1 = "/ls";
SLASH_LS_HELP2 = "/levelsnap";
SlashCmdList["LS_HELP"] = LevelSnap.Command;
end;
 
}
 
LevelSnap.Function = {
 
TakeScreenshot = function()
120,14 → 97,14
local uihide = LevelSnap.Color.Green(LS_ENABLED)
local closeall = LevelSnap.Color.Green(LS_ENABLED)
 
if (LevelSnap_SavedVars["Enabled"] == 0) then
if (LevelSnap_SavedVars.Enabled == "0") then
active = LevelSnap.Color.Red(LS_DISABLED)
end
if (LevelSnap_SavedVars["CloseWindows"] == 0) then
if (LevelSnap_SavedVars.CloseWindows == "0") then
closeall = LevelSnap.Color.Red(LS_DISABLED)
end
 
LevelSnap.Out.Print("AddOn "..active..". "..string.format(LS_MINMAXSET2, LS_MINIMUM, LevelSnap.Color.Green(LevelSnap_SavedVars["MinLevel"])).." "..string.format(LS_MINMAXSET2, LS_MAXIMUM, LevelSnap.Color.Green(LevelSnap_SavedVars["MaxLevel"])).." "..string.format(LS_CLOSEALL, closeall).." "..string.format(LS_SHOWHIDE, uihide))
LevelSnap.Out.Print("AddOn "..active..". "..string.format(LS_MINMAXSET2, LS_MINIMUM, LevelSnap.Color.Green(LevelSnap_SavedVars.MinLevel)).." "..string.format(LS_MINMAXSET2, LS_MAXIMUM, LevelSnap.Color.Green(LevelSnap_SavedVars.MaxLevel)).." "..string.format(LS_CLOSEALL, closeall).." "..string.format(LS_SHOWHIDE, uihide))
end;
 
Version = function()
149,59 → 126,9
 
}
 
LevelSnap.Command = function(msg)
 
local cmd = string.lower(msg)
 
if (cmd == "" or cmd == "help") then
LevelSnap.Out.Print("/ls on|off, "..LS_HELP_ONOFF)
LevelSnap.Out.Print("/ls min #, "..LS_HELP_MIN)
LevelSnap.Out.Print("/ls max #, "..LS_HELP_MAX)
LevelSnap.Out.Print("/ls closewin on|off, "..LS_HELP_CLOSEWIN)
LevelSnap.Out.Print("/ls ui on|off, "..LS_HELP_UI)
LevelSnap.Out.Print("/ls status, "..LS_HELP_STATUS)
LevelSnap.Out.Print("/ls version, "..LS_HELP_VERSION)
end
 
if (cmd == "version") then
LevelSnap.Out.Version()
end
 
if (cmd == "status") then
LevelSnap.Out.Status()
end
 
if (cmd == "on") then
LevelSnap_SavedVars["Enabled"] = 1;
LevelSnap.Out.Print(LS_Color.Green(LS_ENABLED))
end
 
if (cmd == "off") then
LevelSnap_SavedVars["Enabled"] = 0;
LevelSnap.Out.Print(LevelSnap.Color.Red(LS_DISABLED))
end
 
if (strsub(msg, 1, 3) == "min") then
local num = tonumber(strsub(msg, 4))
LevelSnap_SavedVars["MinLevel"] = num;
LevelSnap.Out.Print(string.format(LS_MINMAXSET2, LS_MINIMUM, LevelSnap.Color.Green(num)))
end
 
if (strsub(msg, 1, 3) == "max") then
local num = tonumber(strsub(msg, 4))
LevelSnap_SavedVars["MaxLevel"] = num;
LevelSnap.Out.Print(string.format(LS_MINMAXSET2, LS_MAXIMUM, LevelSnap.Color.Green(num)))
end
 
if (strsub(msg, 1, 8) == "closewin") then
local state = strsub(msg, 10)
if (state == "on") then
LevelSnap_SavedVars["CloseWindows"] = 1;
LevelSnap.Out.Print(string.format(LS_CLOSEALL, LS_ENABLED))
elseif (state == "off") then
LevelSnap_SavedVars["CloseWindows"] = 0;
LevelSnap.Out.Print(string.format(LS_CLOSEALL, LS_DISABLED))
end
end
 
end;
\ No newline at end of file +if (not LevelSnapFrame) then + local frame = CreateFrame("Frame", "LevelSnapFrame") + frame:Hide() + frame:SetScript("OnEvent", LevelSnap.On.Event) + frame:RegisterEvent("PLAYER_LEVEL_UP") +end \ No newline at end of file
LevelSnap/LevelSnap.toc
2,8 → 2,9
## Version: 1.4.2
## Title: LevelSnap
## Notes: Automatically snaps a screen shot when you level.
## RequiredDeps: Chronos, Portfolio
## OptionalDeps: Chronos, Portfolio
## SavedVariablesPerCharacter: LevelSnap_SavedVars
## Author: Ryan "Gryphon" Snook
## X-Email: rsnook@gmail.com
## X-Website: http://www.wowinterface.com/downloads/info5028-LevelSnap.html
LevelSnap.xml
\ No newline at end of file