Quantcast
WoWInterface: SVN - CombatClock - Path Comparison - / Rev 3 and / Rev 4

WoWInterface SVN CombatClock

Compare Revisions

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

Rev 3 → Rev 4

trunk/CombatClock.xml File deleted
trunk/CombatClock.lua File deleted
trunk/CombatClock.toc File deleted \ No newline at end of file
trunk/CombatClock/CombatClock.toc New file
0,0 → 1,11
## Interface: 20400
## Title: Combat Clock
## Author: Icecoldcoke
## Version: 1.0
## Notes: See how long your fights lasted!
## DefaultState: Enabled
## SavedVariables: CombatClock_min, CombatClock_showAlways
## LoadOnDemand: 0
 
CombatClock.lua
CombatClock.xml
\ No newline at end of file
trunk/CombatClock/CombatClock.xml New file
0,0 → 1,13
<Ui xmlns="http://www.blizzard.com/wow/ui/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.blizzard.com/wow/ui/">
<Script file="CombatClock.lua"/>
<Frame name="CombatClock_EventHandler">
<Scripts>
<OnLoad>
CombatClock_OnLoad();
</OnLoad>
<OnEvent>
CombatClock_OnEvent();
</OnEvent>
</Scripts>
</Frame>
</Ui>
trunk/CombatClock/CombatClock.lua New file
0,0 → 1,72
-- Combat Clock
-- By : Icecoldcoke
 
function CombatClock_OnLoad()
this:RegisterEvent("PLAYER_REGEN_DISABLED");
this:RegisterEvent("PLAYER_REGEN_ENABLED");
this:RegisterEvent("VARIABLES_LOADED")
end
 
function CombatClock_OnInitialize()
SLASH_COMBATCLOCK1 = "/cc";
SLASH_COMBATCLOCK2 = "/coco";
SlashCmdList["COMBATCLOCK"] = CombatClock_Command;
 
if (not CombatClock_min) then
CombatClock_min = 00
end
if (not CombatClock_showAlways) then
CombatClock_showAlways = true
end
end
 
function CombatClock_Command(CombatClock_arg)
if CombatClock_arg == "" then
DEFAULT_CHAT_FRAME:AddMessage("----------[CC]Comands List-----------")
DEFAULT_CHAT_FRAME:AddMessage("-------------------------------------")
DEFAULT_CHAT_FRAME:AddMessage("/cc showalways - Toggles showing SW after combat")
DEFAULT_CHAT_FRAME:AddMessage("/cc 00-60 - Sets the minimum minutes")
end
if CombatClock_arg == "SHOWALWAYS" or CombatClock_arg == "showalways" then
if (CombatClock_showAlways == true) then
CombatClock_showAlways = false
DEFAULT_CHAT_FRAME:AddMessage("[CC]Stopwatch will no longer be shown after combat ends.")
elseif (CombatClock_showAlways == false) then
CombatClock_showAlways = true
DEFAULT_CHAT_FRAME:AddMessage("[CC]Stopwatch will now be shown after combat ends.")
end
end
if (CombatClock_arg ~= "") and (CombatClock_arg ~= "SHOWALWAYS") and (CombatClock_arg ~= "showalways") then
CombatClock_min = CombatClock_arg
DEFAULT_CHAT_FRAME:AddMessage("[CC]Minimum minutes has been set to :" .. CombatClock_min);
end
end
 
function CombatClock_OnEvent()
if (event == "VARIABLES_LOADED") then
CombatClock_OnInitialize()
end
if (event == "PLAYER_REGEN_DISABLED") then
Stopwatch_Clear()
Stopwatch_Play()
StopwatchFrame:Show()
SetDesaturation(StopwatchPlayPauseButton:GetNormalTexture(), 1)
SetDesaturation(StopwatchResetButton:GetNormalTexture(), 1)
StopwatchPlayPauseButton:Disable()
StopwatchResetButton:Disable()
end
if (event == "PLAYER_REGEN_ENABLED") then
Stopwatch_Pause()
SetDesaturation(StopwatchPlayPauseButton:GetNormalTexture())
SetDesaturation(StopwatchResetButton:GetNormalTexture())
StopwatchPlayPauseButton:Enable()
StopwatchResetButton:Enable()
if (CombatClock_showAlways == false) then
StopwatchFrame:Hide()
end
if (CombatClock_min <= StopwatchTickerMinute:GetText()) then
DEFAULT_CHAT_FRAME:AddMessage("[CC]Combat Ended in (MM:SS): "..StopwatchTickerMinute:GetText()..":"..StopwatchTickerSecond:GetText())
end
end
end