From cc43980852c5b61c8e48e940e8f6427bace3833e Mon Sep 17 00:00:00 2001 From: Rok Date: Sun, 8 Jun 2025 15:41:52 +0200 Subject: [PATCH 1/3] added min mode --- README.md | 4 ++- Tracker.lua | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++-- 2 files changed, 71 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c88cbf4..a47cab4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ -> **A simple expereince tracking addon for World of Warcraft 1.17.1 Turlte WoW giving you the freedom of simplicity** +> **A simple expereince tracking addon for World of Warcraft 1.17.1 Turtle WoW giving you the freedom of simplicity**
Not for Classic or Retail!.
@@ -40,6 +40,7 @@ Each element is designed to be simple, compact, and fit the wow theme asthetics. * `/sl lock` - locks tracker in place * `/sl ttswap` - swaps the tooltip (left > right) * `/sl scale ` - scales the frame to set amount +* `/sl min` - toggles minimal mode (removes buttons and background elements) ## Features @@ -57,6 +58,7 @@ Each element is designed to be simple, compact, and fit the wow theme asthetics. * Moveable * Hideable * Scaleable +* Minimal mode option diff --git a/Tracker.lua b/Tracker.lua index 434955d..54e6200 100644 --- a/Tracker.lua +++ b/Tracker.lua @@ -386,7 +386,7 @@ local function InitializeTracker() Tracker.e:ResetTracker() ShowSLMessage("Tracker has been reset") elseif arg1 == "RightButton" then - SL:Print("/sl |cff1a9fc0lock|r, |cff1a9fc0ttswap|r, |cff1a9fc0scale |r") + SL:Print("/sl |cff1a9fc0toggle|r, |cff1a9fc0lock|r, |cff1a9fc0ttswap|r, |cff1a9fc0scale |r, |cff1a9fc0min|r") end end) end @@ -632,13 +632,79 @@ function Tracker.e.Commands(msg) elseif command == "reset" then Tracker.e:ResetTracker() ShowSLMessage("Tracker has been reset") + elseif command == "min" then + SLDatastore.data[SLProfile].Store.minimal = not SLDatastore.data[SLProfile].Store.minimal + Tracker.e:UpdateMinimalMode() + ShowSLMessage("Minimal mode " .. (SLDatastore.data[SLProfile].Store.minimal and "enabled" or "disabled")) else - SL:Print("/sl |cff1a9fc0toggle|r, |cff1a9fc0lock|r, |cff1a9fc0ttswap|r, |cff1a9fc0scale |r,") + SL:Print("/sl |cff1a9fc0toggle|r, |cff1a9fc0lock|r, |cff1a9fc0ttswap|r, |cff1a9fc0scale |r, |cff1a9fc0min|r") + end +end + +function Tracker.e:UpdateMinimalMode() + if SLDatastore.data[SLProfile].Store.minimal then + -- Hide background elements + Tracker.track:SetBackdrop(nil) + Tracker.track.name:Hide() + Tracker.track.close:Hide() + _G[fn .. "ResizeButton"]:Hide() + + -- Adjust button positions for minimal mode + local prevButton + for i = 1, 4 do + local button = _G[fn .. "TrackerButton" .. bn[i]] + if button then + button:ClearAllPoints() + if i == 1 then + button:SetPoint("TOP", Tracker.track, "TOP", 0, 0) + else + button:SetPoint("TOP", prevButton, "BOTTOM", 0, -5) + end + prevButton = button + end + end + else + -- Restore normal mode + Tracker.track:SetBackdrop({ + bgFile = SL:GetTexture("Background"), + edgeFile = SL:GetTexture("Frame"), + tile = true, + tileSize = 128, + edgeSize = 32, + insets = { + left = 5, + right = 5, + top = 22, + bottom = 5 + }, + }) + Tracker.track.name:Show() + Tracker.track.close:Show() + _G[fn .. "ResizeButton"]:Show() + + -- Restore original button positions + local prevButton + for i = 1, 4 do + local button = _G[fn .. "TrackerButton" .. bn[i]] + if button then + button:ClearAllPoints() + if i == 1 then + button:SetPoint("TOP", Tracker.track, "TOP", 2, -25) + else + button:SetPoint("TOP", prevButton, "BOTTOM", 0, -5) + end + prevButton = button + end + end end end function SLLoadTracker() InitializeTracker() + -- Apply minimal mode if it was enabled + if SLDatastore.data[SLProfile].Store.minimal then + Tracker.e:UpdateMinimalMode() + end end Tracker.e:RegisterEvent("PLAYER_ENTERING_WORLD") From 3b5f618704e18d30438be8d48c23d4d8f8562844 Mon Sep 17 00:00:00 2001 From: Rok Date: Mon, 9 Jun 2025 01:41:31 +0200 Subject: [PATCH 2/3] added toggling of center screen xp announcements, and restructured code + fixed an issue with ui element duplication after loading screens (like teleport or travel by boat) --- README.md | 6 ++ Tracker.lua | 235 ++++++++++++++++++++++------------------------------ 2 files changed, 103 insertions(+), 138 deletions(-) diff --git a/README.md b/README.md index a47cab4..6751616 100644 --- a/README.md +++ b/README.md @@ -41,6 +41,7 @@ Each element is designed to be simple, compact, and fit the wow theme asthetics. * `/sl ttswap` - swaps the tooltip (left > right) * `/sl scale ` - scales the frame to set amount * `/sl min` - toggles minimal mode (removes buttons and background elements) +* `/sl announce` - toggles kill XP announcements in the center of screen ## Features @@ -135,3 +136,8 @@ Each element is designed to be simple, compact, and fit the wow theme asthetics. +Minimal Mode: + +![452790609-628cad4f-9f4b-4a88-b2eb-e915faa49ba3](https://github.com/user-attachments/assets/faea01b7-d98b-4a74-9ed3-07acf1a48db0) + + diff --git a/Tracker.lua b/Tracker.lua index 54e6200..eae89e6 100644 --- a/Tracker.lua +++ b/Tracker.lua @@ -50,6 +50,13 @@ local function InitializeTracker() end end) + -- Clean up existing frame if it exists + if _G[fn] then + _G[fn]:Hide() + _G[fn] = nil + end + + Tracker.track = CreateFrame("Frame", fn, UIParent) Tracker.track:SetWidth(60) Tracker.track:SetHeight(130) Tracker.track:SetMovable(true) @@ -76,9 +83,7 @@ local function InitializeTracker() end end) - Tracker.track:SetScript("OnHide", function() - end) Tracker.track:SetScript("OnMouseDown", function() @@ -88,7 +93,6 @@ local function InitializeTracker() Tracker.track:SetScript("OnMouseUp", function() this:StopMovingOrSizing() - local point, relativeTo, relativePoint, xOfs, yOfs = this:GetPoint() local parentName = "UIParent" @@ -101,51 +105,93 @@ local function InitializeTracker() } end) + -- Only set backdrop if not in minimal mode + if not SLDatastore.data[SLProfile].Store.minimal then + Tracker.track:SetBackdrop({ + bgFile = SL:GetTexture("Background"), + edgeFile = SL:GetTexture("Frame"), + tile = true, + tileSize = 128, + edgeSize = 32, + insets = { + left = 5, + right = 5, + top = 22, + bottom = 5 + }, + }) - Tracker.track:SetBackdrop({ - bgFile = SL:GetTexture("Background"), - edgeFile = SL:GetTexture("Frame"), - tile = true, - tileSize = 128, - edgeSize = 32, - insets = { - left = 5, - right = 5, - top = 22, - bottom = 5 - }, - }) - - local name = Tracker.track:CreateFontString(nil, "OVERLAY", "GameFontNormal") - name:SetPoint("TOPLEFT", 0, -5) - name:SetWidth(37) - name:SetHeight(12) - name:SetJustifyH("CENTER") - name:SetText("SL") - - Tracker.track.name = name - - local close = CreateFrame("Button", fn .. "CloseButton", Tracker.track, "UIPanelCloseButton") - close:SetPoint("TOPRIGHT", Tracker.track, 4, 4) - close:SetScript("OnClick", function() - SLDatastore.data[SLProfile].Store.toggle = false - Tracker.track:Hide() - end) + local name = Tracker.track:CreateFontString(nil, "OVERLAY", "GameFontNormal") + name:SetPoint("TOPLEFT", 0, -5) + name:SetWidth(37) + name:SetHeight(12) + name:SetJustifyH("CENTER") + name:SetText("SL") + Tracker.track.name = name + + local close = CreateFrame("Button", fn .. "CloseButton", Tracker.track, "UIPanelCloseButton") + close:SetPoint("TOPRIGHT", Tracker.track, 4, 4) + close:SetScript("OnClick", function() + SLDatastore.data[SLProfile].Store.toggle = false + Tracker.track:Hide() + end) + Tracker.track.close = close + + local resize = CreateFrame("Button", fn .. "ResizeButton", Tracker.track, "UIPanelButtonTemplate") + resize:SetWidth(16) + resize:SetHeight(16) + resize:GetNormalTexture():SetTexture("Interface\\AddOns\\SimpleUI\\Media\\Textures\\ResizeGrip") + resize:GetHighlightTexture():SetTexture("Interface\\AddOns\\SimpleUI\\Media\\Textures\\ResizeGrip") + resize:GetPushedTexture():SetTexture("Interface\\AddOns\\SimpleUI\\Media\\Textures\\ResizeGrip") + resize:SetPoint("BOTTOMRIGHT", Tracker.track, "BOTTOMRIGHT", 0, -1) + + local savedScale = SLDatastore.data[SLProfile].Store.trackerScale + if savedScale then + Tracker.e:ScaleTracker(savedScale) + end - Tracker.track.close = close + resize:SetScript("OnMouseDown", function() + Tracker.e.isResizing = true + Tracker.e.startScale = Tracker.track:GetScale() + Tracker.e.startCursorX, Tracker.e.startCursorY = GetCursorPosition() + end) + + resize:SetScript("OnMouseUp", function() + Tracker.e.isResizing = false + end) + + resize:SetScript("OnUpdate", function() + if Tracker.e.isResizing then + local cursorX, cursorY = GetCursorPosition() + local diffX = cursorX - Tracker.e.startCursorX + + -- Calculate new scale based on mouse movement + local newScale = math.max(0.5, math.min(3, Tracker.e.startScale + (diffX / 200))) + Tracker.e:ScaleTracker(newScale) + ShowSLMessage(string.format("Tracker scaled to %.1f.", newScale), 3) + end + end) + end local prevButton - - for i = 1, 4 do local button = CreateFrame("Button", fn .. "TrackerButton" .. bn[i], Tracker.track, "UIPanelButtonTemplate") button:SetWidth(45) button:SetHeight(20) - if i == 1 then - button:SetPoint("TOP", Tracker.track, "TOP", 2, -25) + -- Adjust button positions based on minimal mode + if SLDatastore.data[SLProfile].Store.minimal then + if i == 1 then + button:SetPoint("TOP", Tracker.track, "TOP", 0, 0) + else + button:SetPoint("TOP", prevButton, "BOTTOM", 0, -5) + end else - button:SetPoint("TOP", prevButton, "BOTTOM", 0, -5) + if i == 1 then + button:SetPoint("TOP", Tracker.track, "TOP", 2, -25) + else + button:SetPoint("TOP", prevButton, "BOTTOM", 0, -5) + end end prevButton = button @@ -161,7 +207,6 @@ local function InitializeTracker() button.text:SetJustifyH("RIGHT") button.text:SetText("N/A") - if i == 1 then norm:SetTexture(SL:GetTexture("Button")) norm:SetVertexColor(0.4, 0, 0, 1) @@ -195,9 +240,12 @@ local function InitializeTracker() Tracker.e:UpdateKillStats(gainedNum) Tracker.e:UpdateKills() Tracker.e:UpdateTimer(xpPerKill) - ShowSLMessage( - string.format("%d XP gained, you need to kill %d more %s", gainedNum, killsToLvl, - unitName), 5) + + if SLDatastore.data[SLProfile].Store.announce then + ShowSLMessage( + string.format("%d XP gained, you need to kill %d more %s", gainedNum, killsToLvl, + unitName), 5) + end button.text:SetText(killsToLvl) end @@ -386,7 +434,7 @@ local function InitializeTracker() Tracker.e:ResetTracker() ShowSLMessage("Tracker has been reset") elseif arg1 == "RightButton" then - SL:Print("/sl |cff1a9fc0toggle|r, |cff1a9fc0lock|r, |cff1a9fc0ttswap|r, |cff1a9fc0scale |r, |cff1a9fc0min|r") + SL:Print("/sl |cff1a9fc0toggle|r, |cff1a9fc0lock|r, |cff1a9fc0ttswap|r, |cff1a9fc0scale |r, |cff1a9fc0min|r, |cff1a9fc0announce|r") end end) end @@ -396,41 +444,6 @@ local function InitializeTracker() button.texture:SetVertexColor(0.5, 0.4, 0, 1) ]] end - local resize = CreateFrame("Button", fn .. "ResizeButton", Tracker.track, "UIPanelButtonTemplate") - resize:SetWidth(16) - resize:SetHeight(16) - resize:GetNormalTexture():SetTexture("Interface\\AddOns\\SimpleUI\\Media\\Textures\\ResizeGrip") - resize:GetHighlightTexture():SetTexture("Interface\\AddOns\\SimpleUI\\Media\\Textures\\ResizeGrip") - resize:GetPushedTexture():SetTexture("Interface\\AddOns\\SimpleUI\\Media\\Textures\\ResizeGrip") - resize:SetPoint("BOTTOMRIGHT", Tracker.track, "BOTTOMRIGHT", 0, -1) - - local savedScale = SLDatastore.data[SLProfile].Store.trackerScale - if savedScale then - Tracker.e:ScaleTracker(savedScale) - end - - resize:SetScript("OnMouseDown", function() - Tracker.e.isResizing = true - Tracker.e.startScale = Tracker.track:GetScale() - Tracker.e.startCursorX, Tracker.e.startCursorY = GetCursorPosition() - end) - - resize:SetScript("OnMouseUp", function() - Tracker.e.isResizing = false - end) - - resize:SetScript("OnUpdate", function() - if Tracker.e.isResizing then - local cursorX, cursorY = GetCursorPosition() - local diffX = cursorX - Tracker.e.startCursorX - - -- Calculate new scale based on mouse movement - local newScale = math.max(0.5, math.min(3, Tracker.e.startScale + (diffX / 200))) - Tracker.e:ScaleTracker(newScale) - ShowSLMessage(string.format("Tracker scaled to %.1f.", newScale), 3) - end - end) - SLASH_SIMPLELVL1 = "/simplelvl" SLASH_SIMPLELVL2 = "/sl" SlashCmdList["SIMPLELVL"] = Tracker.e.Commands @@ -634,68 +647,14 @@ function Tracker.e.Commands(msg) ShowSLMessage("Tracker has been reset") elseif command == "min" then SLDatastore.data[SLProfile].Store.minimal = not SLDatastore.data[SLProfile].Store.minimal - Tracker.e:UpdateMinimalMode() + -- Recreate the frame to apply minimal mode changes + InitializeTracker() ShowSLMessage("Minimal mode " .. (SLDatastore.data[SLProfile].Store.minimal and "enabled" or "disabled")) + elseif command == "announce" then + SLDatastore.data[SLProfile].Store.announce = not SLDatastore.data[SLProfile].Store.announce + ShowSLMessage("Kill XP announcements " .. (SLDatastore.data[SLProfile].Store.announce and "enabled" or "disabled")) else - SL:Print("/sl |cff1a9fc0toggle|r, |cff1a9fc0lock|r, |cff1a9fc0ttswap|r, |cff1a9fc0scale |r, |cff1a9fc0min|r") - end -end - -function Tracker.e:UpdateMinimalMode() - if SLDatastore.data[SLProfile].Store.minimal then - -- Hide background elements - Tracker.track:SetBackdrop(nil) - Tracker.track.name:Hide() - Tracker.track.close:Hide() - _G[fn .. "ResizeButton"]:Hide() - - -- Adjust button positions for minimal mode - local prevButton - for i = 1, 4 do - local button = _G[fn .. "TrackerButton" .. bn[i]] - if button then - button:ClearAllPoints() - if i == 1 then - button:SetPoint("TOP", Tracker.track, "TOP", 0, 0) - else - button:SetPoint("TOP", prevButton, "BOTTOM", 0, -5) - end - prevButton = button - end - end - else - -- Restore normal mode - Tracker.track:SetBackdrop({ - bgFile = SL:GetTexture("Background"), - edgeFile = SL:GetTexture("Frame"), - tile = true, - tileSize = 128, - edgeSize = 32, - insets = { - left = 5, - right = 5, - top = 22, - bottom = 5 - }, - }) - Tracker.track.name:Show() - Tracker.track.close:Show() - _G[fn .. "ResizeButton"]:Show() - - -- Restore original button positions - local prevButton - for i = 1, 4 do - local button = _G[fn .. "TrackerButton" .. bn[i]] - if button then - button:ClearAllPoints() - if i == 1 then - button:SetPoint("TOP", Tracker.track, "TOP", 2, -25) - else - button:SetPoint("TOP", prevButton, "BOTTOM", 0, -5) - end - prevButton = button - end - end + SL:Print("/sl |cff1a9fc0toggle|r, |cff1a9fc0lock|r, |cff1a9fc0ttswap|r, |cff1a9fc0scale |r, |cff1a9fc0min|r, |cff1a9fc0announce|r") end end From 357bf1fadd3532ef26e4895c89cdcdcbb825688d Mon Sep 17 00:00:00 2001 From: Rok Date: Fri, 13 Jun 2025 11:20:34 +0200 Subject: [PATCH 3/3] fixed wrong number of mobs to level calculation, further minified the min version --- Tracker.lua | 94 ++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 71 insertions(+), 23 deletions(-) diff --git a/Tracker.lua b/Tracker.lua index eae89e6..be60a21 100644 --- a/Tracker.lua +++ b/Tracker.lua @@ -14,6 +14,29 @@ local questsToLvl = 0; local killsPerHour = 0 local questsPerHour = 0 +-- Add rolling average tracking +local killXPHistory = {} +local questXPHistory = {} +local MAX_HISTORY = 10 -- Track last 10 kills/quests + +local function updateRollingAverage(history, newValue) + table.insert(history, newValue) + local count = table.getn(history) + + if count > MAX_HISTORY then + table.remove(history, 1) + count = MAX_HISTORY + end + + local sum = 0 + for i = 1, count do + sum = sum + history[i] + end + + local average = sum / count + return average +end + local bn = { [1] = "Kills", [2] = "Quests", @@ -181,21 +204,28 @@ local function InitializeTracker() -- Adjust button positions based on minimal mode if SLDatastore.data[SLProfile].Store.minimal then + -- In minimal mode, only show first and last buttons if i == 1 then button:SetPoint("TOP", Tracker.track, "TOP", 0, 0) - else + button:Show() + prevButton = button -- Keep track of first button for time button + elseif i == 4 then button:SetPoint("TOP", prevButton, "BOTTOM", 0, -5) + button:Show() + else + button:Hide() end else + -- Normal mode, show all buttons if i == 1 then button:SetPoint("TOP", Tracker.track, "TOP", 2, -25) else button:SetPoint("TOP", prevButton, "BOTTOM", 0, -5) end + button:Show() + prevButton = button end - prevButton = button - local norm = button:GetNormalTexture() local highlight = button:GetHighlightTexture() local push = button:GetPushedTexture() @@ -229,17 +259,11 @@ local function InitializeTracker() if unitName and gainedStr then local gainedNum = tonumber(gainedStr) if gainedNum then - local restedXP = GetXPExhaustion() or 0 - local gainedRest = 0 - - if restedXP > 0 then - gainedRest = math.min(gainedNum, restedXP) - end killsThisSession = killsThisSession + 1 - xpPerKill = gainedNum + gainedRest + xpPerKill = updateRollingAverage(killXPHistory, gainedNum) Tracker.e:UpdateKillStats(gainedNum) Tracker.e:UpdateKills() - Tracker.e:UpdateTimer(xpPerKill) + Tracker.e:UpdateTimer(gainedNum) if SLDatastore.data[SLProfile].Store.announce then ShowSLMessage( @@ -253,12 +277,13 @@ local function InitializeTracker() end end end) - --UIErrorsFrame:AddMessage("Hello, World!", 1, 0, 0, 1, 3) button:SetScript("OnEnter", function() Tracker.e:UpdateTooltip(button) GameTooltip:SetText("|cff1a9fc0Kill Stats|r") GameTooltip:AddLine(" ") + GameTooltip:AddDoubleLine(SL.util.Colorize("Average XP per Kill:", 1, 1, 0.5), + SL.util.Colorize(math.floor(xpPerKill), 0.8, 0, 0), 1, 1, 1) GameTooltip:AddDoubleLine(SL.util.Colorize("Kills This Session:", 1, 1, 0.5), SL.util.Colorize(killsThisSession, 0.8, 0, 0), 1, 1, 1) GameTooltip:AddDoubleLine(SL.util.Colorize("Kills/Hour:", 1, 1, 0.5), @@ -293,7 +318,7 @@ local function InitializeTracker() local gainedNum = tonumber(gainedStr) if gainedNum then questsThisSession = questsThisSession + 1 - xpPerQuest = gainedNum + xpPerQuest = updateRollingAverage(questXPHistory, gainedNum) Tracker.e:UpdateQuestStats() Tracker.e:UpdateQuests() Tracker.e:UpdateTimer(gainedNum) @@ -528,11 +553,6 @@ function Tracker.e:UpdateExperience(button) local needed = math.floor(maxXP - currXP) local perc = math.floor((currXP / maxXP) * 100) local barsLeft = 20 - math.floor(perc / 5) - local restedXP = GetXPExhaustion() - local restedPerc - if restedXP ~= nil then - restedPerc = math.floor((restedXP / maxXP) * 100) - end Tracker.e:UpdateTooltip(button) GameTooltip:SetText("|cff1a9fc0Experience|r") GameTooltip:AddLine(" ") @@ -541,10 +561,6 @@ function Tracker.e:UpdateExperience(button) GameTooltip:AddDoubleLine(SL.util.Colorize("Needed", 1, 1, 0.5), needed, 1, 1, 1) GameTooltip:AddDoubleLine(SL.util.Colorize("Pecent", 1, 1, 0.5), SL.util.Colorize("[" .. perc .. "%]", 0, 0.9, 1), 1, 1, 1) - if restedXP ~= nil then - GameTooltip:AddDoubleLine(SL.util.Colorize("Rested", 1, 1, 0.5), - SL.util.Colorize(restedXP .. " [" .. restedPerc .. "%]", 0, 0.9, 1), 1, 1, 1) - end GameTooltip:AddLine(" ") GameTooltip:AddDoubleLine(SL.util.Colorize("Bars", 1, 1, 0.5), barsLeft, 1, 1, 1) end @@ -594,10 +610,13 @@ function Tracker.e:ResetTracker() questsToLvl = 0 killsPerHour = 0 questsPerHour = 0 + + -- Clear history + killXPHistory = {} + questXPHistory = {} self:InitializeTimer() - for i = 1, 4 do local button = _G[fn .. "TrackerButton" .. bn[i]] if button then @@ -649,6 +668,21 @@ function Tracker.e.Commands(msg) SLDatastore.data[SLProfile].Store.minimal = not SLDatastore.data[SLProfile].Store.minimal -- Recreate the frame to apply minimal mode changes InitializeTracker() + -- Update button visibility + for i = 1, 4 do + local button = _G[fn .. "TrackerButton" .. bn[i]] + if button then + if SLDatastore.data[SLProfile].Store.minimal then + if i == 1 or i == 4 then + button:Show() + else + button:Hide() + end + else + button:Show() + end + end + end ShowSLMessage("Minimal mode " .. (SLDatastore.data[SLProfile].Store.minimal and "enabled" or "disabled")) elseif command == "announce" then SLDatastore.data[SLProfile].Store.announce = not SLDatastore.data[SLProfile].Store.announce @@ -659,6 +693,12 @@ function Tracker.e.Commands(msg) end function SLLoadTracker() + -- Check if character is level 60 + if UnitLevel("player") >= 60 then + SL:Print("SimpleLvl disabled - Character is level 60") + return + end + InitializeTracker() -- Apply minimal mode if it was enabled if SLDatastore.data[SLProfile].Store.minimal then @@ -668,6 +708,14 @@ end Tracker.e:RegisterEvent("PLAYER_ENTERING_WORLD") Tracker.e:SetScript("OnEvent", function() + -- Check if character is level 60 + if UnitLevel("player") >= 60 then + if Tracker.track then + Tracker.track:Hide() + end + return + end + this:InitializeTimer() end) --SL.InitTrack = InitializeTracker